wAIfu-DEV / w-AI-fu_v2

Best way to create your own AI Vtuber/Streamer ! (Openai or NovelAI)
https://www.youtube.com/@Hilda-AI-VTuber
GNU General Public License v3.0
88 stars 7 forks source link

BUG: Speech Recognition with Google without Push to Talk crash bug report #80

Open FallnightYT opened 1 month ago

FallnightYT commented 1 month ago

Describe the bug When opening the program for the first time, the program will try to Callback and a loop, spamming either empty messages or gibberish words. After 6-7 message send it randomly that way, The Speech Recognition Timeout and isn't usable until restarting the program. Also the Push to Talk option doesn't work.

To Reproduce Steps to reproduce the behavior:

  1. Start the program (before hand make sure to have it set on Google and Voice Input on in Parameters, close the program and restart it)
  2. Check the console, it will start freaking out about Callback loop, empty text message with Hilda,
  3. Let it happen 6-7 times while trying to speak in the mic for it to understand
  4. See Timeout error

Error Timeout Message Exception in thread Thread-2 (threaded_listen): Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "D:\FallbotProject\w-AI-fu_V2\venv\lib\site-packages\speech_recognition__init__.py", line 568, in threaded_listen if running[0]: callback(self, audio) File "D:\FallbotProject\w-AI-fu_V2\source\app\speech_to_text\speech.py", line 146, in callback text = recognize_audio(audio, recognizer, throw=False) File "D:\FallbotProject\w-AI-fu_V2\source\app\speech_to_text\speech.py", line 205, in recognize_audio text = recognizer.recognize_google(audio, language=stt_language) File "D:\FallbotProject\w-AI-fu_V2\venv\lib\site-packages\speech_recognition__init__.py", line 713, in recognize_google response_text = response.read().decode("utf-8") File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 460, in read return self._read_chunked(amt) File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 583, in _read_chunked chunk_left = self._get_chunk_left() File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 566, in _get_chunk_left chunk_left = self._read_next_chunk_size() File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 526, in _read_next_chunk_size line = self.fp.readline(_MAXLINE + 1) File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\socket.py", line 705, in readinto return self._sock.recv_into(b) TimeoutError: timed out

image image image image image

FallnightYT commented 1 month ago

Great news, the Speech Recognition work, but ONLY if making clear and small sentences, if you say one too long sentence OR the AI didn't understand you well and you're stuck in a buggy loop until it crash, it will timeout.

w-AI-fu 2.0.7
2024-05-27 09:59:41.363350: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2024-05-27 09:59:41.363412: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Using speech recognition.
D:\FallbotProject\w-AI-fu_V2\source\app\vectordb\venv\lib\site-packages\huggingface_hub\file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
warnings.warn(
CALLBACK
bonjour saladar comment vas-tu
bonjour saladar comment vas-tu
SENT TEXT TO HILDA
bonjour saladar comment vas-tu
Start Took(ms): 956
LLM Took(ms): 1489
bonjour salade night comment tu vas
TTS Took(ms): 400
Took(ms): 2848
CALLBACK
je vais super bien et toi
je vais super bien et toi
SENT TEXT TO HILDA
je vais super bien et toi
Start Took(ms): 39
LLM Took(ms): 2403
moi aussi ça va. Je veux aller boire un café maintenant.
TTS Took(ms): 446
Took(ms): 2894
CALLBACK
o� aimerais-tu aller boire un caf�
o� aimerais-tu aller boire un caf�
SENT TEXT TO HILDA
où aimerais-tu aller boire un café
Start Took(ms): 51
LLM Took(ms): 1319
chez nous!
TTS Took(ms): 415
Took(ms): 1789
CALLBACK
ah ouais est-ce que tu m'invites
ah ouais est-ce que tu m'invites
SENT TEXT TO HILDA
ah ouais est-ce que tu m'invites
Start Took(ms): 41
LLM Took(ms): 2028
Bien sûr tu me l'as payé après tout!
TTS Took(ms): 448
Took(ms): 2522
CALLBACK
ah ben oui �videmment c'est moi qui t'ach�te tout dans cette maison donc
ah ben oui �videmment c'est moi qui t'ach�te tout dans cette maison donc
SENT TEXT TO HILDA
ah ben oui évidemment c'est moi qui t'achète tout dans cette maison donc
Start Took(ms): 55
LLM Took(ms): 2666
Tu sais ça c'est vraiment chiant tu devrais arrêter d'être si possessif avec mes affaires
TTS Took(ms): 540
Took(ms): 3265
CALLBACK
Exception in thread Thread-2 (threaded_listen):
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "D:\FallbotProject\w-AI-fu_V2\venv\lib\site-packages\speech_recognition\__init__.py", line 568, in threaded_listen
if running[0]: callback(self, audio)
File "D:\FallbotProject\w-AI-fu_V2\source\app\speech_to_text\speech.py", line 146, in callback
text = recognize_audio(audio, recognizer, throw=False)
File "D:\FallbotProject\w-AI-fu_V2\source\app\speech_to_text\speech.py", line 205, in recognize_audio
text = recognizer.recognize_google(audio, language=stt_language)
File "D:\FallbotProject\w-AI-fu_V2\venv\lib\site-packages\speech_recognition\__init__.py", line 713, in recognize_google
response_text = response.read().decode("utf-8")
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 460, in read
return self._read_chunked(amt)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 583, in _read_chunked
chunk_left = self._get_chunk_left()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 566, in _get_chunk_left
chunk_left = self._read_next_chunk_size()
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 526, in _read_next_chunk_size
line = self.fp.readline(_MAXLINE + 1)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python310\lib\socket.py", line 705, in readinto
return self._sock.recv_into(b)
TimeoutError: timed out