--- license: cc-by-nc-4.0 base_model: - k2-fsa/OmniVoice pipeline_tag: text-to-speech library_name: onnxruntime tags: [text-to-speech, voice-cloning, zero-shot, multilingual, onnx] --- # OmniVoice — corrected bidirectional ONNX export (bf16 variant) Self-contained **bf16** variant of the corrected bidirectional ONNX export of [**k2-fsa/OmniVoice**](https://huggingface.co/k2-fsa/OmniVoice) (600+ language zero-shot voice-cloning TTS, Qwen3-0.6B backbone, 32-step non-autoregressive iterative unmasking, Higgs Audio V2 codec, 24 kHz). Produced for [Sokuji](https://github.com/kizuna-ai-lab/sokuji) ([issue #351](https://github.com/kizuna-ai-lab/sokuji/issues/351)). Sibling variants: [`-bf16`](https://huggingface.co/jiangzhuo9357/omnivoice-onnx-bidi-bf16) (default; fastest + clean on CUDA), [`-fp32`](https://huggingface.co/jiangzhuo9357/omnivoice-onnx-bidi-fp32) (un-quantized reference), [`-int4`](https://huggingface.co/jiangzhuo9357/omnivoice-onnx-bidi-int4) (smallest). **bf16 (default, recommended)** — fastest AND clean on the onnxruntime CUDA EP. A naive fp16 export emits an all-zero `llm_decoder` output on CUDA (deep-layer RMSNorm x^2 overflows fp16's 65504 range → inf → rsqrt 0 → zeros); bf16's fp32-range exponent has no such overflow. `audio_embeddings` is also bf16 (verified lossless, embeds cosine 1.000). ## Contents (backbone at repo root) - `llm_decoder.onnx`, `audio_embeddings_encoder.onnx`, `audio_heads_decoder.onnx` + tokenizer/config — the backbone. - `audio_tokenizer/` — Higgs Audio V2 codec graphs (fp32). - `voices/` — curated reference clips (`.wav` + transcript) for built-in cloning voices. Runs on plain `onnxruntime` (no `onnxruntime-genai`); the non-autoregressive decode loop lives in the app. ## Why bidirectional — what we changed OmniVoice is non-autoregressive: its 32-step iterative unmasking uses the **full (bidirectional)** context. The community `onnx-community/OmniVoice-Onnx` export bakes in a **causal** mask (via onnxruntime-genai's `Qwen3ForCausalLM`) → every MASK position collapses to one token → **noise, not speech**. This repo re-exports the `llm_decoder` with the correct **bidirectional** mask (hidden-state cosine ≈ 1.000 vs the fp32 reference). ## License & attribution — NON-COMMERCIAL **License: `CC-BY-NC-4.0`.** Inherited from [k2-fsa/OmniVoice](https://huggingface.co/k2-fsa/OmniVoice) (weights are CC-BY-NC due to the Emilia training set, CC-BY-NC-4.0). This constraint originates upstream and **cannot be relaxed by any re-upload or format conversion.** This is an **unofficial** re-export for interoperability — **not affiliated with nor endorsed by** the OmniVoice authors. Some intermediate re-uploads mislabel OmniVoice `apache-2.0`; **that is incorrect for the weights — do not use commercially.**