SoniTranslate icon indicating copy to clipboard operation
SoniTranslate copied to clipboard

IndexError in text_to_speech.py when Processing Certain WAV Files

Open fralapo opened this issue 11 months ago • 1 comments

Hi, I ran into a problem when trying to manage a specific audio file. The trouble comes up e­xactly when the code trie­s to manage a WAV document called "XTTS/AUTOMATIC_SPEAKER_00.wav". Be­low is the traceback providing more information:

[INFO] >> XTTS/AUTOMATIC_SPEAKER_00.wav
Traceback (most recent call last):
File "/home/lapo/anaconda3/envs/sonitr/lib/python3.10/site-packages/gradio/queueing.py", line 495, in call_prediction
output = await route_utils.call_process_api(
...
File "/home/lapo/SoniTranslate/soni_translate/text_to_speech.py", line 474, in create_new_files_for_vc
if filtered_speaker[0]["tts_name"] == "XTTS/AUTOMATIC.wav":
IndexError: list index out of range

It seems like the code running the text-to-speech process has a bug. Specifically, when it makes new audio files for changing the voice, it tries to use an index for a list that does not exist. This causes an 'IndexError' error.

Could you please take a look into this issue? I'm unsure if the problem is with how the audio files are named or somewhere else in the steps used.

Thank you for your assistance on this project and the great work you've done so far.

fralapo avatar Mar 09 '24 22:03 fralapo

Hi, I've made some adjustments that might resolve the problem

R3gm avatar Mar 10 '24 20:03 R3gm