Google Speech Recognition API

你离开我真会死。 提交于 2020-01-10 09:39:50

问题


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 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).



来源:https://stackoverflow.com/questions/23608863/google-speech-recognition-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!