Python Forum
Not getting response from pyaudio - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Not getting response from pyaudio (/thread-34154.html)



Not getting response from pyaudio - OceansBlue - Jul-01-2021

I am not able to communicate using the laptop microphone

Here is my code
import smtplib # Simple Mail Transfer Protocol import pyaudio import speech_recognition as sr # Speech Recognition listener = sr.Recognizer() with sr.Microphone() as source: print('listening.......') voice = listener.listen(source) info = listener.recognize_google(voice) print(info)
Here is the error


Error:
Traceback (most recent call last): File "h:\CODE\Py_EmailBot\Email_Bot.py", line 11, in <module> with sr.Microphone() as source: File "C:\Users\Python\AppData\Local\Programs\Python\Python39\lib\site-packages\speech_recognition\__init__.py", line 138, in __enter__ self.audio.open( File "C:\Users\Python\AppData\Local\Programs\Python\Python39\lib\site-packages\pyaudio.py", line 750, in open stream = Stream(self, *args, **kwargs) File "C:\Users\Python\AppData\Local\Programs\Python\Python39\lib\site-packages\pyaudio.py", line 441, in __init__ self._stream = pa.open(**arguments) OSError: [Errno -9999] Unanticipated host error
I am using a Lenovo Thinkpad T440S


RE: Not getting response from pyaudio - OceansBlue - Jul-03-2021

I got to know that i needed to "Allow apps to access your microphone" set to ON windows 10 Microphone privacy settings.

Resolved



This forum uses Lukasz Tkacz MyBB addons.
Forum use Krzysztof "Supryk" Supryczynski addons.