PlayVoice / vits_chinese

Best practice TTS based on BERT and VITS with some Natural Speech Features Of Microsoft; Support ONNX streaming out!
https://huggingface.co/spaces/maxmax20160403/vits_chinese
MIT License
1.15k stars 170 forks source link

输入非常规字词生成的时候会出错 #56

Open xhappy123 opened 1 year ago

xhappy123 commented 1 year ago

例如:开嗯好呃

Traceback (most recent call last): File "../vits_chinese-2.0/vits_infer.py", line 77, in phonemes, char_embeds = tts_front.chinese_to_phonemes(item) File "..\vits_chinese-2.0\vits_pinyin.py", line 75, in chinese_to_phonemes
char_embeds = self.prosody.expand_for_phone(char_embeds, count_phone) File "..\vits_chinese-2.0\bert\ProsodyModel.py", line 60, in expand_for_phone assert char_embeds.size(0) == len(length) AssertionError

MaxMax2016 commented 1 year ago

开嗯好呃 ['kai1' 'n2' 'hao3' 'e4']

hildazzz commented 1 year ago

大佬看这里,我也遇到这个问题!【蓊蓊郁郁】经过Bert得到【[UNK][UNK]郁郁】,生成语音失败。这个要如何解决呢? 并且在线demo(https://huggingface.co/spaces/maxmax20160403/vits_chinese)上可以正常生成语音,包括句尾没有标点,求教……

MaxMax2016 commented 1 year ago

用这分支试试:https://github.com/PlayVoice/vits_chinese/tree/bert_vits

hildazzz commented 1 year ago

感谢及时回复,可以正常使用了。冒昧问下两个分支的差别是什么?

MaxMax2016 commented 1 year ago

main合并了其他开发者提交的针对非标贝数据集的处理程序

hildazzz commented 1 year ago

我要也要自制多人语料库(非标贝)用来训练,用Bert_vits这个分支可以吗?具体预处理是需要参考vits_prepare.py对吗?

MaxMax2016 commented 1 year ago

两个都参考一下吧,数据格式多种多样的,我也无法确定哪个适合你

hildazzz commented 1 year ago

好的,谢大佬