You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the following code to create latents for XTTSv2 with get_conditioning_latents, if the reference audio is short; I face the following issue. How shall I fix this, any workaround ?
It should not throw an exception and create the correct latents.
Logs
`WARNING:root:Traceback: Traceback (most recent call last): File "/Users/utku/source/videoo/videoo-voice-cloner/voicecloner.py", line 918, in produce_voice_dubbing gpt_cond_latent, speaker_embedding = model.get_conditioning_latents(audio_path=audio_part) File "/Users/utku/.pyenv/versions/3.9.20/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 116, in decorate_contextreturn func(*args, **kwargs) File "/Users/utku/.pyenv/versions/3.9.20/lib/python3.9/site-packages/TTS/tts/models/xtts.py", line 357, in get_conditioning_latents gpt_cond_latents = self.get_gpt_cond_latents( File "/Users/utku/.pyenv/versions/3.9.20/lib/python3.9/site-packages/torch/utils/_contextlib.py", line 116, in decorate_contextreturn func(*args, **kwargs) File "/Users/utku/.pyenv/versions/3.9.20/lib/python3.9/site-packages/TTS/tts/models/xtts.py", line 283, in get_gpt_cond_latents cond_latent = torch.stack(style_embs).mean(dim=0)RuntimeError: stack expects a non-empty TensorList`
You could pad your audio with silence until it reaches the minimum that works. I guess it would be possible for Coqui to do this internally or at least provide a more helpful error message about the file being too short, but on the other hand 0.5 seconds is extremely short and means that there is at most a single word in the audio, so the result won't be very good anyway.
Describe the bug
When using the following code to create latents for XTTSv2 with get_conditioning_latents, if the reference audio is short; I face the following issue. How shall I fix this, any workaround ?
To Reproduce
Expected behavior
It should not throw an exception and create the correct latents.
Logs
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: