chore: pin Python development version to 3.11.13 (#720)
chore: use Python 3.11 as default development version
chore: pin Python version to 3.11.13
Co-authored-by: Jennie wangyihui02@bilibili.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
The repository history has been reset. Please delete your local copy and re-clone.
(仓库历史已重置。请删除本地副本并重新克隆。)
👉🏻 IndexTTS2 👈🏻
IndexTTS2: A Breakthrough in Emotionally Expressive and Duration-Controlled Auto-Regressive Zero-Shot Text-to-Speech
Abstract
Existing autoregressive large-scale text-to-speech (TTS) models have advantages in speech naturalness, but their token-by-token generation mechanism makes it difficult to precisely control the duration of synthesized speech. This becomes a significant limitation in applications requiring strict audio-visual synchronization, such as video dubbing.
This paper introduces IndexTTS2, which proposes a novel, general, and autoregressive model-friendly method for speech duration control.
The method supports two generation modes: one explicitly specifies the number of generated tokens to precisely control speech duration; the other freely generates speech in an autoregressive manner without specifying the number of tokens, while faithfully reproducing the prosodic features of the input prompt.
Furthermore, IndexTTS2 achieves disentanglement between emotional expression and speaker identity, enabling independent control over timbre and emotion. In the zero-shot setting, the model can accurately reconstruct the target timbre (from the timbre prompt) while perfectly reproducing the specified emotional tone (from the style prompt).
To enhance speech clarity in highly emotional expressions, we incorporate GPT latent representations and design a novel three-stage training paradigm to improve the stability of the generated speech. Additionally, to lower the barrier for emotional control, we designed a soft instruction mechanism based on text descriptions by fine-tuning Qwen3, effectively guiding the generation of speech with the desired emotional orientation.
Finally, experimental results on multiple datasets show that IndexTTS2 outperforms state-of-the-art zero-shot TTS models in terms of word error rate, speaker similarity, and emotional fidelity. Audio samples are available at: IndexTTS2 demo page.
Tips: Please contact the authors for more detailed information. For commercial usage and cooperation, please contact indexspeech@bilibili.com.
Feel IndexTTS2
IndexTTS2: The Future of Voice, Now Generating
Click the image to watch the IndexTTS2 introduction video.
Contact
QQ Group:663272642(No.4) 1013410623(No.5)
Discord:https://discord.gg/uT32E7KDmy
Email:indexspeech@bilibili.com
You are welcome to join our community! 🌏
欢迎大家来交流讨论!
📣 Updates
2025/09/08🔥🔥🔥 We release IndexTTS-2 to the world!2025/05/14🔥🔥 We release IndexTTS-1.5, significantly improving the model’s stability and its performance in the English language.2025/03/25🔥 We release IndexTTS-1.0 with model weights and inference code.2025/02/12🔥 We submitted our paper to arXiv, and released our demos and test sets.🖥️ Neural Network Architecture
Architectural overview of IndexTTS2, our state-of-the art speech model:
The key contributions of IndexTTS2 are summarized as follows:
Model Download
Usage Instructions
⚙️ Environment Setup
The Git-LFS plugin must also be enabled on your current user account:
We use
uvto manage the project’s dependency environment. The following command will automatically create a.venvproject-directory and then installs the correct versions of Python and all required dependencies:If the download is slow, please try a local mirror, for example any of these local mirrors in China (choose one mirror from the list below):
Download via
huggingface-cli:Or download via
modelscope:🖥️ Checking PyTorch GPU Acceleration
If you need to diagnose your environment to see which GPUs are detected, you can use our included utility to check your system:
🔥 IndexTTS2 Quickstart
🌐 Web Demo
Open your browser and visit
http://127.0.0.1:7860to see the demo.You can also adjust the settings to enable features such as FP16 inference (lower VRAM usage), DeepSpeed acceleration, compiled CUDA kernels for speed, etc. All available options can be seen via the following command:
The following startup flags control optional acceleration features. They are chosen when the server starts and cannot be toggled from the WebUI:
--accel: Enable the GPT2 flash-attention acceleration engine. Requires theaccelextra (i.e.flash-attn) to be installed.--torch_compile: Compile the s2mel flow model withtorch.compile. Requires thetorch_compileextra (i.e.triton) to be installed.--fp16: Use half-precision inference (faster and lower VRAM usage).Example with all accelerations enabled:
Have fun!
📝 Using IndexTTS2 in Python
To run scripts, you must use the
uv run <file.py>command to ensure that the code runs inside your current “uv” environment. It may sometimes also be necessary to add the current directory to yourPYTHONPATH, to help it find the IndexTTS modules.Example of running a script via
uv:Here are several examples of how to use IndexTTS2 in your own scripts:
emo_alphato adjust how much it affects the output. Valid range is0.0 - 1.0, and the default value is1.0(100%):[happy, angry, sad, afraid, disgusted, melancholic, surprised, calm]. You can additionally use theuse_randomparameter to introduce stochasticity during inference; the default isFalse, and setting it toTrueenables randomness:use_emo_textto guide the emotions based on your providedtextscript. Your text script will then automatically be converted into emotion vectors. It’s recommended to useemo_alphaaround 0.6 (or lower) when using the text emotion modes, for more natural sounding speech. You can introduce randomness withuse_random(default:False;Trueenables randomness):emo_textparameter. Your emotion text will then automatically be converted into emotion vectors. This gives you separate control of the text script and the text emotion description:Legacy: IndexTTS1 User Guide
You can also use our previous IndexTTS1 model by importing a different module:
For more detailed information, see README_INDEXTTS_1_5, or visit the IndexTTS1 repository at index-tts:v1.5.0.
Our Releases and Demos
IndexTTS2: [Paper]; [Demo]; [ModelScope]; [HuggingFace]
IndexTTS1: [Paper]; [Demo]; [ModelScope]; [HuggingFace]
Acknowledgements
Contributors in Bilibili
We sincerely thank colleagues from different roles at Bilibili, whose combined efforts made the IndexTTS series possible.
Core Authors
Technical Contributors
Technical Guidance
📚 Citation
🌟 If you find our work helpful, please leave us a star and cite our paper.
IndexTTS2:
IndexTTS: