vivekuppal / transcribe

Transcribe is a real time transcription, conversation, Language learning platform. It provides live transcripts from microphone and speaker. It generates a suggested conversation response using OpenAI's GPT API. It will read out the responses, simulating a real live conversation in English or another language.
https://abhinavuppal1.github.io/
MIT License
181 stars 42 forks source link

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

Closed bibo702 closed 3 weeks ago

bibo702 commented 4 months ago

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 commented 4 months ago

Please see https://github.com/vivekuppal/transcribe/issues/70

mang0sw33t commented 2 months ago

Closing this for lack of user response.