speech_recognition icon indicating copy to clipboard operation
speech_recognition copied to clipboard

Problem with microphone when using Speech Recognition

Open hakanbogan opened this issue 6 years ago • 0 comments

I have a Jetson Xavier, USB Microphone and Webcam having mic inside. Totaly, 2 mics. I am using Speech Recognition. When I try to use both webcam and usb mic, mic on webcam is taken by software as default. I want to use USB Mic when I plugged in both devices. I have found its device_index and I have written into software. However I have got an error as:

"OSError: [Errno -9997] Invalid sample rate"

This is my microphone:

Microphone with name "UAC 1.0 Microphone & HID-Mediak: USB Audio (hw:2,0)" found for `Microphone(device_index=24)

I have tried to change sample rate to 44100. Error has disappeared but mic did not work.

P.S.: USB Mic works normally when I plug in it alone. Code uses it as default. I have problem only when I have 2 connected devices.

hakanbogan avatar Jul 10 '20 09:07 hakanbogan