netease-youdao / EmotiVoice

EmotiVoice 😊: a Multi-Voice and Prompt-Controlled TTS Engine
Apache License 2.0
7.48k stars 636 forks source link

一次推理的句子最大长度是多少呢? #139

Open aidway opened 8 months ago

aidway commented 8 months ago

目前测试结果,文本长度超过510时会报错,例如:“床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光,疑是地上霜。举头望明月,低头思故乡。床前明月光。床”

报错内容: RuntimeError: The size of tensor a (513) must match the size of tensor b (512) at non-singleton dimension 1

syq163 commented 8 months ago

This is also a known issue. A quick solution is to first perform sentence segmentation, and then to do text-to-speech (TTS) for each segment.