Bilibili's IndexTTS-2 Clones Any Voice and Locks Audio to Exact Durations
Bilibili's IndexTTS-2 is an open-source zero-shot voice cloning model that adds precise duration control and separates speaker identity from emotional tone.
ProTakeaways
- Bilibili released IndexTTS-2, an open-source zero-shot voice cloning model with duration and emotion control.
- First autoregressive TTS to support precise token-count duration control, useful for video dubbing sync.
- Disentangles speaker timbre from emotion, so a neutral voice clone can be made angry, sad, or afraid.
- Emotion controllable via reference audio, 8-dimensional vectors, or natural-language descriptions via a fine-tuned Qwen3.
- Outperforms larger competitors on speaker similarity at 0.8B parameters, with RTF around 0.2 in bf16.
- Code on GitHub, weights under Bilibili's custom Model Use License.
Autoregressive text-to-speech models sound great but carry a stubborn weakness: because they generate one token at a time, you cannot specify exactly how long the output should be. For video dubbing, where audio must fit a precise window, that limitation is a genuine blocker. Bilibili's Index team addresses it with IndexTTS-2, an open-source zero-shot TTS system that clones a voice from a single reference clip and adds precise duration control alongside disentangled emotion control.
The model is available on Hugging Face and ModelScope under Bilibili's Model Use License, with code on GitHub. It supports Chinese and English, and the follow-up IndexTTS-2.5 extends coverage to Japanese, Spanish, and Arabic.
Pinning the duration
IndexTTS-2 supports two generation modes. The first explicitly specifies a token count, letting you target something like exactly 4.2 seconds of audio. The second generates freely in autoregressive fashion, reproducing the prosodic features of the input prompt without a length constraint. Both modes coexist in the same checkpoint, so you choose per call rather than per model.
One caveat: the initial release notes acknowledge that precise duration control was described in the paper but not yet enabled in the shipped checkpoint at launch. Check the repo for the current status before building on it.
Emotion, unbundled from voice
The other headline feature separates emotional expression from speaker identity, so you can clone a calm speaker's voice and render it furious, sad, or terrified without collecting angry or sad recordings from that specific person. The Python API exposes several control surfaces:
- Reference audio for emotion: pass a separate
emo_audio_promptalongside the speaker prompt. - Intensity knob:
emo_alphafrom 0.0 to 1.0 controls how strongly the emotional reference comes through. - Emotion vector: an 8-float list over [happy, angry, sad, afraid, disgusted, melancholic, surprised, calm], letting you mix emotions numerically.
- Text-driven emotion: setting
use_emo_text=Trueanalyzes the script and infers emotional tone automatically. - Explicit emotion prompts: pass a plain-language
emo_textlike "you scared me to death" to steer delivery.
That last option works because the team fine-tuned Qwen3 to translate natural-language emotion descriptions into control vectors. Setting use_random=True on emotion vectors does reduce voice-cloning fidelity, so there is a tradeoff between expressiveness and speaker match.
Benchmark numbers
On multiple datasets, IndexTTS-2 outperforms competing zero-shot TTS models on word error rate, speaker similarity, and emotional fidelity. Word error rate measures whether the model says the right words, speaker similarity scores how closely the clone matches the reference, and emotional fidelity checks whether the requested emotion actually comes through.
The 0.8B-parameter IndexTTS-2.5 holds its own against much larger competitors on the CV3-Eval multilingual zero-shot benchmark (lower WER is better, higher speaker similarity is better):
| Model | Params | Avg WER | Avg SS |
|---|---|---|---|
| VoxCPM2 | 2B | 7.22 | 72.02 |
| OmniVoice | 0.8B | 6.76 | 70.39 |
| Moss-TTS 1.5 | 8B | 9.40 | 68.56 |
| Fish Audio S2 Pro | 4B | 5.94 | 64.49 |
| IndexTTS2.5 | 0.8B | 6.75 | 73.18 |
| IndexTTS2.5-RL | 0.8B | 6.00 | 73.63 |
IndexTTS2.5-RL beats the 8B Moss-TTS on speaker similarity while running at a tenth of the parameter count, and it ties Fish Audio S2 Pro on WER despite having four times fewer parameters.
Running it
The repo uses uv for dependency management and pulls weights from Hugging Face or ModelScope. A minimal clone-and-speak call looks like this:
from indextts.infer_v2 import IndexTTS2
tts = IndexTTS2(
cfg_path="checkpoints_2/config.yaml",
model_dir="checkpoints_2",
use_fp16=False,
)
tts.infer(
spk_audio_prompt="examples/voice_01.wav",
text="Translate for me, what is a surprise!",
output_path="gen.wav",
)
Emotion transfer is a one-argument change:
tts.infer(
spk_audio_prompt="examples/voice_07.wav",
emo_audio_prompt="examples/emo_sad.wav",
emo_alpha=0.9,
text="...",
output_path="gen.wav",
)
On an RTX 4090 with kv-cache enabled, IndexTTS-2 reaches a real-time factor around 0.33 in fp16, generating roughly three seconds of audio per second of compute. FP16 and BF16 inference cut VRAM usage, and optional DeepSpeed acceleration is available. The 2.5 release also ships a vLLM recipe for production deployments.
Where this fits
Non-autoregressive systems like flow-matching models offer duration control but often sound less natural. Autoregressive systems sound better but cannot hit a target length. IndexTTS-2 closes that gap while preserving naturalness, which matters for dubbed video, animated characters, audiobooks with tight timing, and interactive agents that need to fit a conversational beat.
The emotion disentanglement addresses a real production cost. Collecting emotional reference audio for every voice you want to clone is expensive and logistically awkward. Recording a neutral 10-second clip and dialing in anger or sadness from a completely different reference speaker collapses a significant amount of that work.
A few remaining limitations: Arabic word error rates across the field, including IndexTTS-2.5, remain much higher than for Chinese or English. The license is Bilibili's custom Model Use License rather than a standard permissive one, so commercial users should read it carefully before shipping.