notes
update 5/17/2014: The key in the post below is now disabled. Trying this one: AIzaSyBOti4mM-6x9WDnZIjIeyEU21OpBXqWBgw
It worked for now – but I will probably need to get a real key… and add instructions for inserting the key into the patches: robot_conversation5.maxpat and speech-to-google-text-api5.maxpat
Basic instructions are
- edit Max patch
- go into the sub patch: call-google-speech and replace the key string inside the curl command with the correct key.
earlier post
v1 API of Google Speech broke a few days ago.
Here is an example of how to run v2. https://github.com/gillesdemey/google-speech-v2
I have updated the Max patches in the Internet Sensors project. https://github.com/tkzic/internet-sensors
This version of the API produces malformed JSON responses.
Here’s an example using curl:
curl -v -i -X POST -H “Content-Type:audio/x-flac; rate=16000” -T /tmp/tweet.flac “https://www.google.com/speech-api/v2/recognize?xjerr=1&client=chromium&lang=en-US&maxresults=10&pfilter=0&xjerr=1&key=AIzaSyCnl6MRydhw_5fLXIdASxkLJzcJh5iX0M4”
Instructions for getting a real key… http://www.chromium.org/developers/how-tos/api-keys
Note: Need to look at the double buffering methods in the Max patches to make sure they are handling various sample rates properly. I think they may be optimized for 44.1 KHz