Jul-01-2021, 04:58 PM
(This post was last modified: Jul-01-2021, 06:32 PM by OceansBlue.)
I am not able to communicate using the laptop microphone
Here is my code
Here is the error
Here is my code
1 2 3 4 5 6 7 8 9 10 |
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) |
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