RealtimeSTT icon indicating copy to clipboard operation
RealtimeSTT copied to clipboard

pyaudio Invalid number of channels

Open junaidahmed361 opened this issue 8 months ago • 1 comments

I ran the following snippet to initialize the recorder:

from RealtimeSTT import AudioToTextRecorder

recorder_config = {
        'spinner': False,
        'model': 'large-v2',
        'language': 'en',
        'silero_sensitivity': 0.4,
        'webrtc_sensitivity': 2,
        'post_speech_silence_duration': 0.4,
        'min_length_of_recording': 0,
        'min_gap_between_recordings': 0,
        'enable_realtime_transcription': True,
        'realtime_processing_pause': 0.2,
        'realtime_model_type': 'tiny.en',
        'compute_type': 'int8',
    }

recorder = AudioToTextRecorder(**recorder_config)

However I receive the error ERROR:root:Error initializing pyaudio audio recording: [Errno -9998] Invalid number of channels OSError: [Errno -9998] Invalid number of channels

This seems to originate from the audio_interface.open call within audio_recorder.py. Running python 3.11 in a virtual environment on mac m3.

junaidahmed361 avatar Jun 25 '24 19:06 junaidahmed361