Open uvtong opened 1 month ago
你可以把数字转成中文就可以了,小数点也可以对应匹配
@Papapaladin 大佬,刚刚是贴了py代码么,我刚刷新没了。还能提供一份吗
@uvtong
def init_chat():
chat = ChatTTS.Chat(get_logger("ChatTTS"))
chat.load(source="local", compile=True)
try:
chat.normalizer.register("en", normalizer_en_nemo_text())
except ValueError as e:
logger.error(e)
except:
logger.warning("Package nemo_text_processing not found!")
logger.warning(
"Run: conda install -c conda-forge pynini=2.1.5 && pip install nemo_text_processing",
)
try:
chat.normalizer.register("zh", normalizer_zh_tn())
except ValueError as e:
logger.error(e)
except:
logger.warning("Package WeTextProcessing not found!")
logger.warning(
"Run: conda install -c conda-forge pynini=2.1.5 && pip install WeTextProcessing",
)
return chat
注册normalizer
或直接用汉字写出数字。
pynini - 这个只能在Linux上跑吧? 有没有windows或Mac的解决方案?
可以自行寻找其他解决方案,将其注册到normalizer。
如题,中文部分无法识别数字(1,2,3等)和句号(。)是需要设置什么吗?