Search

Archive for the ‘Uncategorized’ Category

Welcome to the new “Voxeo Labs” design and site

Monday, April 19th, 2010

Welcome to the new look of “Voxeo Labs”! After our announcement of Voxeo Labs last July, the domain “labs.voxeo.com” simply went to a static web page on our site with some basic information about Labs activities. While that was perhaps fine as the team started up, we decided with 2010 that we needed to more easily provide more dynamic content and get you information about all the cool things we’re cooking up in the Labs. So this new redesign is a start… this now combines our static content with the Voxeo Labs blog… and then will have individual pages for each of the projects associated with Voxeo Labs… like, oh, this one! We’re still building those pages out and you can see more soon.

That’s the news… we’ve got a spiffy new WordPress theme, new logos and more… we’d love to hear what you think about it – and do let us know if you see any funky in the display of content. Thanks!

Posting Tropo Transcriptions to Google AppEngine

Thursday, August 27th, 2009

Now that Tropo offers transcriptions, I would like to provide another example of using cloud services to manage your transcription results. In this case we will use Google AppEngine’s (GAE) Java implementation by deploying with JRuby, leveraging a similar architecture to what we use on Tropo for hosting our scripting languages.

I have created another Sinatra application (tropo-transcriptions) that provides an HTTP REST API for receiving POSTs of transcriptions from the Tropo cloud. The same application then allows you to get those results, either by fetching all or a single transcription. The app takes advantage of Google’s BigTable on GAE, storing all of the transcriptions right in the cloud in a schemaless data store. Using the unofficial Ruby/JRuby Google library, appengine-jruby, I have already created everything you need to simply download and deploy the application. This means that it already has JRuby and all of the Ruby gems baked into the app, so you get running with minimal fuss.

The first step is to install the google-appengine gem and download the tropo-transcriptions source code (you may do a Git clone or download from Github):

TropoTranscriptionInstall

After having signed up for Google AppEngine and creating an application, then you need to make one configuration change to your application you just downloaded. Editing the file tropo-transcriptions/config.ru, make the following change to line 3:

:application => 'tropo-transcriptions'

becomes:

:application => 'your-app-name'

Then the last step is to deploy your application to Google AppEngine. To do this simply cd into your application’s directory and enter:

  appcfg.rb update .

You will be prompted for your GAE username and password and you should then see:

TropoTranscriptionDeployGAE

Thats it, you are now up and running. There are now three resources available on your new HTTP web services app:

1. POST to receive transcriptions

  http://your-app-name.appspot.com/receive_transcription

2. GET to fetch all transcriptions

  http://your-app-name.appspot.com/transcriptions

3. GET to fetch a single transcription based on GUID

  http://your-app-name.appspot.com/transcription?guid=5fad8750-7316-012c-00bd-0400580fde23

Now, you may start using your new server to store your transcription results. Simply use the first URL in the transcriptionOutURI portion of your recording request of your Tropo script:

  answer
  say 'Welcome to ruby recording test'

  event = record('Say something after the beep.',
                           { :repeat              => 0,
                             :bargein             => true,
                             :beep                => true,
                             :silenceTimeout      => 2,
                             :maxTime             => 30,
                             :timeout             => 4,
                             :recordURI           => 'http://tropo.to-a-domain.com/post_audio?filename=file123456.wav',
                             :transcriptionOutURI => 'http://your-app-name.appspot.com/receive_transcription',
                             :transcriptionID     => '123456' })

  log 'Recorded file: ' + event.recordURI
  say 'Thanks for your testing ruby on Tropo platform'
  hangup

Make a few calls and you should see this when you put the second URL above in your browser:

TranscriptionResult

There is more to come…