Skip to content

Demos/ASR/Whisper/run_whisper.py bug #349

@Gan-so

Description

@Gan-so

Issue: Undefined Reference to sounddevice (sd) Causes NameError in Microphone Functionality

    def feeder():
        try:
            with sd.InputStream(samplerate=SAMPLE_RATE, channels=1, dtype='float32',
                                blocksize=CHUNK_SIZE, callback=audio_callback):
                if duration > 0:
                    sd.sleep(int(duration * 1000))
                    stop_flag.set()
                else:
                    while not stop_flag.is_set():
                        sd.sleep(100)
        except sd.PortAudioError as e:
            print(f"\n Microphone error: {e}")
            print("⚠️ Could not initialize microphone. Please check your audio device settings.")
            stop_flag.set()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions