部署ChatTTS出错WARNING:ChatTTS.core:Package WeTextProcessing not found!
加载模型时报错
加载模型
chat = ChatTTS.Chat()
chat.load_models()
报错
An error happened while trying to locate the files on the Hub and we cannot find the appropriate snapshot folder for the specified revision on the local disk. Please check your internet connection and try again.
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings…
因为模型需要连接hugginface,默认访问不了,可以从modelscope下载,然后从本地加载就可以了
chat = ChatTTS.Chat()
chat.load_models(source='local', local_path='YOUR LOCAL PATH')
生成时报错
UnboundLocalError: local variable ‘Normalizer’ referenced before assignment
在报错之前就有警告
WARNING:ChatTTS.core:Package WeTextProcessing not found! Run: conda install -c conda-forge pynini=2.1.5 && pip install WeTextProcessing
安装这两个包就可以了
安装时报错(没解决)
building '_pywrapfst' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
根据提示下载编译工具
选择这两个工具就可以
再次运行还是报错
安装anaconda解决
可以从这个地址下载:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive
所有需要的包重新下载一遍
暗转生成时报错的包
conda install -c conda-forge pynini=2.1.5
pip install WeTextProcessing
params_infer_code = {'prompt':'[speed_5]', 'temperature':.3}
params_refine_text = {'prompt':'[oral_2][laugh_0][break_6]'}
wav = chat.infer('四川美食可多了,有麻辣火锅、宫保鸡丁、麻婆豆腐、担担面、回锅肉、夫妻肺片等,每样都让人垂涎三尺。', \
params_refine_text=params_refine_text, params_infer_code=params_infer_code)
Audio(wav[0], rate=24_000, autoplay=True)
生成成功
就是一堆警告