Archive for the ‘Audio’ Category

Tropo Jambox Megaphone

Monday, December 19th, 2011

After rocking out to a little White Stripes’ Icky Thump, Chris Matthieu shows you how to build a megaphone using a Jawbone Jambox, an iPhone, and the Tropo Scripting API!

Here’s the Ruby script used in the video:

say "Welcome to the Tropo megaphone app! Please turn on and pair your Jam box now."

while $currentCall.isActive do

record "Record your message at the beep and then switch audio to jam box.", {
        :beep => true,
        :timeout => 10,
        :silenceTimeout => 7,
        :maxTime => 60,
        :onRecord => lambda { |event|
            log "Recording result = " + event.recordURI
            say event.recordURI}
        }

end

Rock on!

The People’s Skype for the #Occupy Movement

Monday, December 5th, 2011

This is a guest blog post by Jonathan Baldwin showcasing an application that he wrote using Tropo called The People’s Skype. It’s phone-powered, distributed voice and voting system for the #Occupy Movement!

As the Occupy Wall Street movement grew in popularity at Zucotti Park in NYC, and other occupations in North America, Jonathan noticed a problem with the primary method occupiers used to communicate in large groups. The People’s Mic, a method of augmenting a speaker’s voice by having listeners repeat their words, didn’t scale up when huge numbers of people attended rallies and General Assemblies. In these cases, the audience had to repeat the speaker’s words multiple times before it reached the far edges of the crowd – it became gradually harder to understand the original speaker’s words the further you are from the inner circle.

Motivated by this, Jonathan was determined to find a simple solution that anyone had access to. There were similar talks amongst the OWS Tech groups about ways to solve this problem, but those ideas never panned out (they included handheld radios and VoIP systems). He also wanted to address another problem of General Assemblies – hand signals are used to communicate consensus with ideas. In a massive crowd, it is hard to express opinion through visual cues, so he wanted to integrate this problem into a one package solution.

Thus, Jonathan created a one-way conference call solution, called The People’s Skype, through the Tropo phone system. Using PHP, MongoDB and Tropo, he created a simple interface that anyone with any kind of phone, no matter how old, could dial in and create a unique mic with. Upon mic creation, the speaker is given a 4 digit PIN to distribute to others that want to listen in (by holding up a sign or word of mouth). Anyone can call to the original number and listen by typing the unique PIN. Only the speaker is able to talk, while listeners can vote on issues by using their dial-tone, phone keypad (1 for Yes, 0 for No, etc.).

As the Tropo conference call system is able to support hundreds of people, audience members can either turn their speakerphones on to create a distributed PA system, or listen directly on their handsets. Due to the applications flexibility, it could potentially help fragmented occupiers communicate across police barriers or kettled areas.

Try out The People’s Skype yourself: http://www.peoplesskype.org! You can also download a copy of Jonathan’s source code from Github.

Customer Spotlight: FetchNotes

Friday, November 4th, 2011

We finally got a chance to catch up with the guys (@_chaselee and @alexschiff) behind the popular new notes service called FetchNotes!

What makes FetchNotes so cool? For one, it has a super simple web UI. The entire site behaves like an app and leverages Python’s Tornado Webserver and AJAX to add and tag notes without lifting your fingers from the keyboard. Tags are basically hashtagged keywords in the note that allow the app to categorize notes by topic.

Secondly, FetchNotes leverages Tropo to deliver a truly multichannel communications experience. Today FetchNotes extensively leverages Tropo’s SMS services but the team has already started working on adding Tropo’s Voice with transcription service as well as Tropo’s Instant Messaging services on all of the IM networks including: GTalk, Yahoo!, MSN, AOL, and Jabber! We may even see support in the near future for in-browser, voice-powered note taking using Tropo’s Javascript Phone API, Phono.

Thirdly, Chase and Alex are working to add groups and third-party integration into other services such as GitHub or Google Calendar. This would allow developers, testers, and users to take a note about a #feature or #bug and tag it accordingly and watch the note get pushed to other services as GitHub issues or even calendar entries on Google!

The FetchNotes service is still in private beta but the first 50 new subscribers that click on fetchnotes.com/invite/tropo will be allowed to register for the service and check out the new coolness first hand!

Deploying Tropo based applications to CloudFoundry with Grails

Tuesday, July 5th, 2011

Cloud Foundry is a Platform-as-a-Service platform that lets you deploy Spring, Grails, Rails and Node.js applications in the cloud. We’ve already shown in previous blog posts how you could easily create Tropo-powered Grails applications with Tropo’s Grails webapi plugin. However, in this blog post I’m going to show you an screencast in which you will learn how to deploy your applications to CloudFoundry.

As you will see in the screencast, deploying your Tropo applications with Grails to CloudFoundry is really easy. A few commands and you get your application not only in one, but in two cloud platforms!! So, you’ve got on one hand Tropo’s cloud platform which lets you run voice powered applications that can quickly scale and on the on the other hand you run all the business logic in CloudFoundry’s cloud platform. So you don’t have to worry about server and resources provisioning and you can take advantage of CloudFoundry’s infrastructure to scale.

So, here is the screencast:

Also, be sure to check these links to get extra information:

Hope you like it!!

Tropo-Powered Hamradio Callsign Lookup App

Wednesday, April 6th, 2011

Ham radio or amateur radio communications has been around since the early 1900s.  Ham radio technology has kept pace with traditional communications and may even be the only technology that allows people to communicate in natural disasters.  Ham radio operators can communicate over very far distances using HF (high frequencies) as well as through satellites via AMSAT and even using VoIP over the Internet using EchoLink, IRLP, or D-STAR!

There are nearly 750,000 FCC licensed ham radio operators in the United States and over 3M licensed operators worldwide.  Each operator has federally issued callsign that is used to uniquely identify the station operating on the band.

Using Tropo and Callook (Josh Dick’s W1JDD Callsign API), Chris Matthieu (N7ICE) was able quickly develop a speech recognition and text-to-speech based telephony app that is accessible by any of the following channels:

Voice and SMS: 1-480-374-3234

Skype: +990009369991489376

VoIP / SIP: sip:9991489376@sip.tropo.com

Phono: app:9991489376

Upon calling the application, you are asked to spell a callsign using military phonetics:

A – Alfa, B – Bravo, C – Charlie, D – Delta, E – Echo, F – Foxtrot, G – Golf, H – Hotel, I – India, J – Juliet, K – Kilo, L – Lima, M – Mike,  N – November, O – Oscar, P – Papa, Q – Quebec, R – Romeo, S – Sierra, T – Tango, U – Uniform, V – Victor, W – Whiskey, X – X-Ray, Y – Yankee, Z – Zulu

In addition to these commands, you can say restart to start over or stop if your callsign is entered correctly.  Upon saying stop, the Tropo application does a REST-based call to Callook to get a JSON response of the data related to the callsign inquired.  In addition to the communication channels listed above, Chris Matthieu was able to use his handheld hamradio (like the one featured above) to communicate using VHF (very high frequencies) to connect to a repeater nearly 50 miles away on a mountaintop and connect to Tropo via an auto-patch phone line to perform a callsign lookup.  Here is a screencast and source code for the application!

Here is the source code running on Tropo’s Scripting API:

require 'rest_client'
require 'json'

answer
sleep 2
say "welcome to the tropo ham radio call sign lookup application"

callsign = ""
callsigntext = ""

loop do

  result = ask "spell the callsign phonetically. say stop when done or restart to start over", {
      :choices => "alpha, bravo, charlie, delta, echo, foxtrot, golf, hotel, india, juliette, kilo, lima, mike, november, oscar, papa, quebec, romeo, sierra, tango, uniform, victor, whiskey, xray, yankee, zulu, one, two, three, four, five, six, seven, eight, nine, zero, stop, restart"}

  if result.value == "stop"
    break
  elsif result.value == "restart"
    callsign = ""
    callsigntext = ""
  else
    callsigntext = callsigntext + " " + result.value
    say "so far you entered #{callsigntext}"

    letter = case result.value
     when "alpha" then "a"
     when "bravo" then "b"
     when "charlie" then "c"
     when "delta" then "d"
     when "echo" then "e"
     when "foxtrot" then "f"
     when "golf" then "g"
     when "hotel" then "h"
     when "india" then "i"
     when "juliette" then "j"
     when "kilo" then "k"
     when "lima" then "l"
     when "mike" then "m"
     when "november" then "n"
     when "oscar" then "o"
     when "papa" then "p"
     when "quebec" then "q"
     when "romeo" then "r"
     when "sierra" then "s"
     when "tango" then "t"
     when "uniform" then "u"
     when "victor" then "v"
     when "whiskey" then "w"
     when "xray" then "x"
     when "yankee" then "y"
     when "zulu" then "z"
     when "one" then "1"
     when "two" then "2"
     when "three" then "3"
     when "four" then "4"
     when "five" then "5"
     when "six" then "6"
     when "seven" then "7"
     when "eight" then "8"
     when "nine" then "9"
     when "zero" then "0"
    end

    if letter
      callsign = callsign + letter
    end

  end

end

response = RestClient.get 'http://callook.info/' + callsign + '/json'
data = JSON.parse(response)

say callsigntext + "belongs to "
say data["name"]
say "in " + data["address"]["line2"]
say "and holds a " + data["current"]["operClass"] + " license"

How to Build a VoIP-Based Baby Monitor

Thursday, February 17th, 2011

Two members of the Phono/Tropo team, and soon a third member, have recently added new babies to their families. Congratulations Mark, Justin, and John!

All of this excitement got the hacker in me thinking…  What would a modern Baby Monitor look like today?  Armed with the Phono and Tropo APIs, I started hacking and 2 hours later had the following example application to share with you!  Here’s the link to the demo.  Let us know what you think! http://phonophone.heroku.com/babymonitor.html

Phono, the jQuery WebPhone from the Tropo team, runs in the web browser to monitor activity in the room where it is running.  Tropo is used to manage the baby monitor’s conference room (based on the access code) and the dial-in numbers to listen to the baby monitor via PSTN, Skype, SIP, or iNum.  The Phono side of the conference is unmuted so you can hear activity while the Tropo side of the conference is muted.  You can have many people (Mom, Dad, Grandparents, etc.) dialed in listening to the same baby monitor using any combination of the access channels listed above.

Check out the Phono Blog to learn more about this demo and see the source code!

QR Code Fun with Tropo!

Friday, January 14th, 2011

qrcode Have you seen one of these codes before?  They’re called QR Codes and can be used on mobile phones to direct your browser to a specific web page or even display more information (4,000 characters) about a product or event.  They can also be used to dial phone numbers and send SMS messages too!

Some mobile phones ship with pre-installed QR Code readers on them but more often than not, you will need to go into your phone’s AppStore and download one for your device.  Once your your scanner is loaded – point it at this code – I DOUBLE DOG DARE YA!

This code was generated to call a phone number associated with the following Tropo script:

say "http://hosting.tropo.com/13539/www/audio/rickroll.wav"
say "http://the-ppole.com/audio/Hotlinkers.mp3"

This Tropo script is running on our Scripting API and basically announces that you are about to be “Rick Rolled” and then proceeds to play to famous Rick Astley song “Never Gonna Give You Up” from some random MP3 link on the Internet.  Imagine the fun that you could have with combining QR Codes with Tropo numbers to route mobile phones to your new killer Tropo application!

I used a QR Code generator from Kaywa to create the image you see above.  Here’s an example of how easy it is to create:

Have Fun!

Heroku and Tropo Like Peanut Butter and Chocolate!

Tuesday, September 28th, 2010

Peanut butter and chocolate!

Who doesn’t love peanut butter and chocolate? By themselves, they are equally delicious but together, they are irresistible!

The same can now be said about Heroku and Tropo.  Heroku is the super simple cloud hosting platform for Ruby and Ruby on Rails web applications.  While Tropo is the super simple cloud hosting platform for communications applications including Voice, SMS, IM, and Twitter.

While Tropo works with any web programming language, we have been seeing more and more Ruby applications being developed using Tropo’s WebAPI. Traditionally deploying an application took just about as much time as actually writing the application.  This is no longer true with Heroku’s cloud hosting platform.

Deploying a Ruby application to Heroku is as simple as issuing the following commands from your terminal window:

> heroku create

> git push heroku master

Equally as simple to deploying your application to Heroku is writing your multi-channel communications application using Tropo like this hello world application that can be accessed via the telephone using Voice or SMS or via Instant Message or Twitter:

answer

say “Yes, Tropo is this easy!”

hangup

Now on to the how-to video and Heroku deployment instructions located at http://tropo.heroku.com!

Heroku & TropoTo demonstrate this yummy combination of technologies (Heroku and Tropo), Mark Silverberg (student and talented freelance Tropo developer) built a powerful Voice and IM application using Ruby and the Sinatra Framework and walks us through his 3.5 minute start-to-finish deployment of this application on the Heroku platform!

Mark’s multi-channel application is a volunteer finder service that provides information on volunteer opportunities in your zipcode.  The application can be accessed by calling +99000936 9991456957 via Skype or by IMing volunteer1234@tropo.im.  Mark’s Ruby code can be found on GitHub along with deployment instructions hosted on Heroku at http://warm-spring-38.heroku.com/

Now follow along with this video at http://tropo.heroku.com to learn how to build and deploy your next billion dollar idea using Heroku and Tropo!  Leveraging Heroku and Tropo gives you the best of advancements in cloud technology available today.  Heroku’s cloud technology allows you to scale your web application while Tropo’s cloud technology allows you to scale your communications applications.  These hybrid cloud technologies provide you, the web developer, with peace of mind and assurance that when your new application goes viral, we can easily scale to meet your demand.  Best of all, both cloud platforms offer free entry points to kick our tires and try us out.

So what are you waiting for?  Taste our peanut butter and chocolate now at Heroku and Tropo!

Teaching Your Application to Really Talk

Friday, March 26th, 2010

Speech Synthesis, otherwise known as Text to Speech (TTS), is a technology that quickly synthesizes a human voice using text as input. Speech synthesis  is the default behavior for voice calls on the Tropo platform. The Tropo ‘say‘ verb is the one that provides the TTS capability, by taking a string of text and speaking it back. It is of course possible for this verb to take a URL to a ‘wav’ or ‘mp3′ file for pre-recorded audio to be played as well.

When it comes to teaching your application to speak we follow the Perl ethos of making “the simple things easy and difficult things possible”. So your application may speak very well with the simplicity of our APIs, or it may be as sophisticated and emotional as you like through Tropo exposing powerful capabilities for giving your voices character.

For our first example we will simply say:

say 'I like squirrels!'

Which then renders this audio.

Next, we may choose from a voice that speaks any number of languages supported by Tropo (US/UK English, Castilian/Mexican Spanish, French, German, Italian & Dutch). Lets give French a try for our next example:

say "J'aime les écureuils!", :voice => 'florence'

Which then renders this audio.

Now, those were the simple examples that anyone may use to add a little speech to their applications. But, remember, we also make the difficult possible for those who want to really make their characters speak. As sometimes simply customizing the voice is not enough. There are cases when you’d also like control over pitch, volume and intonation. Tropo natively supports a standard called the Synthesized Speech Markup Language (SSML).

The Speech Synthesis Markup Language (SSML) is a W3C standard for controlling the pace, tone, pitch and all around sound of computer generated voices. Here’s a Ruby script that repeats the same sentence four times; each at a gradually lower speed:

answer 
say "<speak> I like squirrels!. 
I <prosody rate='-10%'>like squirrels!</prosody> 
I <prosody rate='-30%'>like squirrels!</prosody>  
I <prosody rate='-50%'>like squirrels!</prosody> 
</speak>"  
hangup

Which renders this audio. The previous example made use of the rate property of the SSML prosody element to control the playback speed. There are many other elements and attributes you may use, including: emphasis, phoneme, etc. To learn more about SSML and related technologies check out the W3C site at http://www.w3.org/TR/speech-synthesis/.

If you would like to call in and listen to these examples live, you may do so by dialing +990009369991429940 on Skype (free) or calling +1.408.940.5920 from any phone. What are you waiting for? Get started by signing up for an always free developer account @ Tropo.com.

Best Practices in Audio Files for Tropo

Friday, April 24th, 2009

You’ve got this great MP3 of your young child doing all the names for your brand-spankin’ new auto-attendant that you’ve created using Tropo, and when you go to call the application, it now sounds like some space alien has taken over your program! Dude, what happened?!?

Well, as it turns out, while cellphones and MP3 players can play audio files like stereo MP3s, they must be “local” on your device. See, telephony standards have just not “kept up with the times.” In Telephony the standard is 8bit, 8Khz u-law formatted WAV, and that standard, is generations removed from that nice 44KHz, 32-bit, stereo MP3 you just recorded. So, in order to play your MP3, it must be converted, on-the-fly, to work on the proper telephony standard — and unfortunately, that usually leads to less than stellar results.

The Tropo platform supports a number of different audio formats. When converting your sound files for optimum performance in your application, it is always best to have your files in 8bit, 8Khz u-law format from the start.

The supported sound formats (and their proper file extensions) for the Tropo platform are as follows:

  • 8kHz, 8bit u-law (wav or raw) (*.wav or *.ulaw)
  • 8kHz, 8bit a-law (wav or raw) (*.wav or *.alaw)
  • 8kHz, 8bit pcm (wav) (*.wav)
  • 8khz, 16bit pcm (wav or raw) (*.wav or *.pcm)
  • MS-GSM (wav) (*.wav)
  • GSM 6.10 (raw) (*.gsm)

Recording your own prompts

  • If you don’t plan on mixing and editing the prompts they record, it’s best to just record at 8khz/16bit and then save or convert to 8khz/8bit-ulaw.
  • If you plan on mixing and editing prompts you have recorded, it’s best to record at 48Khz/16bit, and not 44Khz, (the down-sample to 8Khz works much better when you are dealing with something that is a multiple of 8k), and then save or convert to 8khz/8bit-ulaw when you are done mixing and editing their prompts.
  • Most definitely use the gain control tools in your audio software to adjust the RMS amplitude and peak amplitude of your audio recordings so that audio is loud enough to be heard by customers; but not so loud that prompt echoes will be heard by the recognition engine; and not so loud that pops and clicks are heard as a result of clipping.

Tools

A great, free, cross-platform tool for working with audio files is Audacity. Their wiki and Forums offer outstanding support for folks using their application for the first time.

Another cross-platform, open-source audio editor application is SoX. SoX is a command-line utility, but has some outstanding capabilities for processing those “hard to fix” audio files.

For those PC-only folks out there, Goldwave is another freeware audio editor that you may want to consider, if Audacity or SoX does not fit the bill for you.

We hope that these hints help you in preparing your audio files for successful use on Tropo.