Archive for May, 2010

Tropo at Cluecon

Saturday, May 29th, 2010

One of the events we’re pretty excited to be involved with this summer is Cluecon. This three day conference in Chicago is all about developing telephony apps; lots of open source, lots of hacking on telephony. If you’re building telephony products or involved in any open source telephony project, you belong at Cluecon. A bunch of us from Voxeo Labs will be attending.

Tropo is a sponsor of the conference. Mention Tropo when you register and you’ll get $50 off registration. Come find us while you’re there, and you’ll get more goodies from us.

Register now.

Skype Journal interviews Tropo at Google I/O

Saturday, May 29th, 2010

At Google I/O last week, Phil Wolff from the Skype Journal interviewed me about Voxeo Labs and Tropo.

In the 5 minute video, I talk about what Tropo is and why it’s a revolutionary platform helping developers build cross channel communications applications.

Tropo’s in Poland, so we’re speaking Polish

Friday, May 28th, 2010

This weekend, Jason Goecke is at Euruko, Europe’s Ruby conference talking about Tropo. Since Euruko is held in Krakow, Poland we’ve added a little something for the locals.

result = ask '1 teraz proszę powiedzieć', {:voice =>"zosia",
                                           :choices => "jeden",
                                           :recognizer => "pl-pl"}

That’s right, Tropo’s speech recognition and text to speech both now include Polish.

Polish speech recognition can be triggered by setting your recognizer to “pl-pl” on ask() or conference(). And for text to speech you have your choice of voices: “zosia” for female or “krzysztof” for male.

We added it for a Ruby conference, but it’s available in every programming language.

Here’s PHP:

<?php
$result = ask('1 teraz proszę powiedzieć', array(
                                           'voice' =>"krzysztof",
                                           'choices' => "jeden",
                                           'recognizer' => "pl-pl"
                                        ));
?>

Oh, for those that don’t speak Polish, the examples say “Say one now” and then have “one” as the choice.

Dial Multiple Phone and SIP Numbers & First to Answer Wins

Wednesday, May 19th, 2010

Courtesy of Mark Hillary

In order to support @zlu‘s OpenVoice project release for Google I/O we have introduced a new feature to Tropo that allows you to dial multiple phone numbers at once. Multiple number dialing not only supports phone numbers, but SIP addresses as well. The first endpoint to answer, whether a phone or SIP device, will get the call and your application will move onto the next step in your WebAPI session (coming to scripting soon).

To take advantage of this new feature, the call object in WebAPI now takes an array of addresses (‘tel:’ or ‘sip:’) in the ‘to’ parameter. A Ruby Sinatra example:

%w(rubygems sinatra tropo-webapi-ruby).each { |lib| require lib }

post '/dial-numbers' do
  tropo = Tropo::Generator.new do
    call :to => [ 'tel:+14155551212', 'tel:+15105551212' ]
    say 'Hello, happy you were the first phone to answer!'
  end
  tropo.response
end

The corresponding JSON that is generated:

{
   "tropo":[
      {
         "call":{
            "to":[
               "tel:+14155551212",
               "tel:+15105551212"
            ]
         }
      },
      {
         "say":[
            {
               "value":"Hello, happy you were the first phone to answer!"
            }
         ]
      }
   ]
}

Thats it, now of those two numbers the first to pick up will get the phone call. Enjoy!

Introducing OpenVoice. Your number, Open Source.

Wednesday, May 19th, 2010

OpenVoiceLong time Tropo developer Zhao Lu launched OpenVoice today. OpenVoice is a virtual number application that can forward calls, handle voicemail (with transcriptions), send and receive SMS, and make outbound calls from your OpenVoice number. And because OpenVoice is built on Tropo, it has built in support for speech recognition and phone numbers are available from around the world.

OpenVoice is built with Ruby on Rails using the Tropo WebAPI to communicate with the phone system, and Tropo has signed on as a contributor to the project. We’ll be using OpenVoice to show off how to build Sophisticated Tropo applications and using the OpenVoice code and use cases to create tutorials for Tropo features. You can bet in the future that when we add a new feature, we’ll describe how to implement it by using OpenVoice as an example.

We’re launching OpenVoice alongside Zhao today at Google I/O and we’ve packed it with all sorts of Google technologies.

  • Android Client
  • Voicemail notifications and transcriptions delivered over Google Talk
  • Call logs displayed on a google map
  • Import contacts from Gmail
  • Some other hidden goodies

In addition to those, we’ve developed a version of OpenVoice that can run on Google App Engine and uses your Google Account as a single signon platform.

Using Tropo as a platform allowed us to create OpenVoice in under 4 man-weeks. We went from idea to implementation in less than a month. Because of the Tropo underpinnings, developers have a full API they can work with to implement features of their own or interact with their phone for them.

Want to see OpenVoice in action? Stop by and visit Voxeo in the Google I/O Sandbox today and tomorrow. Not at I/O? Chris Matthieu, one of the OpenVoice developers put together a 10 minute video overview. Or download a copy of the code from Github and try it out for yourself.

What is Multi-modal?

Tuesday, May 18th, 2010

We’ve talked a bit about how text communications are on the rise, replacing a lot of the voice self service that companies have traditionally offered. Text doesn’t always replace voice, however. With platforms that can work over both voice and text, it’s possible for text to augment the voice channel.

Take the example of directory assistance. Back when I was a kid, you called directory assistance, gave a business name (to a real human!) and they gave you the phone number. You wrote down the number and gave the business a call. Over time, companies started offering a service where they’d transfer you to the number, letting you skip writing it down and dialing yourself. With mobile phones, this service became even more important, as you’re often calling for assistance when you can’t stop and write something down.

An issue sometimes arises, however, when the number is busy. Or you get disconnected and have to call back. Since you didn’t pick up the number from the directory assistance but were transferred by them, you end up having to call back, ask for the business again, and get transferred again.

Multi-modal to the rescue.

Imagine if your phone company didn’t just transfer you to the number, but also sent you a text message with the business name, number, and address. That’s a multimodal conversation. You start out communicating in one channel (voice) and end up finishing the conversation or getting supplementary information via another (text).

As an example of multimodal applications, I’ve updated our Tropo Local Search demo. If you call from a mobile phone and look up a restaurant, you’ll get a text message containing the contact information of the listing you selected. Give it a try by calling (415) 894-9965 and finding coffee, pizza, or some other type of food in your neighborhood. And of course, the code is available in our documentation or on Github.

Moving your application beyond the browser

Tuesday, May 18th, 2010

Voxeo is at Google I/O this week, and one of the products we’re showing off is Tropo. Telephony and SMS seems like a big complicated problem to most people, and they’re amazed when they see how easy and powerful Tropo is.

A decade ago, telephony required all sorts of complex hardware, specialized programming languages, and knowledge of how phone systems worked. Voxeo was founded to make it easy for developers to build applications that run over the phone. The last few years have seen telephony adopt web programming technologies like VoiceXML and web services APIs. We’ve also seen the costs of implementing real time communications come down. Coupled with the rise of hosted and cloud services meaning you don’t need to install or set up VoIP servers, an age of real-time communications is dawning.

More and more consumers are beginning to prefer text over voice. A whole generation is just as likely to communicate over text messaging, IM, and social networking as they are to pick up the phone. If the last decade was about the rise of the telephony developer, the next will be about the demise of voice as SMS, IM, and social media take precedence in consumers minds. To help developers with this transition, Tropo takes the concepts we’ve developed for voice applications and applies them to communications in any form.

Applications developed for voice with Tropo work over SMS, IM, and Twitter, with no additional programming required. Sure, you’ll probably want to tweak the output to be more appropriate for the medium, but it’s not strictly necessary.

Want to see just how easy it is to build a Tropo application? Take a look at our mashup with the San Francisco Bay Area Rapid Transit (BART) schedules. Using your phone or IM you can see when the next train is due to arrive at the station of your choice. Call or SMS (407) 374-9954 or send an IM to bartdemo@tropo.im with Google Talk to try it. You can even talk to @tropobart on Twitter. Tropo treats Twitter as an IM network, sending all @mentions to your application just like an instant message would be.

The code behind this is written in Ruby and can sit in our cloud or on the web server of your choice. Other sample applications are available covering everything from simple games to directory assistance, to checking into Foursquare.

Get started building your own application today by creating a Tropo account. Tropo is 100% free for developer usage, so there’s no cost or risk involved in trying it out. You can even take advantage of our world class support, available 24 hours a day.

tropo-webapi-ruby Gem v0.1.8 Released

Friday, May 14th, 2010

We have made a few enhancements to the tropo-webapi-ruby gem today:

  • You may now set a default ‘voice’ for speech synthesis/text-to-speech for an object
  • You may now set a default ‘recognizer’ for speech recognition/asr for an object
  • The gem is now compatible with Ruby MRI v1.8.6
  • Unit tests pass on Ruby MRI v1.8.6/v1.8.7 and JRuby v1.5.0

To take advantage of the new default voice capability, you simply set it as follows:

t = Tropo::Generator.new(:voice => 'simon')
t.say 'Hello there!' # This will now render with the UK British voice Simon
t.response

# or

t = Tropo::Generator.new
t.voice = 'simon'
t.say 'Hello there!' # This will now render with the UK British voice Simon
t.say 'What time is it?', :voice => 'kate' # You may still overwrite the default on a method basis
t.response

To take advantage of the new recognizer capability, you simply set it as follows:

t = Tropo::Generatory.new(:recognizer => 'fr-fr')
t.ask 'Bonjour!', :voice => 'florence' # This will now use the French speech recognition engine
t.response

# or

t = Tropo::Generatory.new
t.recognizer = 'fr-fr'
t.ask 'Bonjour!', :voice => 'florence' # This will now use the French speech recognition engine
t.ask 'What time is it?', :recognizer => 'en-gb' # You may still overwrite the default on a method basis
t.response

The gem has already been posted to Rubygems.org. Enjoy!

Checking into Foursquare with your voice

Thursday, May 13th, 2010

Earlier today Jason Dowdell mentioned on Twitter

Wish there was an iPhone app mashing up Foursquare search via IVR so I can log more places during my long runs.

Sounded like a great idea, so I wrote something up.

The code is available in the Tropo Samples project on Github.

This app is built using the WebAPI and the Tropo PHP class, a library for building Tropo apps.

There’s no way to determine your location when you’re calling in. We could always ask you to say your zip code and address, but doing that is beyond the scope of this simple example. Instead, this code checks to see where you last checked in at and lists the top 10 locations nearby, starting with places you commonly check in.

It’s then building a grammar using those locations. To check into Foursquare you provide a venue ID to the Foursquare API, so I need your selection to return an ID. To do this, I’ve used a simple grammar with the venue ID as the value and the venue name and touch tone options as alternate terms.

The grammar ends up looking like this:

868323 (Ancil Hoffman Park, 4), 1394352 (Starbucks, 5), 3484626 (Autumn Woods, 6), 2933197 (AutoMedics, 7), 1009591 (palm street pub and grill, 8), 2194297 (The InLaws, 9), 2316377 (One on One Workout, 0)

This way, if someone says “Ancil Hoffman Park” or presses “4″ the grammar will match and return “868323″, the Foursquare venue ID.

Once I have a venue ID, I check into Foursquare by posting the ID to their checkin API. Foursquare returns the same message you’d see on your mobile app, “Okay, we’ve got you at…” and I play it. If foursquare has a note about the mayor being changed, that gets played back too.

If you want to play with this code in your account, just download it from github and put it on your server. You’ll also need the Tropo PHP library. Then add your Foursquare username and password to the top of the code and give it a call.

Scaling Your Twitter Support, Part 1: Adding a “Night Service” via Tropo.com

Friday, May 7th, 2010

What do you do if your use of Twitter for customer interaction is wildly successful? How do you scale your support for using Twitter for customer service, customer support or other topics? Do you hire a bunch of extra people? like Staples did? Or do you look at using tools and services to help your existing staff through automation and/or augmentation of the staff’s efforts?

If you have been reading previous posts about Tropo and Twitter or if you follow me on Twitter, you’ll know I’m a wee bit passionate about the service… and this particular question continues to intrigue me:

How do you scale your Twitter support?

Obviously you can hire a bunch of people to help with responding to tweets, like Staples and Comcast (which once upon a time had only Frank Eliason on Twitter but now has a whole crew). You can have them work different shifts or be in different parts of the world to help with coverage. You can do all that, if you can afford to do so.

But for many companies, that may not be an option… and so ever since we introduced support for developing Twitter applications in Tropo.com, I’ve been thinking about how you could use Tropo to automate and augment your Twitter support. In a couple of presentations about Unified Self-Service, I’ve mentioned having a couple of people who support Twitter interaction and asked the question:

What do you do when those employees go home for the evening?

Do you:

  1. Wait to respond to all Twitter inquiries until the next business morning?
  2. Require your staff to check every few hours to respond?
  3. Require your staff to work off hours to have 24×7 coverage?

Many companies probably treat Twitter messages like email or phone… “we’ll get back to you tomorrow”… but what if you want to provide a higher level of service? What if you want to help people by pointing them to your website?

A SOLUTION?

One solution that came to my mind was to resurrect the “night service” idea from the telephony days… create an automated agent attached to your Twitter account that only replies to Twitter messages during certain hours.

This turns out to be ridiculously simple in Tropo! Here’s a VERY basic implementation in python:

from datetime import *
answer()

if datetime.now().hour not in range(12,21) :
    say("Our offices are currently closed. We will reply to your tweet as soon as we can but in the meantime, please visit http://www.tropo.com")

hangup()

That’s it.

NOTE: Time on Tropo servers is in UTC/GMT, so you need to adjust offset accordingly. US Eastern Daylight Savings Time is +4 hours, so 5pm is 17:00 EDT = 21:00 UTC. My example code, therefore, does NOT respond between the hours of 8:00 am and 5:00 pm US Eastern time.

MAKING IT SMARTER

Now, this example is exceedingly dumb. It simply fires back a single tweet as an “@” response to any mention of the Twitter account. This is probably not what you want, given that it doesn’t differentiate between a “reply” to your Twitter account (where the “@username” is at the very beginning) and just a reference to your Twitter account in the body of a tweet.

So how do you tell the difference?

It turns out that there is a simple way (and yes, we need to document this better). If the Twitter message is a “reply” with your “@username” at the beginning of the tweet, your Twitter username is removed before the tweet text is sent to your app. If the Twitter message mentions your Twitter username, it is just included in the message text. The rationale here is that a reply is pretty much like an instant message or SMS … and so we are making it easy for your app to treat IM, SMS and Twitter replies in the same way. Regardless, the “currentCall.initialText” variable is loaded with the text that was sent to your account – your Twitter username is just stripped out if it is a reply message.

The end result is that you can determine if the message is a “reply” (or “public message”) to your twitter account by testing for the absence of your Twitter name.

Modifying the code above to respond to only messages versus mentions, it looks like this in Python:

from datetime import *
answer()

if datetime.now().hour not in range(12,21) :
    if currentCall.initialText.find("@stratohelp") == -1:
        say("Our offices are currently closed. We will reply to your tweet as soon as we can but in the meantime, please visit our web site at www.tropo.com")

hangup()

In this case, the python string function “find” returns a “-1″ if the string is not found. The Twitter username I’m showing here is “@stratohelp”, which you obviously need to replace with your own account name.

Now, again, I’m still sending out only a very basic message. I could start adding more functionality to this to make it smarter. Features like:

  • Scanning the “initialText” for keywords and responding back with specific URLs. For instance, pointing people to a FAQ entry for particular phrases.
  • Performing other actions based on keywords in the tweet, like sending email or a SMS to a certain person within your company.
  • Using the Twitter ID (found in currentCall.callerID) to personalize the message back, perhaps by doing a dip into a database to retrieve info.

There are many more actions you can take… and I’ll look at some of those in the next posts in this series.

TRYING IT OUT

To try this yourself, just:

  1. Login to your Tropo.com account (or sign up for a free developer account).
  2. Create a new application and set it to only respond during certain hours (remembering the UTC offset). If you copy/paste my code above, name the file ending in “.py”.
  3. Follow these steps to link a Twitter account to your Tropo app.
  4. Try out sending tweets to that Twitter account during both the time the app should respond and when it shouldn’t.

Note: When you are developing and testing an app, please do remember the restrictions on duplicate tweets… your app will not be able to keep sending the identical response to the identical Twitter account, so you may want to have multiple Twitter IDs for your testing.

Have fun with it… and please do let me know if you do anything cool with a Twitter app. I’d love to write about other fun uses here. Also, if you have examples similar to the code I’ve done above in languages other than python, please let me know as a comment here or as an email and I’d be glad to add them here as additional examples.