Implementation of the OmniVoice inference model from k2-fsa on Rust
Rust
29
49 commits
updated Sep 10, 2026
OmniVoice Rust Port
GPU-first Rust workspace for OmniVoice inference, parity validation, and CLI execution with Candle.
This repository is a Rust workspace focused on porting OmniVoice inference to Candle with GPU-first execution.
It contains:
crates/omnivoice-infer — the two-stage inference pipelinecrates/omnivoice-cli — CLI for prompt prep, stage0/stage1 inspection, and full inferencecrates/omnivoice-server — separate OpenAI-compatible HTTP speech server binarydocs/contracts — phase-by-phase behavior contractstools — local reference and support scriptsThe project prefers CUDA and Metal when available, but full OmniVoice inference is available on CPU as well as GPU backends.
There is no public GUI demo in this workspace. The primary interface is the CLI.
cargo run -p omnivoice-cli --features cuda -- infer `
--text "Hello, this is a test of zero-shot text-to-speech." `
--language en `
--output artifacts\demo.wav `
--device cuda:0 `
--seed 1234
If you want to force a local bundle or a specific Hugging Face repo, pass --model:
cargo run -p omnivoice-cli --features cuda -- infer `
--model model `
--text "Hello from a local model bundle." `
--output artifacts\demo-local.wav
For an OpenAI-compatible speech endpoint, run the separate server binary:
$env:OMNIVOICE_API_KEY="local-dev-token"
cargo run -p omnivoice-server --features cuda -- `
--host 127.0.0.1 `
--port 8000 `
--device cuda:0
Pre-generated WAVs let you A/B the upstream Python OmniVoice reference against this Rust port on the same prompts and seed.
| Path | |
|---|---|
| Side-by-side index | artifacts/LISTENING_COMPARE.md |
| Python reference | artifacts/listening_demo/ |
| Rust port | artifacts/listening_demo_rust/ |
Quick CUDA pairs (open both links and listen):
Full 15-scenario CUDA table and CPU folders are in the comparison index.
prepare-prompt, stage0-debug, stage1-decode, and inferomnivoice-server binary with /, /health, /v1/models, and /v1/audio/speech| Backend | Status | Notes |
|---|---|---|
| CPU | ✅ | Full inference verified locally; useful for CPU-only runs and debugging |
| CUDA (NVIDIA) | ✅ | Full inference verified and primary acceleration path |
| Metal (Apple) | ✅ | GPU backend for macOS; implemented and mirrored in tests |
cargo fmt
cargo test -p omnivoice-infer --features cuda --test phase_status -- --nocapture --test-threads=1
cargo test -p omnivoice-cli --features cuda --test phase10_cli_cuda -- --nocapture --test-threads=1
cargo fmt
cargo clippy --workspace --all-targets
cargo test -p omnivoice-infer --features cuda --test phase10_cuda_acceptance -- --nocapture --test-threads=1
cargo test -p omnivoice-cli --features cuda --test phase10_cli_cuda -- --nocapture --test-threads=1
--model <local-path> or let the CLI/server auto-resolve k2-fsa/OmniVoice from Hugging Face.--asr-model, Whisper defaults to oxide-lab/whisper-large-v3-turbo-GGUF and downloads the Candle-compatible config.json, tokenizer.json, and whisper-large-v3-turbo-q4_0.gguf.omnivoice-cli infer for end-to-end synthesis.This workspace builds on top of the official upstream projects:
Official upstream projects remain the source of truth for behavior and engineering reference, but they are not tracked as part of this repository.
See THIRD_PARTY_LICENSES.md for focused upstream attribution relevant to this workspace.
Apache-2.0 — see LICENSE
Copyright (c) 2026 FerrisMind
49 commits
Rust
83.1%
Python
16.8%
Implementation of the OmniVoice inference model from k2-fsa on Rust
Rust
29
49 commits
updated Sep 10, 2026
OmniVoice Rust Port
GPU-first Rust workspace for OmniVoice inference, parity validation, and CLI execution with Candle.
This repository is a Rust workspace focused on porting OmniVoice inference to Candle with GPU-first execution.
It contains:
crates/omnivoice-infer — the two-stage inference pipelinecrates/omnivoice-cli — CLI for prompt prep, stage0/stage1 inspection, and full inferencecrates/omnivoice-server — separate OpenAI-compatible HTTP speech server binarydocs/contracts — phase-by-phase behavior contractstools — local reference and support scriptsThe project prefers CUDA and Metal when available, but full OmniVoice inference is available on CPU as well as GPU backends.
There is no public GUI demo in this workspace. The primary interface is the CLI.
cargo run -p omnivoice-cli --features cuda -- infer `
--text "Hello, this is a test of zero-shot text-to-speech." `
--language en `
--output artifacts\demo.wav `
--device cuda:0 `
--seed 1234
If you want to force a local bundle or a specific Hugging Face repo, pass --model:
cargo run -p omnivoice-cli --features cuda -- infer `
--model model `
--text "Hello from a local model bundle." `
--output artifacts\demo-local.wav
For an OpenAI-compatible speech endpoint, run the separate server binary:
$env:OMNIVOICE_API_KEY="local-dev-token"
cargo run -p omnivoice-server --features cuda -- `
--host 127.0.0.1 `
--port 8000 `
--device cuda:0
Pre-generated WAVs let you A/B the upstream Python OmniVoice reference against this Rust port on the same prompts and seed.
| Path | |
|---|---|
| Side-by-side index | artifacts/LISTENING_COMPARE.md |
| Python reference | artifacts/listening_demo/ |
| Rust port | artifacts/listening_demo_rust/ |
Quick CUDA pairs (open both links and listen):
Full 15-scenario CUDA table and CPU folders are in the comparison index.
prepare-prompt, stage0-debug, stage1-decode, and inferomnivoice-server binary with /, /health, /v1/models, and /v1/audio/speech| Backend | Status | Notes |
|---|---|---|
| CPU | ✅ | Full inference verified locally; useful for CPU-only runs and debugging |
| CUDA (NVIDIA) | ✅ | Full inference verified and primary acceleration path |
| Metal (Apple) | ✅ | GPU backend for macOS; implemented and mirrored in tests |
cargo fmt
cargo test -p omnivoice-infer --features cuda --test phase_status -- --nocapture --test-threads=1
cargo test -p omnivoice-cli --features cuda --test phase10_cli_cuda -- --nocapture --test-threads=1
cargo fmt
cargo clippy --workspace --all-targets
cargo test -p omnivoice-infer --features cuda --test phase10_cuda_acceptance -- --nocapture --test-threads=1
cargo test -p omnivoice-cli --features cuda --test phase10_cli_cuda -- --nocapture --test-threads=1
--model <local-path> or let the CLI/server auto-resolve k2-fsa/OmniVoice from Hugging Face.--asr-model, Whisper defaults to oxide-lab/whisper-large-v3-turbo-GGUF and downloads the Candle-compatible config.json, tokenizer.json, and whisper-large-v3-turbo-q4_0.gguf.omnivoice-cli infer for end-to-end synthesis.This workspace builds on top of the official upstream projects:
Official upstream projects remain the source of truth for behavior and engineering reference, but they are not tracked as part of this repository.
See THIRD_PARTY_LICENSES.md for focused upstream attribution relevant to this workspace.
Apache-2.0 — see LICENSE
Copyright (c) 2026 FerrisMind
49 commits
Rust
83.1%
Python
16.8%