Closed gabrielBarbutti closed 8 years ago
Hi, were you able to make it work?? Is Google Speech API still available? I tried sending an HTTP POST request (https://www.google.com/speech-api/v2/recognize?output=json&lang=en-us&key=API-Key&client=chromium&maxresults=6&pfilter=2) via Postman and got an empty json: { "result": [] }
Hi @dhawangupta i think it is old style new style of Google Speech Api
POST /v1beta1/speech:syncrecognize?fields=results&key=
{ "config": { "encoding": "FLAC", "sampleRate": 8000, "languageCode": "ru-RU" }, "audio": { "content": "< base64encodedFile >" } }
More information : https://cloud.google.com/speech/reference/rest/
Yes @aidoskz you are right. This is new Google Cloud Speech API which needs to enable billing in the Google Cloud Console too.
There is a version for the new cloud API, its under the 'cloud_api' branch. As far as I know both APIs work at the moment.
Hi @zaf, but, the older API only returns { "result": [] }
I get the error "Unable to get recognition data" and the two variables are set to -1. I know that this means my connection to google was not sucessful, but I tested with this command (curl -X POST --data-binary @'/var/lib/asterisk/sounds/en/hello-world.wav' --header 'Content-Type: audio/l16; rate=8000;' 'https://www.google.com/speech-api/v2/recognize?output=json&lang=en-us&key=***') and the connection was sucessful. Here is my CLI output: