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.2k stars 2.39k forks source link

I tried the audio transcription code. Everything went well until I ran the print(r.recognize_google(audio)), when it shows the following error. Could you please help. Kinda urgent. #301

Open stevinraj opened 6 years ago

stevinraj commented 6 years ago

capture I tried the audio transcription code. Everything went well until I ran the print(r.recognize_google(audio)), when it shows the following error. OR the error in the PNG Image attached. EIther of them. THey take turns. Could you please help. Kinda urgent.

print(r.recognize_google(audio)) Traceback (most recent call last): File "", line 1, in File "C:\Users\straj\PycharmProjects\untitled2\venv\lib\site-packages\speech_recognition__init__.py", line 858, in recognize_google if not isinstance(actual_result, dict) or len(actual_result.get("alternative", [])) == 0: raise UnknownValueError() speech_recognition.UnknownValueError

Expected behaviour

Print the speech to text output

Actual behaviour

Showed an error

System information

(Delete all the statements that don't apply.)

My system is Windows 10 x64.

My Python version is 3.6

My Pip version is 9.0.1

My SpeechRecognition library version is 3.8.1.

My PyAudio library version is 0.2.11

I am not using microphones or sphinx. capture

palikar commented 5 years ago

(#300 ) ok, I see. It seems that the error comes from the urllib library and it looks quite strange. Can you try running the code in a fresh virtual env or even in fresh python installation?