用户可以提供单独的情感提示,从而使模型能够准确地重建目标音色,同时传达指定的情感基调。同时,为了降低情绪控制的障碍,我们通过微调Qwen3设计了一种基于文本描述的软指令机制。这有助于通过自然语言输入有效引导具有所需情感倾向的语音生成。
最后,在多个数据集上的实验结果表明,IndexTTS2在单词错误率、说话者相似性和情感保真度方面优于现有的最先进的 zero-shot TTS 模型。
项目地址:https://github.com/index-tts/index-tts
演示地址:https://index-tts.github.io/index-tts2.github.io/
视频教程地址1:https://youtu.be/pF79l_j_M54
本地部署
部署环境:windows 11、CUDA Toolkit 12.8
cuda toolkit 版本和显卡驱动的版本兼容查看地址:https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
cuda环境
C:\Users\yzy>nvidia-smi
Fri Oct 31 15:20:41 2025
+--------------------------------------------------------------+
| NVIDIA-SMI 572.96 Driver Version: 572.96 CUDA Version: 12.8 |
C:\Users\yzy>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Wed_Jan_15_19:38:46_Pacific_Standard_Time_2025
Cuda compilation tools, release 12.8, V12.8.61
Build cuda_12.8.r12.8/compiler.35404655_0
在系统环境中安装 uv ,一个Python的包管理工具,打开powershell执行下面的命令。
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"开始安装
# 请确保已安装 git 和 git-lfs。
git lfs install
# 下载仓库
git clone https://github.com/index-tts/index-tts.git
cd index-tts
git lfs pull # 下载大文件
# 使用uv安装依赖,会创建虚拟环境,将所有依赖安装到.venv目录
uv sync --extra webui --default-index "https://mirrors.aliyun.com/pypi/simple"
# ModelScope 下载模型
uv tool install "modelscope"
modelscope download --model IndexTeam/IndexTTS-2 --local_dir checkpoints
# 可运行脚本检测机器是否有GPU,以及是否安装了GPU版本的PyTorch。(如PyTorch版本不对,可能使用CPU启动,推理会非常慢)
uv run tools/gpu_check.py
# 启动,启动后访问浏览器
uv run webui.py
deepspeed加速,安装地址 https://github.com/6Morpheus6/deepspeed-windows-wheels ,根据自己的Python版本选择合适的链接下载安装。
# 安装加速包
uv pip install https://github.com/6Morpheus6/deepspeed-windows-wheels/releases/download/v0.17.5/deepspeed-0.17.5+e1560d84-2.8torch+cu128-cp310-cp310-win_amd64.whl
在线体验
我在我的个人工具网站 goldtools.cn 上添加了试用 index-tts-2.0 的应用,欢迎各位前来试用。