Run this model with HF Jobs
Run moonbox-dev/OmniVoice-TensorRT on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/moonbox-dev/OmniVoice-TensorRT. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/moonbox-dev/OmniVoice-TensorRT on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use moonbox-dev/OmniVoice-TensorRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TensorRT
How to use moonbox-dev/OmniVoice-TensorRT with TensorRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
OmniVoice TensorRT
TensorRT engines of OmniVoice, made by Moonbox for NVIDIA RTX GPUs. Each precision is one folder holding the
engine, trt_runner.py (a small numpy runner: TensorRT plus Polygraphy, no PyTorch) and a script that does the rest
of the pipeline. What the engine takes and returns is under How to run.
Compatibility. The engines are built hardware compatible (Ampere and newer: RTX 30, 40 and 50 series) and
version compatible (any TensorRT 10.x from 10.13 on, through its lean runtime). That costs a little speed against an
engine built for one GPU, but no rebuild is needed. Install the runtime with
pip install "tensorrt-cu12>=10.13,<11" "tensorrt-lean-cu12>=10.13,<11" polygraphy numpy.
Files
The last column is the benchmark (details under How to run).
| Precision | File | Size | sha256 | Benchmark |
|---|---|---|---|---|
| fp16 | fp16/higgs-audio-2-tokenizer-decoder.engine |
154.4 MB | 198a961877da |
WER 0.0 % / CER 0.0 %, similarity 0.971 / 0.955, DNSMOS 3.24 / 3.41 (the ONNX fp16 build 0.0 / 0.0, 0.974 / 0.947, 3.23 / 3.36); same speed (RTF 0.394-0.397 vs 0.396-0.397); 2.2 vs 1.6 GB |
| fp16 | fp16/higgs-audio-2-tokenizer-encoder.engine |
747.1 MB | e0704c09e2e3 |
(the same build: numbers in its first row) |
| fp16 | fp16/lm.engine |
1.30 GB | ceddc9605ebe |
(the same build: numbers in its first row) |
| fp16 | fp16/ov_frontend/__init__.py |
0.1 kB | a55e9ddddfa3 |
(the same build: numbers in its first row) |
| fp16 | fp16/ov_frontend/audio_utils.py |
7.1 kB | 9cb60cbbdece |
(the same build: numbers in its first row) |
| fp16 | fp16/ov_frontend/duration.py |
12.1 kB | 3d30c358b835 |
(the same build: numbers in its first row) |
| fp16 | fp16/ov_frontend/instruct.py |
5.2 kB | 80bbcda15be9 |
(the same build: numbers in its first row) |
| fp16 | fp16/ov_frontend/lang_map.py |
18.6 kB | 48e6101600f8 |
(the same build: numbers in its first row) |
| fp16 | fp16/ov_frontend/text.py |
14.3 kB | 9769039deae3 |
(the same build: numbers in its first row) |
| fp16 | fp16/ov_frontend/voice_design.py |
3.3 kB | 9a2c2b20d0ad |
(the same build: numbers in its first row) |
| fp16 | fp16/pipeline.py |
15.2 kB | ede795879820 |
(the same build: numbers in its first row) |
| fp16 | fp16/pipeline_trt.py |
1.9 kB | 6964ee222c81 |
(the same build: numbers in its first row) |
| fp16 | fp16/tokenizer.json |
11.4 MB | 408f669b7e2b |
(the same build: numbers in its first row) |
| fp16 | fp16/trt_runner.py |
4.4 kB | cbc9abb1f59c |
(the same build: numbers in its first row) |
How to run
Built with Higgs Materials licensed from Boson AI USA, Inc., Copyright Boson AI USA, Inc., All Rights Reserved and
Meta Llama 3 licensed under the Meta Llama 3 Community License, Copyright Meta Platforms, Inc., All Rights Reserved.
The OmniVoice weights are CC BY-NC 4.0: non-commercial use only. The audio tokenizer is under the Boson Higgs Audio 2
Community License: more than 100,000 annual active users need Boson AI's permission. NOTICE and the three
LICENSE.* files in this repository have the terms.
OmniVoice (k2-fsa) as three TensorRT engines plus pipeline_trt.py. It does zero-shot voice cloning, voice design
and automatic voices in 600+ languages. It is a masked, non-autoregressive diffusion language model on Qwen3-0.6B,
over the 8 codebooks of the Higgs Audio 2 tokenizer at 25 frames per second.
The pipeline is this model's ONNX pipeline.py, a numpy port of omnivoice 0.2.1's generate, with its graphs run as
engines. It covers the prompt layout, the duration estimate, 32 steps of masked decoding with classifier-free
guidance, Gumbel position sampling, long-text chunking, and the package's trimming and fades.
import sys
import soundfile as sf
sys.path.insert(0, "fp16")
from pipeline_trt import OmniVoiceTrt
tts = OmniVoiceTrt("fp16")
ref = sf.read("voice.wav", dtype="float32") # (samples, rate)
wav = tts.generate("Hello there.", ref_audio=ref, ref_text="Transcript of the reference.", language="en")
sf.write("hello.wav", wav, 24000)
It needs numpy, tokenizers, soundfile, pydub, TensorRT 10.13 (tensorrt-cu12 or tensorrt-lean-cu12) and
Polygraphy. The engines are version-compatible and built for Ampere or newer GPUs (RTX 30-series and up).
The engines.
lm.engine: the bidirectional Qwen3 0.6B with the audio-codebook embeddings and heads. It takesinput_ids[B, 8, S],audio_mask[B, S] andattention_mask[B, 1, S, S] (bool), with B 1-2 (the guidance pair) and S up to 1,400, and returnslogits[B, 8, S, 1025].higgs-audio-2-tokenizer-encoder.engine: the voice prompt, 24 kHz audio [1, 1, N] of 0.1-10 s, -> codes [1, 8, N / 960].higgs-audio-2-tokenizer-decoder.engine: codes [1, 8, T], T up to 750 (30 s per chunk), -> 24 kHz audio.
Changes from the ONNX graphs.
- Attention mask: the language model fills masked attention scores with -inf. In TensorRT's fused attention that gives NaN rows, so the fill is -65504 here, the lowest fp16 value, which gives the same zero weights.
- RMSNorm: its statistics are computed in fp32, as ONNX Runtime's fused kernel does. Computed as written in fp16, the squares overflow and the engine's logits came out all zero.
- Codec weights: the codec's fp16-stored weights are folded into fp32 constants (fp32 math, as in the ONNX build).
There is no int8: TensorRT's int8 needs calibrated activations. For smaller files, use the ONNX int8/ or int4/
build.
Benchmark.
- Data: the lab's TTS set: 6 English sentences cloned from a LibriSpeech prompt and 4 Chinese sentences from an AISHELL-1 prompt, seeds 0 and 1 (20 clips), on an RTX 3080 Laptop GPU.
- Score: Whisper's word / character error rate, WavLM speaker similarity to the prompt, and DNSMOS.
- Pass mark (set before the first run): against the ONNX
fp16/build, per language, the error rate at most 2 points higher, similarity at most 0.03 lower and DNSMOS at most 0.2 lower. That build passes the same marks against the original (omnivoice'sgenerate, fp32 on CUDA).
| WER English | CER Chinese | similarity en / zh | DNSMOS en / zh | real-time factor | |
|---|---|---|---|---|---|
ONNX fp16/ (CUDA) |
0.0 % | 0.0 % | 0.974 / 0.947 | 3.23 / 3.36 | 0.396-0.397 |
TensorRT fp16/ |
0.0 % | 0.0 % | 0.971 / 0.955 | 3.24 / 3.41 | 0.394-0.397 |
The two builds run at the same speed. The real-time factors were timed in separate processes, alternating, on all
20 clips. The engines hold 2.2 GB against the ONNX fp16/ build's 1.6 GB.
How these were made
From OmniVoice at revision 3fc979d1cd: each engine was built with TensorRT's builder from Moonbox's published
ONNX graph of the same model and precision. The network is strongly typed: every tensor keeps the precision the
ONNX graph gives it, so an fp16 engine computes what the fp16 ONNX build computes. Built on an RTX 3080 Laptop GPU,
it was benchmarked against the original before upload, and the sha256 column above is what the files must hash to.
License
CC-BY-NC-4.0 (weights); audio tokenizer: Boson Higgs Audio 2 Community 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
OmniVoice π
OmniVoice is a massively multilingual zero-shot text-to-speech (TTS) model supporting over 600 languages. Built on a novel diffusion language model-style architecture, it delivers high-quality speech with superior inference speed, supporting voice cloning and voice design.
- Paper: OmniVoice: Towards Omnilingual Zero-Shot Text-to-Speech with Diffusion Language Models
- Repository: GitHub
- Demo: Hugging Face Space
- Colab: Google Colab Notebook
Key Features
- 600+ Languages Supported: The broadest language coverage among zero-shot TTS models.
- Voice Cloning: State-of-the-art voice cloning quality from a short reference audio.
- Voice Design: Control voices via assigned speaker attributes (gender, age, pitch, dialect/accent, whisper, etc.).
- Fine-grained Control: Non-verbal symbols (e.g.,
[laughter]) and pronunciation correction via pinyin or phonemes. - Fast Inference: RTF as low as 0.025 (40x faster than real-time).
- Diffusion Language Model-style Architecture: A clean, streamlined, and scalable design that delivers both quality and speed.
Usage
To get started, install the omnivoice library:
We recommend using a fresh virtual environment (e.g.,
conda,venv, etc.) to avoid conflicts.
Step 1: Install PyTorch
NVIDIA GPU
# Install pytorch with your CUDA version, e.g.
pip install torch==2.8.0+cu128 torchaudio==2.8.0+cu128 --extra-index-url https://download.pytorch.org/whl/cu128
See PyTorch official site for other versions installation.
Apple Silicon
pip install torch==2.8.0 torchaudio==2.8.0
Step 2: Install OmniVoice
pip install omnivoice
Python API
You can use OmniVoice for zero-shot voice cloning as follows:
from omnivoice import OmniVoice
import soundfile as sf
import torch
# Load the model
model = OmniVoice.from_pretrained(
"k2-fsa/OmniVoice",
device_map="cuda:0",
dtype=torch.float16
)
# Generate audio
audio = model.generate(
text="Hello, this is a test of zero-shot voice cloning.",
ref_audio="ref.wav",
ref_text="Transcription of the reference audio.",
) # audio is a list of `np.ndarray` with shape (T,) at 24 kHz.
sf.write("out.wav", audio[0], 24000)
For more generation modes (e.g., voice design), functions (e.g., non-verbal symbols, pronunciation correction) and comprehensive usage instructions, see our GitHub Repository.
Discussion & Communication
You can directly discuss on GitHub Issues.
You can also scan the QR code to join our wechat group or follow our wechat official account.
Citation
@article{zhu2026omnivoice,
title={OmniVoice: Towards Omnilingual Zero-Shot Text-to-Speech with Diffusion Language Models},
author={Zhu, Han and Ye, Lingxuan and Kang, Wei and Yao, Zengwei and Guo, Liyong and Kuang, Fangjun and Han, Zhifeng and Zhuang, Weiji and Lin, Long and Povey, Daniel},
journal={arXiv preprint arXiv:2604.00688},
year={2026}
}
License
Our code is released under the Apache 2.0 License. The pre-trained model is licensed under the CC-BY-NC due to constraints from its training data (e.g., Emilia).
Disclaimer
Users are strictly prohibited from using this model for unauthorized voice cloning, voice impersonation, fraud, scams, or any other illegal or unethical activities. All users shall ensure full compliance with applicable local laws, regulations, and ethical standards. The developers assume no liability for any misuse of this model and advocate for responsible AI development and use, encouraging the community to uphold safety and ethical principles in AI research and applications.
- Downloads last month
- -

