ONNX export of Microsoft's VibeVoice-Realtime-0.5B text-to-speech model for native C# / .NET / cross-platform inference without Python.
This repository contains the VibeVoice-Realtime-0.5B model exported to ONNX format as three subcomponents. It enables running VibeVoice TTS inference using ONNX Runtime in C#, Python, C++, Java, JavaScript, or any language with an ONNX Runtime binding — no PyTorch or Python required at runtime.
VibeVoice uses a diffusion-based architecture that cannot be exported as a single ONNX graph (the denoising loop is iterative). Instead, the model is split into three stages:
LLM backbone (Qwen2.5) — text tokens → hidden states
~400 MB
diffusion_step.onnx
Single DDPM denoising step — called iteratively
~200 MB
acoustic_decoder.onnx
σ-VAE decoder — latents → 24kHz waveform
~100 MB
tokenizer.json
HuggingFace BPE tokenizer vocabulary
~2 MB
voices/
6 English voice presets (.npy format)
~5 MB each
Quick Start — Python (onnxruntime)
python
1import onnxruntime as ort
2import numpy as np
3from huggingface_hub import hf_hub_download
45# Download model files6repo_id ="elbruno/VibeVoice-Realtime-0.5B-ONNX"7text_encoder_path = hf_hub_download(repo_id,"text_encoder.onnx")8diffusion_path = hf_hub_download(repo_id,"diffusion_step.onnx")9decoder_path = hf_hub_download(repo_id,"acoustic_decoder.onnx")1011# Load ONNX sessions12text_encoder = ort.InferenceSession(text_encoder_path)13diffusion = ort.InferenceSession(diffusion_path)14decoder = ort.InferenceSession(decoder_path)1516# Run inference (see example_inference.py for full pipeline)17print("✅ All ONNX models loaded successfully!")18print(f"Text encoder inputs: {[i.name for i in text_encoder.get_inputs()]}")19print(f"Diffusion inputs: {[i.name for i in diffusion.get_inputs()]}")20print(f"Decoder inputs: {[i.name for i in decoder.get_inputs()]}")
Quick Start — C# (.NET / ONNX Runtime)
csharp
1usingMicrosoft.ML.OnnxRuntime;23// Load ONNX models (download from HuggingFace or local path)4usingvar textEncoder =newInferenceSession("text_encoder.onnx");5usingvar diffusion =newInferenceSession("diffusion_step.onnx");6usingvar decoder =newInferenceSession("acoustic_decoder.onnx");78Console.WriteLine("✅ All ONNX models loaded!");9// See example_csharp.md for the full inference pipeline
The ONNX files were exported from the original PyTorch model using torch.onnx.export() with opset version 17. Each subcomponent was traced and exported individually:
Text Encoder — The LLM backbone (Qwen2.5-based) wrapped as a standalone module
Diffusion Step — A single denoising step of the DDPM head, exported with timestep and conditioning inputs
Acoustic Decoder — The σ-VAE decoder that converts latent representations to audio waveforms
Voice presets were converted from PyTorch .pt tensors to NumPy .npy format.
Note: ONNX conversion may introduce small numerical differences (~1e-4 tolerance). Benchmark results should be verified independently on the ONNX variant.
Responsible Usage
This section is reproduced from the original model card per Microsoft's responsible AI guidelines.
Intended Uses
The VibeVoice-Realtime model is intended for research purposes exploring real-time highly realistic audio generation as detailed in the technical report.
Out-of-Scope Uses
This release is NOT intended or licensed for:
Voice impersonation without explicit, recorded consent — including cloning a real individual's voice for satire, advertising, ransom, social engineering, or authentication bypass
Disinformation or impersonation — creating audio presented as genuine recordings of real people or events
Real-time voice conversion — telephone or video-conference "live deep-fake" applications
Circumventing safeguards — any act to disable watermarking, AI disclaimers, or security controls
Unsupported languages — the model is trained only on English data; outputs in other languages are unsupported
Non-speech audio — music, Foley, or ambient sound generation
Safety Mitigations
Microsoft has implemented the following safeguards:
Removed acoustic tokenizer to prevent users from creating voice embeddings for cloning
Audible AI disclaimer automatically embedded in every synthesized audio file
Imperceptible watermark added to generated audio for provenance verification
Recommendation
We do not recommend using VibeVoice in commercial or real-world applications without further testing and development. If you use this model to generate speech, please disclose to the end user that they are listening to AI-generated content.
Limitations
ONNX-specific: Small numerical differences (~1e-4) compared to PyTorch inference
English only: Other languages may produce unpredictable results
No overlapping speech: Does not model or generate overlapping speech
No code/formulas: Cannot read code, mathematical formulas, or uncommon symbols