ERROR:root:Error initializing pyaudio audio recording: [Errno -9998] Invalid number of channels #54
alec1852198
started this conversation in
General
Replies: 1 comment
-
Please test your audio device compatibility with PyAudio. Run this script to list and test available audio devices: import pyaudio
p = pyaudio.PyAudio()
info = p.get_host_api_info_by_index(0)
numdevices = info.get('deviceCount')
for i in range(0, numdevices):
if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
print("Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name'))
p.terminate() This will output a list of audio input devices available on your system. Each device is identified by a unique "Input Device id". |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I am trying to run a code where RealtimeSTT is imported.
I am running on Visual Studio Code on a MacBook Pro M3. the error I get is as follows:
I can't figure out how to solve the problem. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions