ChatTTS 文字生成语言本地模型部署

ChatTTS部署

官方信息

[ChatTTS首页](https://chattts.com/)

搭建步骤

  • 1、下载源码
    git clone https://github.com/2noise/ChatTTS.git

  • 2、按照环境
    pip install torch ChatTTS
    pip install -r requirements.txt

  • 3、下载模型
    git clone https://www.modelscope.cn/pzc163/chatTTS.git

  • 4、执行测试代码

import torch
import ChatTTS
from IPython.display import Audio

# Initialize ChatTTS
chat = ChatTTS.Chat()
#./chatTTS为本地模型路径
chat.load_models('local', False, './chatTTS')

# Define the text to be converted to speech
texts = ["Hello, welcome to ChatTTS!",]

# Generate speech
wavs = chat.infer(texts, use_decoder=True)


# Play the generated audio
Audio(wavs[0], rate=24_000, autoplay=True)

如果报错未定义的Normalizer,可以执行一下指令
pip install WeTextProcessing && pip install nemo_text_processing

  • 5、运行webui.py 脚本
    pip install gradio
    python3 ./webui.py --local_path=‘./chatTTS’
    在这里插入图片描述
  • 10
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值