Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid Input Device Error: Encountered Exception in Microphone Initialization" #224

Open
bibo702 opened this issue May 24, 2024 · 1 comment

Comments

@bibo702
Copy link

bibo702 commented May 24, 2024

Getting this error while running python main.py.
I am having one mic set in. Did anyone got a similar issue and has an easy fix ?

[INFO] Using default microphone. [INFO] Adjusting for ambient noise from Default Mic. Please make some noise from the Default Mic... Encountered exception in Microphone __enter__ [Errno -9996] Invalid input device (no default output device) Encountered exception in Microphone __exit__ 'NoneType' object has no attribute 'close' Traceback (most recent call last): File "C:\00-AI-DEMO\transcribe\app\transcribe\main.py", line 133, in <module> main() File "C:\00-AI-DEMO\transcribe\app\transcribe\main.py", line 29, in main global_vars.initiate_audio_devices(config) File "C:\00-AI-DEMO\transcribe\app\transcribe\global_vars.py", line 94, in initiate_audio_devices self.user_audio_recorder = ar.MicRecorder(audio_file_name=f'{data_dir}/logs/mic.wav') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\00-AI-DEMO\transcribe\app\transcribe\../..\sdk\audio_recorder.py", line 198, in __init__ self.adjust_for_noise("Default Mic", "Please make some noise from the Default Mic...") File "C:\00-AI-DEMO\transcribe\app\transcribe\../..\sdk\audio_recorder.py", line 144, in adjust_for_noise self.recorder.adjust_for_ambient_noise(self.source) File "C:\00-AI-DEMO\transcribe\app\transcribe\../..\custom_speech_recognition\__init__.py", line 468, in adjust_for_ambient_noise assert source.stream is not None, "Audio source must be entered before adjusting, see documentation for ``AudioSource``; are you using ``source`` outside of a ``with`` statement?"

@mang0sw33t
Copy link
Collaborator

Please see #70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants