IndexTTS 2.5 ONNX
ONNX builds of IndexTTS 2.5, made by Moonbox for on-device use with ONNX Runtime (CPU, CUDA, DirectML). Each
precision is one folder holding the graphs and a small Python pipeline.py that does the rest (features, prompt,
sampling loop); what the graphs take and return is under How to run.
Files
The last column is the benchmark on Moonbox's TTS set (voice cloning of English and Chinese sentences from a LibriSpeech and an AISHELL-1 prompt; details under How to run): error rate of a Whisper transcript against the text, speaker similarity to the prompt and DNSMOS, against the original PyTorch model.
| Precision | File | Size | sha256 | Benchmark |
|---|---|---|---|---|
| fp16 | fp16/campplus.onnx |
14.7 MB | 9fe5e4f8a052 |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/codec.onnx |
50.7 MB | e9a5b7896618 |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/decoder.onnx |
965.8 MB | be35002101e9 |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/embed.onnx |
25.6 MB | 396bd08ade8b |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/emovec.onnx |
326.6 MB | 47fd5ab88e24 |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/estimator.onnx |
380.8 MB | 9238c4375ecf |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/pipeline.py |
23.9 kB | 018ab5b8adcf |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/prefix.onnx |
178.2 MB | 24f113842256 |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/regulator.onnx |
7.9 MB | c5a8fc638fcc |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/semantic.onnx |
823.1 MB | 15a62f7dd3bc |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/tokenizer.json |
36.1 kB | ed8d69e9e670 |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/tokenizer.tiktoken |
0.9 MB | 747979631e81 |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| fp16 | fp16/vocoder.onnx |
450.5 MB | 2456b729ea91 |
estimator and vocoder fp32, rest fp16: WER 0.15 % / CER 0.0 % (original 0.3 / 0.0, fp32), similarity 0.956 / 0.630 (0.963 / 0.652), DNSMOS 3.13 / 3.11 (3.13 / 3.04); RTF 1.24 (CUDA) |
| int4 | int4/campplus.onnx |
8.2 MB | 92f4614c1b8c |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/codec.onnx |
25.9 MB | 4402990a6a3a |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/decoder.onnx |
314.6 MB | e4793465b12b |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/embed.onnx |
12.9 MB | 746a1f5b38e6 |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/emovec.onnx |
171.4 MB | a08f562b366a |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/estimator.onnx |
99.9 MB | 3b2fcead454a |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/pipeline.py |
23.9 kB | 018ab5b8adcf |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/prefix.onnx |
92.1 MB | f115d20483da |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/regulator.onnx |
4.0 MB | 9470328a78d3 |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/semantic.onnx |
414.9 MB | 956137a94980 |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/tokenizer.json |
36.1 kB | ed8d69e9e670 |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/tokenizer.tiktoken |
0.9 MB | 747979631e81 |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
| int4 | int4/vocoder.onnx |
114.3 MB | f7db970c8d7a |
below threshold (experimental): decoder 4-bit, rest int8: WER 0.15 % / CER 0.5 %, similarity 0.961 / 0.619, DNSMOS 3.17 / 3.14; RTF 1.22 (CUDA) |
How to run
Any modifications made to the original model in this Derivative Work are not endorsed, warranted, or guaranteed by
the original right-holder of the original model, and the original right-holder disclaims all liability related to
this Derivative Work. These files are a Derivative Work of bilibili's IndexTTS-2.5 and are distributed under the
bilibili Model Use License Agreement, copied in this repository as LICENSE. By using them you accept that
agreement, and its terms bind you as a downstream recipient (section 3.4a). In particular:
- If your or your affiliates' products or services had more than 100 million monthly active users in the preceding calendar month, or annual revenue above RMB 1 billion in the preceding calendar year, you need a separate license from bilibili before any use (section 2.2).
- You may not use the model or any Derivative Work to improve any other AI model, except IndexTTS itself, its Derivative Works or non-commercial AI models (section 3.4c).
- Keep the copyright notices and a copy of the agreement in every copy (section 3.4b). Do not deploy in the high-risk settings of section 4.2, and comply with section 4.1 and the publisher's DISCLAIMER: no synthesis of political or public figures or of anyone's voice without authorisation, and no fraud or impersonation.
IndexTTS-2.5 (IndexTeam / bilibili: zero-shot voice cloning from a few seconds of reference audio, Chinese, English
and more, 22.05 kHz output) as ten ONNX graphs plus pipeline.py, a numpy runtime that reproduces the official
IndexTTS2.infer_generator(spk_audio_prompt, text, lang, text_normalization=False) (index-tts @d9e41aa,
infer_v2_5.py) around them.
semantic.onnx: w2v-BERT 2.0 (facebook/w2v-bert-2.0) input featuresfeats[1, T, 160] andmask[1, T] -> layer-17 hidden states, normalised with the publisher's statistics,feat[1, T, 1024].emovec.onnx: those features -> the emotion vectoremovec[1, 1280] (conformer, perceiver, projections).campplus.onnx: mean-removed 80-bin Kaldi fbankfeat[1, T, 80] -> stylestyle[1, 192] (CAM++).prefix.onnx:style,emovec, text idstext[1, L] (with start / stop) and language idlang[1] -> the speech-token GPT's prompt embeddingsembeds[1, 3 + L + 1, 1280].embed.onnx: speech tokenstokens[B, 1] and their positionpos[1] -> embeddings [B, 1, 1280].decoder.onnx: the 24-layer GPT-2:inputs_embeds[B, S, 1280],beam_idx[B] (reorders the cache before use),past_key_values.{0..23}.key / .value[B', 20, P, 64] ->logitsof the last position [B, 8194] andpresent.*.codec.onnx: speech tokenscodes[1, N] -> semantic featuresfeat[1, 2N, 1024] (the semantic codec decoder).regulator.onnx: features repeated to the mel length (nearest) [1, L, 1024] -> the flow's condition [1, L, 512].estimator.onnx: the s2mel DiT with its WaveNet head:x,prompt_x[B, 80, L],t[B],style[B, 192],cond[B, L, 512] ->velocity[B, 80, L].vocoder.onnx: BigVGAN v2 (nvidia/bigvgan_v2_22khz_80band_256x): log-melmel[1, 80, T] -> audiowav[1, 1, 256 T].
pipeline.py does the rest in numpy:
- the reference features: the first 15 s at 22.05 kHz and at 16 kHz, torchaudio's resampler ported, the w2v-BERT feature extractor, Kaldi fbank and the 80-bin mel;
- the official punctuation clean-up and tokenizer (tiktoken,
tokenizer.tiktoken/tokenizer.json), with long text split at 120 tokens; - the official beam sampling: 3 beams, repetition penalty 10 on the log-probabilities, temperature 0.8, top-k 30,
top-p 0.8, length penalty 0, at most 1500 tokens. The cache stays on the GPU and is reordered inside
decoder.onnx; - the flow's 25 Euler steps with classifier-free guidance 0.7 on the reference mel, the vocoder, and the 20 ms fade-out.
It needs numpy, onnxruntime (or onnxruntime-gpu), tiktoken, soundfile and soxr:
python fp16/pipeline.py "The quick brown fox jumps over the lazy dog." out.wav --ref voice.wav --lang en --cuda --seed 0
import sys, soundfile as sf
sys.path.insert(0, "fp16")
import pipeline
tts = pipeline.IndexTTS25("fp16", "cuda")
ref, sr = sf.read("voice.wav", dtype="float32")
wav, out_sr = tts("Text to say.", ref, sr, "en", seed=0) # 22.05 kHz
Not included:
- the official text normalisation (wetext): pass written-out text;
- the Japanese and Spanish frontends;
- emotion control by vector, by text (the Qwen emotion model) or by a second reference. The reference's own emotion is used, as by default;
- the duration factor.
Sampling uses numpy's generator, so a seed gives the same speech every run here, not the same speech as PyTorch with
that seed. On Windows, give the CUDA sessions the run option memory.enable_memory_arena_shrinkage = gpu:0, as
pipeline.py does. Every input length differs, so ONNX Runtime's GPU arena otherwise grows by one KV cache per step,
and device memory counts against the process's commit there.
Precisions. fp16/: every graph fp16 (fp32 inputs and outputs) except the flow estimator and the vocoder,
which stay fp32: in fp16 each is close to the original alone, but together they turned the speech to noise (English
WER 99 %). int4/ (below threshold, experimental): the GPT decoder 4-bit MatMulNBits (block 32), every other graph
weight-only int8 (per output channel; the text and speech-token embedding tables int8 per row). No bf16 build. An
int8 build (the decoder int8 too) scored as int4/ (Chinese similarity 0.620) but ran at real-time factor 2.45, so
it is not published.
Benchmark. The lab's TTS set: 6 English sentences cloned from a LibriSpeech test-clean prompt and 4 Chinese
sentences from an AISHELL-1 prompt, each with seeds 0-7 (80 clips per build), the original's sampling. Sampled speech
can't be compared sample by sample, so each build is judged as the original is: Whisper large-v3-turbo's WER (English)
or CER (Chinese) against the text, WavLM-base-plus-sv speaker similarity to the prompt, and DNSMOS (P.835 overall). The
original is the official code (infer_generator, text_normalization=False, index-tts @d9e41aa) in fp32 on CUDA. Pass
(the TTS threshold used across these repositories): per language, error rate at most 2 points above the original's,
similarity at most 0.03 below, DNSMOS at most 0.2 below. Real-time factor (processing time / audio time) on an RTX
3080 Laptop GPU, whole pipeline.
| English WER | similarity | DNSMOS | Chinese CER | similarity | DNSMOS | Real-time factor | |
|---|---|---|---|---|---|---|---|
| original (PyTorch fp32, CUDA) | 0.3 % | 0.963 | 3.13 | 0.0 % | 0.652 | 3.04 | 1.20 |
| ONNX fp32 (not published) | 0.3 % | 0.958 | 3.14 | 0.5 % | 0.631 | 3.06 | 1.19 |
fp16/ (CUDA) |
0.15 % | 0.956 | 3.13 | 0.0 % | 0.630 | 3.11 | 1.24 |
int4/ (CUDA), below threshold |
0.15 % | 0.961 | 3.17 | 0.5 % | 0.619 | 3.14 | 1.22 |
int4/ misses the threshold on Chinese similarity only: 0.619, 0.033 below the original's (limit 0.03). The Chinese
similarity is noisy: the fp32 ONNX graphs, which match the original modules to 1e-5, scored 0.631, and on seeds 0-3
alone 0.648 against the original's 0.674. The prompt-to-speech similarity of the AISHELL-1 prompt is low for every
build.
Graphs checked against the original modules before the benchmark (largest absolute difference): w2v-BERT 5e-5, emotion vector 4e-7, CAM++ 5e-6, prompt embeddings 4e-6, GPT decoder 8e-6 (against GPT2Model + the head), semantic codec 2e-5, length regulator 2e-7, DiT estimator 3e-5, BigVGAN 2e-6. The numpy frontend matches the official features (resampler 4e-6, w2v-BERT features 8e-6, mel 1e-4, fbank 4e-4) and the text tokens for all 10 sentences.
How these were made
From IndexTTS 2.5 at revision c39ce5ba98. The graphs were exported from the original PyTorch modules with
torch.onnx (opset 17 / 18) and checked against them; language-model decoders were built with onnxruntime-genai's
model builder (inputs_embeds in, KV cache in and out). Weight-only quantization: int8 is a
per-output-channel int8 weight behind DequantizeLinear (or 8-bit MatMulNBits in a text decoder), int4 is ONNX
Runtime's MatMulNBits (block 32). Each card above says which precision every graph uses. Every precision was
benchmarked against the original before upload (pass, per language: error rate at most 2 points above the
original's, speaker similarity at most 0.03 below, DNSMOS at most 0.2 below), and the sha256 column above is what
the files must hash to.
License
other (bilibili custom license). These files are a derivative of the original model and carry its license: it is copied in this repository, and it governs your use of these files. The original model card follows unchanged.
Original model card
IndexTTS-2.5
IndexTTS-2.5 is a zero-shot text-to-speech model that clones a voice from a single reference audio clip. It supports Chinese, English, Japanese, Spanish and Arabic, with cross-lingual voice transfer and emotion control disentangled from timbre.
Compared with IndexTTS-2, it adds Japanese, Spanish and Arabic, infers faster, adds speaking speed control, and improves controllability of Chinese Pinyin, English CMU phonemes and Japanese Kana.
Model Details
- Developed by: IndexTeam, Bilibili
- Model type: Autoregressive zero-shot TTS — GPT backbone, flow-matching speech-to-mel decoder, BigVGAN vocoder
- Parameters: ~0.8B (GPT backbone)
- Languages: Chinese, English, Japanese, Spanish, Arabic
- Output: 22.05 kHz waveform
- License: bilibili Model Use License Agreement
- Repository: github.com/index-tts/index-tts
- Paper: arXiv:2601.03888
Getting Started
Requires Python 3.10–3.11, an NVIDIA GPU, and roughly 6 GB of VRAM for inference.
Install
git clone https://github.com/index-tts/index-tts.git && cd index-tts
pip install -U uv
uv sync --all-extras
Download the weights
# HuggingFace
uv tool install "huggingface-hub"
hf download IndexTeam/IndexTTS-2.5 --local-dir=checkpoints
# or ModelScope
uv tool install "modelscope"
modelscope download --model IndexTeam/IndexTTS-2.5 --local_dir checkpoints
Auxiliary models (w2v-bert-2.0, MaskGCT semantic codec, CAMPPlus, BigVGAN) are not
part of this repository; they are downloaded into checkpoints/hf_cache/ on first run.
Inference
from indextts.infer_v2_5 import IndexTTS2
tts = IndexTTS2(cfg_path="checkpoints/config.yaml", model_dir="checkpoints", use_bf16=True)
# Voice cloning
tts.infer(
spk_audio_prompt="prompt.wav",
text="Hello, this is a voice cloning demo.",
lang="EN",
output_path="output.wav",
)
# Emotion control with an 8-float vector, in the order
# [happy, angry, sad, afraid, disgusted, melancholic, surprised, calm]
tts.infer(
spk_audio_prompt="prompt.wav",
text="快躲起来!是他要来了!",
lang="ZH",
output_path="output.wav",
emo_vector=[0, 0, 0.8, 0, 0, 0, 0, 0],
)
# Pronunciation control: Pinyin, CMU phonemes, or Kana in <word|reading> form
tts.infer(
spk_audio_prompt="prompt.wav",
text="他在银<行|XING2>里<行|HANG2>走了半天。",
lang="ZH",
output_path="output.wav",
)
# Speaking speed: >1.0 slows down, <1.0 speeds up (valid range 0.5–2.0)
tts.infer(
spk_audio_prompt="prompt.wav",
text="大家好,欢迎来到IndexTTS。",
lang="ZH",
output_path="output.wav",
duration_factor=1.2,
)
Web UI
uv run webui.py
Limitations
- Long text is split into segments and the pieces are concatenated with a short silence, so prosody is not modelled across a segment boundary.
- Emotion control from a text description needs the QwenEmotion model, which is
loaded only when IndexTTS2 is constructed with
use_qwen_emo=True. Passinguse_emo_text=Truewithout it raises at inference time. - Enabling random sampling for emotion (
use_random=True) reduces voice cloning fidelity. - The model does not verify that the speaker in a reference clip consented to being cloned. Obtaining that consent is the user's responsibility, and all use is subject to the license terms.
Citation
@misc{li2026indextts25technicalreport,
title={IndexTTS 2.5 Technical Report},
author={Yunpei Li and Xun Zhou and Jinchao Wang and Lu Wang and Yong Wu and Siyi Zhou and Yiquan Zhou and Yining Wang and Yaogen Yang and Zhetao Hu and Shiyao Duan and Jiacheng Xu and Bin Xia and Jingchen Shu},
year={2026},
eprint={2601.03888},
archivePrefix={arXiv},
primaryClass={cs.SD},
url={https://arxiv.org/abs/2601.03888},
}
Model tree for moonbox-dev/IndexTTS-2.5-ONNX
Base model
IndexTeam/IndexTTS-2.5