1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. A serious FreePBX vulnerability has been reported. Update your Framework Module immediately. Click here for details.
  4. Critical FreePBX vulnerability! Update your server immediately. Details here.

GOOD NEWS Google Speech to Text

Discussion in 'Today's Tech News & Events' started by wardmundy, May 12, 2014.

  1. wardmundy Nerd Uno

    Just an FYI that Google has made "improvements" to their speech-to-text and translate engines which now block queries without a server key. For details, see Lefteris comments here. He advises that there should be a patch within the next week for speech-recog.agi...

    But you'll still need to obtain your own server key and there's a limit of 50 requests per day.

    Here are the four steps:
    1. Join Chromium-Dev group here.
    2. Create a Project here.
    3. Enable the Speech API for your Project here.
    4. Create a key in the Developer's Console from #3 by clicking Credentials -> Create New Key -> Server Key. Leave IP address restriction blank.
    5. Copy your API Key to the clipboard.
    READ THE LICENSE AGREEMENT. THIS IS FOR PERSONAL AND DEVELOPMENT USE ONLY.
    Last edited by wardmundy, May 31, 2014
  2. Trimline2 Guru

    Well, heck. Looks like the Speech API is no longer available for selection.

    Sigh.
  3. wardmundy Nerd Uno

  4. Trimline2 Guru

    Minor details. Got it now. Do you think that Google could make it even more difficult. What is here today is gone tomorrow. I wonder how many applications they broke with this... thanks!

    [IMG]
    randy7376 likes this.
  5. james Guru

    Most Google API's offer free/paid tier. I don't have the motivation to do the steps because I don't use this personally but perhaps someone who signed up could see if there is a paid offering.
  6. wardmundy Nerd Uno

    Sorry, no paid option at this time.
  7. lgaetz Pundit

    Good News, I now have Google speech to text working again from PIAF. A top level view of upgrading:
    1. Get a Google Developer API key using Ward's instructions above. When setting up allowed referrers for the API key, I initially tested with my IP address, then my FQDN, and neither worked until I removed all authorized referrers. Probably something I was doing wrong there, how does one properly set an authorized referer?
    2. replace the file, /var/lib/asterisk/agi-bin/speech-recog.agi with the latest version available from github. Chown and chmod as appropriate.
    3. edit speech-recog.agi, and locate the section "User defined parameters", and edit variable $key to be the API key obtained in step 1
    4. Ensure that the required dependency perl-JSON is installed with the command "yum install perl-JSON"
    That's it, your old speech recognition dialplan should be working now.
    Last edited by wardmundy, May 28, 2014
    wardmundy likes this.
  8. wardmundy Nerd Uno

    Great job, @lgaetz and a HUGE THANK YOU to @lzaf. On the Raspberry Pi and BeagleBone Black platforms, the command to load perl-JSON is...
    Code:
    apt-get install libjson-perl
    # or on CentOS use:
    yum install perl-JSON
    
    Preliminary steps look like this after you complete registration and obtain your API Key:
    Code:
    cd /var/lib/asterisk/agi-bin
    mv speech-recog.agi speech-recog.last.agi
    wget --no-check-certificate https://raw.githubusercontent.com/zaf/asterisk-speech-recog/master/speech-recog.agi
    chown asterisk:asterisk speech*
    chmod 775 speech*
    nano -w speech-recog.agi
    # plug your API key into line 70: my $key =
    Last edited by wardmundy, May 31, 2014
  9. Trimline2 Guru

    Great work! Back in business in no time. A thousand thanks!
    lgaetz and wardmundy like this.
  10. wardmundy Nerd Uno

    We put back up the demo line on a BeagleBone Black so you can try out the new Speech Recognition engine with the Yahoo Weather Reports for yourself:

    [IMG]

Share This Page