20

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!

Ron Gross
  • 1,474
  • 5
  • 19
  • 34

5 Answers5

3

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

aurelihein
  • 169
  • 4
1

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

Ahmed Gamal
  • 1,666
  • 1
  • 17
  • 25
0

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

David
  • 5,481
  • 2
  • 20
  • 33
0

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.

  • 1
    Not showing in the "Search all 100 + APIs" search either (or at least not if you aren't subscribed - which is the point of step 1 explicitly mentioned in the accepted response). – Dan Cornilescu Apr 25 '16 at 15:24
  • @DanCornilescu - I don't know what's wrong with your search. I'm not subscribed to any list, but when I go to the google dev console, click "enable APIs" and put "speech" in the search box, I get a link "Google Cloud Speech API". Seems to work fine for me. – Jules Nov 28 '16 at 01:30
  • @Jules I can see it now as well, it seems things changed in the past 7 months or so. – Dan Cornilescu Nov 28 '16 at 03:08
  • @DanCornilescu AFAICT, it was added to that list some time around the end of march, or maybe very early april... if you leave browsers open for a while, perhaps you had a cached version? – Jules Nov 28 '16 at 03:40
-3

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

MaS
  • 1
  • 2