Creating an API Key for Google Speech Recognition

Google has changed the licensing of their speech recognition engine and now restricts use to “personal and development use.” Assuming you qualify, the very first order of business is to enable speech recognition for Incredible PBX. Once enabled, the Incredible PBX feature set grows exponentially. You’ll have access to the Voice Dialer for AsteriDex, Worldwide Weather Reports where you can say the name of a city and state or province to get a weather forecast for almost anywhere, Wolfram Alpha for a Siri-like encyclopedia for your PBX, and Lefteris Zafiris’ speech recognition software to build additional Asterisk apps limited only by your imagination.

Here’s how to activate speech recognition on Incredible PBX. Don’t skip any steps!

1. Login to an existing Google/Gmail account and Join the Chrome-Dev Group.

2. Visit the Google Project site and Create a new Speech Recognition project for yourself: Click (1) Project and then (2) Create Project.

3. In the New Project dialog, (1) name your project Speech Recognition, (2) decide whether to receive Project updates, (3) agree to the Terms of Service, and (4) click Create.

4. Once your Speech Recognition project displays, click the Private APIs link in the Library section of the API Manager.

5. Choose the Speech API from the list and click the Enable option on the Dashboard page which appears next.

6. Click on the Credentials section of the API Manager.

7. On the API Credentials screen, choose Create Credentials and then click API Key.

9. When your new (1) API Key is displayed, click on the Copy icon to the right of the key to copy it to your clipboard. Then click (2) Close.

10. The Credentials section of the API Manager will redisplay together with the API Key you just created. Be sure you copy it correctly. This is the key to be used with Incredible PBX.

11. Log into your Incredible PBX server as root and issue the following command:

nano -w /var/lib/asterisk/agi-bin/speech-recog.agi

12. When the nano editor opens, go to line 70 or so of speech-recog.agi: my $key = "". Insert your API key from Step #9 or #10 between the quotation marks. Save the file: Ctrl-X, Y, then Enter.

Congratulations! Speech Recognition is now available with Incredible PBX applications.

Be Sociable, Share!