1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Check out the 6 new Certified Incredible PBX Builds for Asterisk 11 and 13 featuring CentOS 6, Ubuntu 14, Raspberry Pi 2, and Asterisk-NOW.
    Dismiss Notice

GOOD NEWS Google Speech to Text

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

  1. wardmundy

    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. You may have to Search for: Speech API
    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.
  2. Trimline2

    Trimline2 Guru

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

  3. wardmundy

    wardmundy Nerd Uno

  4. Trimline2

    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!

    randy7376 likes this.
  5. james

    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

    wardmundy Nerd Uno

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

    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.
    wardmundy likes this.
  8. wardmundy

    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...
    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:
    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 =
  9. Trimline2

    Trimline2 Guru

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

    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:

  11. IanL01

    IanL01 New Member

    I have a problem getting google speech working

    1I have joined the Chromium-Dev group
    2I can create a project.
    3If I select 3 in Wards post above I get an error “You do not have sufficient permissions to view this page”

    I can see popular API’s but not speech.

    Do I have to sign up for a free trial and give credit card details? I am I just dense and doing something wrong? or has Google moved the goal post?
  12. wardmundy

    wardmundy Nerd Uno

    Looks like you didn't actually join the Chromium-Dev group. I just went through the drill again, and it worked fine.
  13. IanL01

    IanL01 New Member

    Thanks for checking Ward.
    I found the problem. Ghostery was blocking a tracking cooky, paused Ghostery and up popped the speech API.
    Now I have speecg recognition.
    Thank You.
    wardmundy likes this.

Share This Page