问题
I'm trying to use the Google Speech API v2 (at address https://www.google.com/speech-api/v2/recognize?...
)
I need to use my Api Key, but when I use it I get error 403 Forbidden
When I use an API key that was on the example project I downloaded it is working fine.
I saw that at the Google Developers Console I can enable a lot of api options, but didn't find any Speech-API option. Is there anything else I need to enable to get access to this API using my key?
Thank you!
回答1:
Instructions are here : http://www.chromium.org/developers/how-tos/api-keys
!! Do not forget to activate the API "Speech API" in "APIs" under "APIS & AUTH" !!
回答2:
According to chromium that there is no quota for google speech to text APIs anymore.so you will not found it in your google cloud project console
回答3:
I am not sure this API is available to everyone, but here is a github project that provides a valid key. You should try with this key.
https://github.com/gillesdemey/google-speech-v2
回答4:
This is an old post, but hopefully it will help someone. I couldn't find the Speech API listed under the popular APIs on https://console.developers.google.com/ either. You have to search for the Speech API using the "Search all 100 + APIs" search field.
回答5:
In order to use the service you need to:
- get a developer key (see above answers for instructions)
- send a mono flac audio file to http://www.google.com/speech-api/v2/recognize (Google doesn't accept stereo audio anymore)
- specify your audio file's sampling rate (e.g.
16000
,44100
, etc.) and Content-Type asaudio/x-flac
in your HTTP header - specify values for
key
,client
andlang
parameters in the url
Here is a wget
example with full parameters and header:
wget -q --post-file file.flac --header="Content-Type: audio/x-flac; rate=16000" -O - "http://www.google.com/speech-api/v2/recognize?client=chromium&lang=en_US&key=AIzaSyAcalCzUvPmmJ7CZBFOEWx2Z1ZSn4Vs1gg"
Note that the free service is limited to 50 requests/day for a developer key.
This repository offers a shell script to use the API from the command line (including voice recording).
来源:https://stackoverflow.com/questions/23608863/google-speech-recognition-api