New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Speech Recognition #230

Closed
aditiranasaria opened this Issue May 8, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@aditiranasaria

aditiranasaria commented May 8, 2017

Steps to reproduce

I was trying to run Google speech recognition API, but triggered the following section of the code

except sr.RequestError as e:
       print("Could not request results from Google Speech Recognition service; {0}".format(e))

Whenever size of audio file exceeds 1 MB.

An error for "Bad Gateway" occurs-

"Could not request results from Google Speech Recognition service; recognition re
quest failed: Bad Gateway"

System information

My system is Windows 8 x64.

My Python version is 3.5.

My Pip version is 9.0.1.

My SpeechRecognition library version is 3.6.5.

My PyAudio library version is 0.2.11

@beeedy

This comment has been minimized.

Contributor

beeedy commented May 9, 2017

Same issue here, however I am getting the error:
Could not request results from Google Speech Recognition service; recognition request failed: Forbidden

System information

My system is OSX 0.12.4 (16E195)
My Python version is 2.7
My SpeechRecognition library version is 3.6.3
My PyAudio library version is

Follow Up

The issue ended up going away without any change to the scripts running leading me to believe this was a temporary issue on Google's end.

@r-a-o

This comment has been minimized.

r-a-o commented May 26, 2017

@aditiranasaria
I think your "Bad Gateway" error is a result of API reaching its limits. Take a look at their API limits:
https://cloud.google.com/speech/limits

It also states that:
"Audio longer than ~1 minute must use the uri field to reference an audio file in Google Cloud Storage"
meaning you will need to first push your audio file (which is longer than 1min) to G cloud before using it as source for the speech engine.
I think this condition isn't currently being taken care of in this lib.

@Uberi

This comment has been minimized.

Owner

Uberi commented Dec 5, 2017

It seems like @r-a-o is right - the API limits are causing web request errors. I'll close this for now, but feel free to reopen if it seems like this isn't the root cause!

@Uberi Uberi closed this Dec 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment