Archive for October, 2010

A New High Water Mark for Voice Mashups

Friday, October 29th, 2010
You’re at the helm of your three-masted schooner on a blustery fall day; it’s starting to dust up, and it’s spitting rain. You see the harbor jetty ahead, but you need to know the set of the tide. Do you reach for your smart phone and fumble around with the touch screen, looking for that tide chart app?  Not likely.

Instead you grab your trusty phone, smart or not, and clap it to your ear. Over the air comes a soothing voice from Voxeo, calmly reading you the local tide information, straight from NOAA. That’s Moveable Tides, quick in and quick out, when you need it.

Moveable Tides is a slight variation on the  Moveable Weather app I presented in my last blog post here. It shares the same design elements,  and much of the same code, refactored now, to accept more variations on this theme.  It taps into data coming from the National Oceanographic and Atmospheric Administration (NOAA), and runs on the Google App Engine platform.

As was the case with Moveable Weather, the Tropo piece is easy to code. Just for fun, I’ve again set it up in a continuous loop, so an armchair sailor can check the tides all over the coastal US, simply by cruising around on an iGoogle page.

It’s worth it however, to massage the NOAA output a bit. There’s a standard routine, I call humanize_the_time, to make the times sound right.  Also, here’s a bit of Python to cause the state abbreviations to be expanded. STATE_ABBREV is a Python dictionary of state names, along with their abbreviations.

m = re.match('.*([A-Z]{2}).*', place)
if m:
    abbrev = m.group(1)
    if abbrev in my_globals.STATE_ABBREV:
        state = my_globals.STATE_ABBREV[abbrev]
        place = place.replace(abbrev, state)

This code, along with the rest of the Moveable Weather project, can be found on my Google Code page, along with documentation. You can also head on over to the Moveable Weather web page, to try it out. I hope it inspires you to create your own location-based mashup with Google Latitude, and Tropo.

Get some Tropo gear for your next event

Friday, October 29th, 2010

Are you going to an event where you’re going to be showing off Tropo? Maybe you’re demoing your latest creation at the local web developer’s meetup. Perhaps demonstrating the power of cloud communications at a BarCamp. Whatever it is, we’d love to help you kick off your event in style by sending you some Tropo schwag.

The Tropo meetup kit

We’ve prepared a meetup kit for you, and all you need to do is let us know when and where your event is. We’ll ship you shirts, stickers, and even some awesome USB drives (2GB, solid metal bottle openers!) with Tropo samples and docs on them. Give them out, raffle them off, whatever you want, it’s up to you. We’ll even help you promote your event so everyone can come see how awesome you are.

Instalover wins Tropo Challenge at Rails Rumble

Wednesday, October 27th, 2010

As part of last weekend’s Rails Rumble, Tropo offered a special challenge. Build the best example of real-time communications and we’d send you a Sonos S5 Music system for every member of your team.

We chose Instalover as the winner of the Tropo prize. Their application lets users sign up for and receive instant blind dates over SMS. It’s a fun use of Tropo, allowing users to anonymously contact each other over SMS. You even sign up for and control the service through SMS.

Besides Instalover, we were excited to see that with the hundreds of teams entering Rails Rumble, three of the finalists chosen by their judges were using Tropo. One of those even took home second place in the Rumble.

We asked the developers behind Instalover a little about how they built it, where the idea came from, and what the future holds.

Where did the idea of Instalover come from?

Chad: We wanted to create a spontaneous, adventurous way for people to go on dates. Most online dating sites require that you write out a profile, upload photos, respond to messages, figure out plans with potential dates, and so on. We wanted to git rid of all that hassle and just bring it back to the simplest possible idea: I want to meet someone right now.

Mike: A long, late night of failed Rumble ideas mixed with desperate loneliness. We then mixed that with some conversations with friends to realize that texting was the best medium for this.

We wanted to get people off the screens and onto the street.

Jason: Like Mike and Chad said, we wanted something different from typical Rumble apps (read: programmer-oriented web tools). We wanted to encourage spontaneity and adventure. As the web matures and becomes a more integral part of our lives, we’re seeing it move off the desktop and onto mobile devices. SMS interfaces can feel natural and casual, and a text-based dating app nestles the act of finding a date right alongside your other conversations with friends.

Rails Rumble required you to complete your app in just 48 hours. How much of that time was spent on Tropo?

Mike: Maybe half the time was spent playing with the Tropo API, experimenting with what was possible, writing a Sinatra app to simulate it for automated testing, and discovering new ideas based on the API docs.

What did you like best about using Tropo?

Mike: The IRC support was great before we had figured everything out, and afterward the fact that it’s just HTTP endpoints was a major benefit.

Other than Ruby and Tropo, what other tools went into the creation of Instalover?

Mike: We used the excellent Suspenders gem to get our app up and running quickly and without worry. Cucumber, Capybara, ShamRack, and Sinatra helped with the testing. Grooveshark provided the music to love by.

What are the future plans for Instalover?

Chad: We’ve been discussing various ideas for future improvement since we began work on the project. People are naturally skeptical toward blind date services, so we’re thinking about ways to remove psychological barriers to using the site, whether it’s having membership be on a referral basis, or by setting up double dates. We think there are obvious ways to monetize the service as well, by working with local businesses. We’re excited to see where we can go with it.

Mike: De-creepifying it, or over-creepifying it. We’ll go either way.

Jason: We want to focus on a core experience of having a fun, safe time going on blind dates. We’re planning to listen to feedback as it comes in for Boston, our launch city, and then grow into other places as we become more confident that we’re providing a great service.

All the ads for dating sites include people who met using their site and got married. You’ve been live for a week. Any marriages yet?

Jason: No marriages, but we have had people actually go on dates, which is a pretty exciting milestone for a brand-new startup!

Chad: We think it’s best if people take some time to get to know each other before making that decision.

Mike: Divorces are pending.

New Tropo Powered Startup – VivaGrams!

Monday, October 25th, 2010

Tropo was a proud Gold-level sponsor of Startup Weekend Phoenix this weekend.  Chris Matthieu was onsite participating in the event and was able to work hands-on with the team behind Marc Chung and Natalie Melchiorre’s brainchild idea, VivaGrams.com.

VivaGrams was pitched as a wellness startup helping early adopters change their behavior to become healthier and happier people.  Users of the site could work with their care providers to establish healthy nutritional and/or exercise based programs and receive reminders via phone calls, SMS text messages, or Twitter.

Of course, VivaGrams used Tropo for its Voice, SMS, and Twitter integration.  Within the first 15 minutes of the competition, Vivagrams was sending out SMS messages.  Within the next 30 minutes we were placing phone calls to users and collecting input via speech recognition.  The call script was as follows:

1. This call is from Vivagrams.

2. Did you eat your banana today? Say yes or press 1 or say no or press 2.

3. On a scale from 1 to 10 with 10 being awesome, how happy are you today?

4. Keep up the good work!

Next we added Twitter support to VivaGrams using the Tropo API.  We were initially looking to add Twitter support as Direct Messages but DMs are on the roadmap for a future delivery.  Instead we integrated Tropo as public tweets/mentions and found this to be as simple as sending and receiving SMS messages.  The only difference was linking the Twitter account and specifying Twitter as the network.

We proved that it was totally possible to build a company including the technology, brand, and business model in 54 hours!  We met a bunch of new friends and awesomely creative people from this event.  Here are a few other photos from the event!

Free Tropo Development Goes International

Wednesday, October 20th, 2010

Since Tropo launched last spring developers have enjoyed completely free accounts for development and testing.

While some companies provide you with a few measly dollars in credit for your testing, or make you start paying after a month, ready or not, Tropo feels that you shouldn’t have to pay for development and that the best person to decide if you’re ready for production is you.

Our commitment to free development has always included US phone numbers and no-cost phone calls to any number in the United States. Today we’re expanding that support to the international community.

Starting now, local phone numbers are available for free in 41 countries around the world. Just pick your location and we’ll assign you an available number in your home country. This makes testing Tropo applications easier than ever — it’s just a local call.

Need to test an app that makes calls? Those have been 100% free in development for calls to US numbers. We’re expanding that support internationally as well. In addition to the free calls to US mobiles and landlines that you’ve always had, our developer program now supports free calling to landlines in 17 other countries.

Tropo’s goal is to make it easy for developers to create, test and deploy voice, SMS, and instant messaging applications no matter where you live. Now you can build a truly global communications application. And until you move to production, it won’t cost you a dime.

What about SMS? For now, SMS is only available on US numbers. You can certainly send and receive worldwide, but you’ll have to use a Tropo number from the US to do it.

Here’s the countries where Tropo is offering free phone numbers to developers: Australia, Austria, Belgium, Brazil, Bulgaria, Canada, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hong Kong, Hungary, Ireland, Israel, Italy, Japan, Latvia, Lithuania, Luxembourg, Malta, Mexico, Netherlands, New Zealand, Norway, Panama, Peru, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, Switzerland, UK, US

Make outbound phone calls to landlines for free in Belgium, Canada (mobiles, too), Germany, Greece, Hong Kong, Hungary, Ireland, Israel, Italy, Luxembourg, Netherlands, Poland, Portugal, Spain, Sweden, Switzerland, UK, US (mobiles, too).

And remember, Tropo supports speech recognition and text to speech in lots of languages: Dutch, English (both UK and US varieties), French (French and Canadian), German, Italian, Spanish (Castilian or Mexican), and Polish.

Simple JavaScript SMS API: Text Messaging with Tropo

Monday, October 18th, 2010

So you want to build an application that sends and receives text messages?  SMS (Short Message Service) is widely used all over the world on mobile devices and can be a powerful notification/communications tool to connect to friends, customers or audience.  Even though the technologies behind sending and receiving these messages are relatively complex, sending and receiving text messages with Tropo is easy!

In this example we’re going to make a simple “Hello World” text messaging application using Tropo and JavaScript.  It should take you less than 10 minutes.

All you’ll need to try this example is  a Tropo account and a device capable of sending and receiving SMS text messages.   If you don’t already have a Tropo account, you can register for free at http://www.tropo.com/account/register.jsp and your login credentials will be e-mailed to you.  Once you have your credentials, click the Login link at the top right of the main Tropo site (tropo.com) and enter them in.   Go to Your Applications and then click on Create New Application.

SMS API JavaScript Tropo comes in two flavors, Scripting and WebAPI.  In this example, we’ll be using Tropo Scripting, so click on the Tropo Scripting Icon.

Javascript SMS API

In the box that says Tropo Scripting Application Name, type Hello World.  Next, click the link for Hosted File (next to What URL powers your app?), then click Create a new hosted file for this application.

SMS API JavaScript

Next you’ll see a pop-up window.  Type in the File Name box helloworld.js and then for the File Text, type (or copy/paste) these three lines of code:

answer()
say("Hello World") hangup

Tropo SMS API Javascript

After you’ve pasted the code, click Create File to save it, then when you’re returned to the New Application page, click the Create Application button to save your app.  Your screen should should now look something like this:

Tropo SMS API JavaScript

Click on the Add a new phone number link to get a standard phone number assigned (for free), then give it a few minutes to allow your application to propagate to our servers.

With your new app created and a phone number assigned, you’re ready to test! Send a text to the number, any text, and you should immediately receive the response “Hello World”.

That’s it!  You now have a working SMS application in its simplest form.  This should just be the beginning, though; the potential power of Tropo extends far beyond Hello World apps.  To delve deeper, check out this post: How To Get Started with SMS / Text Messaging on Tropo.com or go right to the Tropo SMS API docs.

If this helped you, please show us some love on Twitter.

How To Get Started with SMS / Text Messaging on Tropo.com

Monday, October 18th, 2010
SMS giapponese

Want to get started building text messaging apps on Tropo? Want to receive inbound SMS messages from customers and users? Or want to use texting as an easy way to do outbound notification?

Of all the channels Tropo supports, we’ve seen a great amount of interest in using text messaging… and why not? It’s simple to do with Tropo and supported internationally, too!

We’ve written a good bit about SMS apps in the past so I thought I’d show you the path to become an SMS expert with Tropo:

FIRST STEPS

You can start with these posts:

That’s it! Just create a (free) Tropo account and start creating SMS-enabled apps!

DIVING DEEPER

With the basics of adding SMS to a Tropo app in mind, you can grab any of these tutorial or sample applications as an app for you to try out:

All the sample apps are also available from our Github account and are available for JavaScript, Ruby, PHP, Python or Groovy.

We’ve also written a range of other blog posts related to SMS. One you may want to check out is “Get a text message when someone calls your app” which shows a very cool way to add one line of code to your app and start receiving SMS notifications every time someone connects to your application.

We’ll be writing more about SMS and showing more examples of SMS-enabled apps in the weeks ahead, so please do check back – or follow Tropo on Twitter or Facebook to stay up with what’s new.

Meanwhile, the VERY first step is to create your Tropo account and try it out now!

Note: Flickr photo courtesy of alexscarcella

New tropo-webapi-ruby Gem Released

Friday, October 15th, 2010

We have just released the latest tropo-webapi-ruby v0.1.9 gem to RubyGems.org. This release includes the following updates:

  • Fixed the start_recording so it does not require a ‘name’ parameter
  • Aliased start_call_recording -> start_recording
  • Aliased stop_call_recording -> stop_recording
  • Fixes to the README
  • Fixed the yardoc install
  • The Tropo::Generator.parse method will now take a JSON string or a Ruby hash.
  • Fixed the start_recording so it does not require a ‘name’ parameter- Aliased start_call_recording -> start_recording- Aliased stop_call_recording -> stop_recording
  • Fixes to the README- Fixed the yardoc install- The Tropo::Generator.parse method will now take a JSON string or a Ruby hash.

To install the latest gem simply do ‘sudo gem install tropo-webapi-ruby’.

Go Multilingual with Tropo AGItate

Thursday, October 14th, 2010

Tropo supports 7 languages with 4 dialects for speech synthesis (TTS) and voice recognition (ASR) for developing voice apps. The supported languages today are:

  • English (American and British)
  • Spanish (Castillian and Latin American)
  • French
  • German
  • Polish
  • Dutch
  • Italian
  • (more to come…)

Here is a simple Adhearsion diaplan using Tropo AGItate that takes advantage of these languages:

require 'open-uri'

tropo_agi {
  # A hash of all of the langauges we have on Tropo via Tropo AGItate
  voices = { :es => { :lang => 'Spanish', :name => 'Carmen'   },
             :de => { :lang => 'German',  :name => 'Katrin'   },
             :it => { :lang => 'Italian', :name => 'Paola'    },
             :nl => { :lang => 'Dutch',   :name => 'Saskia'   },
             :fr => { :lang => 'French',  :name => 'Florence' },
             :pl => { :lang => 'Polish',  :name => 'Zosia' } }

  text = 'The color of the trees in the fall is always spectacular!'
  # Google Translate URL
  translate_uri = "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=#{text}"
  play text

  voices.each do |voice|
    # Do the translation of the text
    url = URI.encode(translate_uri + "&langpair=en|#{voice[0].to_s}")
    translation = JSON.parse(open(url).read)

    # Switch back to our default voice to announce what we are about to play
    execute "voice", "default"
    play "Now in #{voice[1][:lang]}"

    # Now play back the translated string, if we received one, in the appropriate language
    if translation['responseData']['translatedText']
      execute "voice", voice[1][:name]
      play translation['responseData']['translatedText']
    end
  end

  execute "voice", "default"
  play 'Thanks for listening! Goodbye.'
  hangup
}

In this case we are using the Google Translate API to perform the translation of our text to play back in each language supported. Watch this script in action:

Outbound with Tropo AGItate

Thursday, October 14th, 2010

We have shown you Tropo AGItate and how to mix it with Asterisk to add Tropo capabilities. Now, its time to show how to create outbound calls using the Tropo Session API, all using AGItate, Adhearsion and CouchDB.

For this example we will show an Italian catering company calling out to their appointments to ask them which shape of pasta they would like to have at their party. I have written an Adhearsion component that selects customers to call from the database. The component then launches an outbound request to Tropo, which in turn is handled by the Adhearsion dialplan via Tropo AGItate. Watch it in action:

The code for the component may be found on Github as couchdb-dialer. Enjoy!