Google Speech Recognition API

2019-02-04 05:41发布

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!

5条回答
我只想做你的唯一
2楼-- · 2019-02-04 06:15

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" !!

查看更多
Deceive 欺骗
3楼-- · 2019-02-04 06:16

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

enter image description here

查看更多
Ridiculous、
4楼-- · 2019-02-04 06:19

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 as audio/x-flac in your HTTP header
  • specify values for key, client and lang 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).

查看更多
放我归山
5楼-- · 2019-02-04 06:25

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.

查看更多
兄弟一词,经得起流年.
6楼-- · 2019-02-04 06:36

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

查看更多
登录 后发表回答