-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
WinError 10054 #733
Comments
Hi Mohammed, I faced the same problem as you, and unfortunately, the reason was trivial. You need to modify the link in library "speech_recognition\recognizers\google.py" I hope I was able to help you. |
@MohamedSamer1 Thanks to report this. |
@MohamedSamer1 SpeechRecognition 3.10.4 was out! -query = r.recognize_google(audio, language='en-us')
+query = r.recognize_google(audio, language='en-us', endpoint='https://www.google.com/speech-api/v2/recognize') If WinError 10054 is not resolved in your environment, please feel free to reopen this issue. |
Steps to reproduce
1.The issue happen every time i run the code
[WinError 10054] An existing connection was forcibly closed by the remote host
2. Every time i run the code the same error appear
here is the code
Expected behaviour
that it recognize my speech and print it
Actual behavior
nothing the code work well but after the r.recognize function the error appeared
[WinError 10054] An existing connection was forcibly closed by the remote host
System information
My system is <windows 11>. (For example, "Ubuntu 16.04 LTS x64", "Windows 10 x64", or "macOS Sierra".)
My Python version is <3.11.7>. (You can check this by running
python -V
.)My Pip version is . (You can check this by running
Fatal error in launcher: Unable to create process using '"C:\Users\hammo\AppData\Local\Programs\Python\Python312\python.exe" "C:\Users\hammo\AppData\Local\Programs\Python\Python312\Scripts\pip.exe" -V': The system cannot find the file specified.
.)My SpeechRecognition library version is <3.10.1>. (You can check this by running
python -c "import speech_recognition as sr;print(sr.__version__)"
.)My PyAudio library version is <0.2.14> / I don't have PyAudio installed. (You can check this by running
python -c "import pyaudio as p;print(p.__version__)"
.)My microphones are: (You can check this by running
python -c "import speech_recognition as sr;print(sr.Microphone.list_microphone_names())"
.)My working microphones are:( {} this is what he gave me ) (You can check this by running
python -c "import speech_recognition as sr;print(sr.Microphone.list_working_microphones())"
.)I installed PocketSphinx from . (For example, from the Debian repositories, from Homebrew, or from the source code.)
The text was updated successfully, but these errors were encountered: