Uberi / speech_recognition

Speech recognition module for Python, supporting several engines and APIs, online and offline.
https://pypi.python.org/pypi/SpeechRecognition/
BSD 3-Clause "New" or "Revised" License
8.36k stars 2.39k forks source link

Errors using Google Speech Recognition service #333

Open vinay047 opened 6 years ago

vinay047 commented 6 years ago

Hi, Plesae find the below error when i tried to convert speech to text using google API

print("Google Speech Recognition thinks you said " + r.recognize_google(audio))

Traceback (most recent call last):

File "C:\Users\AppData\Local\Programs\Python\Python36-32\lib\site-packages\speech_recognition__init__.py", line 840, in recognize_google

response = urlopen(request, timeout=self.operation_timeout)

File "C:\Users\ AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 223, in urlopen

return opener.open(url, data, timeout)

File "C:\Users\ AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 532, in open

response = meth(req, response)

File "C:\Users\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 642, in http_response

'http', request, response, code, msg, hdrs)

File "C:\Users\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 570, in error

return self._call_chain(*args)

File "C:\Users\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 504, in _call_chain

result = func(*args)

File "C:\Users\AppData\Local\Programs\Python\Python36-32\lib\urllib\request.py", line 650, in http_error_default

raise HTTPError(req.full_url, code, msg, hdrs, fp)

urllib.error.HTTPError: HTTP Error 502: Bad Gateway

Thanks is Advance!!

MikeSperone commented 6 years ago

I am currently having the same issue after it having worked for a long time (with no change in my code), could there have been a change on Google's end?

palikar commented 5 years ago

Hey @vinay047,

do you still have the issue? If so, which version of speech_recognition are you using?

CraftInsights commented 4 years ago

Hello @palikar

I have been having similar issues. Yesterday my code was working fine. I woke up today, run my script, and suddenly I get this error, even though I didn't change any code.

Error_Capture

Any help would be greatly appreciated, its been stressing me out. Thank you in advance.