SociallyIneptWeeb / LanguageLeapAI

Your Personal Multilingual AI Translator
MIT License
851 stars 166 forks source link

Subtitler.py AssertionError: Audio source must be entered before listening #94

Open SocraLee opened 1 year ago

SocraLee commented 1 year ago

Exception in thread Thread-2: Traceback (most recent call last): File "D:\Software\MiniConda\envs\vioceAI\lib\site-packages\speech_recognition__init.py", line 750, in threaded_listen audio = self.listen(s, 1, phrase_time_limit) File "D:\Software\MiniConda\envs\vioceAI\lib\site-packages\speech_recognition\init__.py", line 651, in listen assert source.stream is not None, "Audio source must be entered before listening, see documentation for AudioSource; are you using source outside of a with statement?" AssertionError: Audio source must be entered before listening, see documentation for AudioSource; are you using source outside of a with statement?

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Software\MiniConda\envs\vioceAI\lib\threading.py", line 980, in _bootstrap_inner self.run() File "D:\Software\MiniConda\envs\vioceAI\lib\threading.py", line 917, in run self._target(*self._args, **self._kwargs) File "D:\Software\MiniConda\envs\vioceAI\lib\site-packages\speech_recognition__init.py", line 754, in threaded_listen if running[0]: callback(self, audio) File "D:\Software\MiniConda\envs\vioceAI\lib\site-packages\speech_recognition\init.py", line 201, in exit__ self.stream.close() AttributeError: 'NoneType' object has no attribute 'close'

Any tips on this?

pardon-hnu commented 1 year ago

I also met this problem. Have you solved it?

JohannesBuchberger commented 1 year ago

Encountred it aswell

JohannesBuchberger commented 1 year ago

Okay turns out it was a layer 8 problem :p ....

Solution: Check your env file.

# VoiceMeeter Aux Output (VB-Audio VoiceMeeter AUX VAIO)
# Where your application audio (voice-chat) will play from
AUX_OUTPUT_ID=

Here i used a number that pointed to "Aux Input (VB-Audio VoiceMeeter AUX VAIO)" Of course it should point to "Aux Output [...]"