Google Speech Recognition API

亡梦爱人 提交于 2019-11-30 06:14:51

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

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

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

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.

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

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