pyaudio OSError: [Errno - 9999] Unanticipated host error

前端 未结 2 1878
自闭症患者
自闭症患者 2021-01-26 01:31

I\'m trying to use the microphone of my webcam logitech to listen

with sr.Microphone(sample_rate=32000) as source:
...

This error occurs :

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-26 02:01

    You may check your anti-virus SW. I got the same problem "OSError: [Errno - 9999] Unanticipated host error" every time I tried to record the wave file by pyAudio. I check and confirm all the parameters OK. I was stuck for several days before I noticed the anti-virus on my PC block my python script call to the hardware level.

    All the thing I need to do is disable or exit the anti-virus SW and everything work well again.

提交回复
热议问题