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’
    在这里插入图片描述

最近更新

  1. TCP协议是安全的吗?

    2024-06-09 02:12:02       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-09 02:12:02       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-09 02:12:02       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-09 02:12:02       18 阅读

热门阅读

  1. 微信小程序的tabbar怎么配置

    2024-06-09 02:12:02       9 阅读
  2. zeppelin(kylin的可视化界面安装)(从头到尾安装)

    2024-06-09 02:12:02       11 阅读
  3. Hash & String 学习笔记

    2024-06-09 02:12:02       9 阅读
  4. creating an HTML file with SQL*Plus

    2024-06-09 02:12:02       9 阅读
  5. CVPR2024论文解读大盘点

    2024-06-09 02:12:02       9 阅读
  6. 新日本语教程 上册语法汇总

    2024-06-09 02:12:02       8 阅读
  7. Electric dust cart introduction

    2024-06-09 02:12:02       9 阅读
  8. element联级别选择器回显数据

    2024-06-09 02:12:02       7 阅读