Open willemjanpattyn opened 1 year ago
I've worked out that the problem resides in the keyboard events somehow prematurely exiting the script. So for now, I've made two separate scripts: One script that records the voice and saves it to a file. And one that reads the saved file and pushes it through the rest of the code.
That seems to work. I will need to do further investigation as to why this happens.
Issue
I have been experimenting for hours without luck. Whenever I run
voice_translator.py
, it seems to stop the script after attempting to request data. It doesn't output anything as well. Very randomly, it decides to work, but 99% of the time I am unable to get it to work.I ran Whisper and VoiceVox through Docker before, but thinking that somehow that was an issue despite having the resources, I'm hosting them currently on Colab. I've attempted using different Python versions from 3.8 to 3.11.
I've documented all my testing below. I hope this helps pinpoint something. Maybe I'm overlooking something very apparent or maybe it's a specific issue on my environment, though I'm just running on Windows 10.
Testings with voice_translator.py
I've had the best results via Docker. Where it's able to at least transcribe. But even that is unfortunately inconsistent. I've logged the contents of the variables in![image](https://user-images.githubusercontent.com/22587172/224538132-7ae5736c-f9a8-4276-bef5-afdc8d9e7bf1.png)
voice_translator.py
where it shows it doesn't pass after DeepL.I even went as far as omitting certain steps:
Skipping transcription No result from DeepL, script stops without throwing error.![image](https://user-images.githubusercontent.com/22587172/224539097-c6796781-e3f9-4be1-8fd3-4d61774c34b8.png)
Skipping translation Here it seems to get responses from both![image](https://user-images.githubusercontent.com/22587172/224539437-c1347c72-6120-44fa-b60a-35978e9ab8ae.png)
audio_query
andsynthesis
calls, but stops before playing the audio. Also no error thrown.Testings with module scripts
However, it succeeds the calls running the scripts manually. Same result with either Docker or Colab.
![image](https://user-images.githubusercontent.com/22587172/224537472-74caa680-3e66-432f-9810-3ded32f4e851.png)
voicevox.py
(I even tried translating here)asr.py
Extra info
For some reason, I'm not able to see the logs in Docker. But when I switched to Colab, it's logging bad requests whenever the transcribe fails when running![image](https://user-images.githubusercontent.com/22587172/224538384-0df0c97e-5817-4c0d-9b8c-7fe661086aef.png)
voice_translator.py
. The 200 responses were from the times I manually ranasr.py
.