【部署ChatTTS】

部署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)

生成成功
在这里插入图片描述
就是一堆警告
在这里插入图片描述

  • 10
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值