FunAudioLLM / CosyVoice

Multi-lingual large voice generation model, providing inference, training and deployment full-stack ability.
https://funaudiollm.github.io/
Apache License 2.0
2.79k stars 262 forks source link

Error happened during zero shot TTS for text that does not end with punctuation #57

Closed LwLiu-2012 closed 2 weeks ago

LwLiu-2012 commented 2 weeks ago

In Zero Shot mode,if the Prompt text or Target text does not end with punctuation (eg '.' or '?' or '!' ), the following error message will happen:

Traceback (most recent call last): File "./test.py", line 22, in output = cosyvoice.inference_zero_shot(target_text, prompt_text, prompt_speech_16k) File "/root/autodl-tmp/CosyVoice/cosyvoice/cli/cosyvoice.py", line 63, in inference_zero_shot return {'tts_speech': torch.concat(tts_speeches, dim=1)} RuntimeError: torch.cat(): expected a non-empty list of Tensors.

v3ucn commented 2 weeks ago

推理文本和参考文本的结尾必须用标点符号结尾,否则就报错

aluminumbox commented 2 weeks ago

the code is now updated, it will add puncatation by default at sentence end.