语音生成大模型ChatTTS本地部署方法和下载地址

听说最新的ChatTTS可以调节音色、语速,进行口语化和情绪处理,走起,赶紧下载一个。

准备在在Windows下运行的朋友我是劝退的,因为ChatTTS里用的pynini中的一个组件直接称它在Windows下没有测试过,还是建议用Ubuntu,我用的是Windows下的WSL,非常非常好用。
PS:本人将ChatTTs打包成exe文件了,在windows下可以直接使用,下载地址在最下方

生成效果用的我真人视频,就不放出来了。

一、项目位置及初步安装
https://github.com/2noise/ChatTTS

1.1 UBUNTU下git安装
$ sudo apt update
$ sudo apt upgrade -y
$ sudo apt install git
$ sudo apt install git-lfs
1.2 PIP 指定国内源
项目安装下载东西不少,建议用清华的源,速度可以快些

pip install package -i https://pypi.tuna.tsinghua.edu.cn/simple
1.3 ANACONDA下载
ANACONDA安装完成后,我要创建环境,结果出错

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/current_repodata.json>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.

If your current network has https://www.anaconda.com blocked, please file
a support request with your network engineering team.

SSLError(MaxRetryError('HTTPSConnectionPool(host=\'http://repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/main/win-64/current_repodata.json (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))'))

解决办法:conda config --set ssl_verify no

1.4 折腾PYTHON环境
一安装就出错:

安装出错:“ImportError: cannot import name ‘packaging’ from ‘pkg_resources’”
解决:pip install setuptools69.5.1
出错: AssertionError: Unable to pre-compile async_io DS_BUILD_OPS=1
解决:pip install deepspeed
0.3.16
安装4个包:

pip install WeTextProcessing -i  https://pypi.tuna.tsinghua.edu.cn/simple
pip install Normalizer -i  https://pypi.tuna.tsinghua.edu.cn/simple
conda install -c conda-forge pynini=2.1.5
pip install nemo_text_processing  -i https://pypi.tuna.tsinghua.edu.cn/simple

特别注意,python升级到3.9,否则会有奇怪的事情发生,后面正常安装这些:

pip install torch
pip install torchvision
pip install torchaudio

测试一下TORCH版本和GPU是否可用,不对就要调整版本

import torch;
print(torch.__version__); #看torch版本:
print(torch.cuda.is_available();#查看gpu是否可用

修改Core.py,在函数

def init_normalizer(self, lang):

加一句全局引用

    global Normalizer  

二、在指定环境下运行
1.1 启动
WSL下载HUGGINGFACE用代理也非常慢,就手工下载算了,一共assert和config两个文件夹,放在ChatTTS文件夹下:

assert里主要放模型:
在这里插入图片描述
启动的时候,用 --local_path指定本地启动,同时指定端口,就不需要到HUGGINGFACE下载模型了,代码如下:

python webui.py --local_path='.'  --server_port='8088' 

在这里插入图片描述
如果嫌本地部署麻烦,本人有已经打包好的exe版本,双击即可使用,需要自取:
下载地址:
百度网盘链接:https://pan.baidu.com/s/13BPWXO5OLm20OVoNP_jUyA
提取码:xvew

  • 14
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值