← Back to BlogOmniVoice: Local Text-to-Speech and Voice Cloning for 600+ Languages

OmniVoice: Local Text-to-Speech and Voice Cloning for 600+ Languages

An open-source, fully local text-to-speech model that supports more than 600 languages, clones a voice from just 3–10 seconds of audio, and runs entirely offline. Here's what it is, how to set it up, and how we're using it to generate narrated audio versions of articles on our own Mac mini.

Note: this overview was checked against the official k2-fsa/OmniVoice repository (README, installation docs, API) as of July 24, 2026. The project is young and under active development, so double-check install commands and the feature list against the repo before deploying.

TTS (text-to-speech) turns written text into audio. Zero-shot means the model doesn't need fine-tuning for a new voice — it clones it from a short sample on the fly.

What OmniVoice Is

OmniVoice is an open-source TTS model built by the k2-fsa team (the group behind the Next-gen Kaldi project; contributors include Daniel Povey, the original creator of Kaldi). It's built on a diffusion language model architecture and supports speech synthesis in 600+ languages, voice cloning, and voice design from a text description. The code is released under the Apache 2.0 license, with weights and examples publicly available.

The key difference from cloud services like Yandex SpeechKit or ElevenLabs is that OmniVoice runs entirely on your own hardware. No API keys, no per-character billing, and no sending your text to someone else's servers — everything is computed locally on your machine or server.

Key Features

FeatureWhat it does
600+ languagesThe widest language coverage among zero-shot TTS models
Voice cloningCopies a voice from a 3–10 second sample, no fine-tuning required
Voice DesignGenerate a voice from a description: gender, age, pitch, accent, whisper
Fine-grained controlNon-verbal cues ([laughter], [sigh]) and pronunciation correction
Fast inferenceReal-time factor as low as 0.025 — up to 40x faster than real time

A note on speed: an RTF of 0.025 (40x) is the ceiling on server-grade GPUs. Real-world numbers are more modest — third-party benchmarks show roughly 5–6x real-time on an RTX 5070 Ti, and around 2.6x on Apple Silicon (our Mac mini), which works out to about 23 seconds of processing per minute of finished audio. That's still plenty for batch, offline narration.

What You Need to Run It

  • Python with a clean virtual environment (conda or venv)
  • PyTorch matching your hardware
  • An accelerator: NVIDIA GPU (CUDA), Apple Silicon (MPS), or Intel Arc GPU (XPU) — on Apple Silicon the model runs via the mps backend
  • A 3–10 second voice sample for cloning (not needed for Voice Design or Auto Voice modes)

Installation

Step 1. Install PyTorch for your platform.

# NVIDIA GPU (example for CUDA 12.8)
pip install torch==2.8.0+cu128 torchaudio==2.8.0+cu128 --extra-index-url https://download.pytorch.org/whl/cu128

# Apple Silicon (Mac mini, MacBook with M-series chips)
pip install torch==2.8.0 torchaudio==2.8.0

Step 2. Install OmniVoice using one of these methods.

# Stable release from PyPI
pip install omnivoice

# Latest version from source (no cloning required)
pip install git+https://github.com/k2-fsa/OmniVoice.git

# For development: clone + editable install
git clone https://github.com/k2-fsa/OmniVoice.git
cd OmniVoice
pip install -e .

If the model fails to download from Hugging Face, set a mirror before running: export HF_ENDPOINT="https://hf-mirror.com".

Trying It Without Writing Code

You can test the model before writing a single line of code:

  • Local web UI: omnivoice-demo --ip 0.0.0.0 --port 8001
  • Hugging Face Space: huggingface.co/spaces/k2-fsa/OmniVoice
  • Google Colab notebook: OmniVoice.ipynb

Python API

All three generation modes use a single model.generate() method.

Voice Cloning

Pass a reference audio sample (ref_audio) along with its transcript (ref_text):

from omnivoice import OmniVoice
import soundfile as sf
import torch

model = OmniVoice.from_pretrained(
    "k2-fsa/OmniVoice",
    device_map="cuda:0",  # Apple Silicon: "mps", Intel Arc: "xpu"
    dtype=torch.float16,
)

audio = model.generate(
    text="Hello, this is a voice cloning test.",
    ref_audio="ref.wav",
    ref_text="Transcript of the reference audio.",
)  # list of np.ndarray shaped (T,) at 24 kHz

sf.write("out.wav", audio[0], 24000)

You can skip ref_text — the model will transcribe the sample automatically via Whisper ASR. It's more convenient, but adds a transcription step.

Reusing a Cloned Voice Across Sessions

Encode a sample once, save the resulting prompt, and skip re-uploading audio in future runs:

prompt = model.create_voice_clone_prompt(
    ref_audio="ref.wav", ref_text="Transcript of the reference audio."
)
prompt.save("my_voice.pt")

# Later, in a new session:
from omnivoice import VoiceClonePrompt
prompt = VoiceClonePrompt.load("my_voice.pt")
audio = model.generate(text="Hello again!", voice_clone_prompt=prompt)

Consistent voice across long texts. If you split content into paragraphs and regenerate each one separately, timbre and pacing drift between chunks (a known issue in the repo). The fix is to save a VoiceClonePrompt once and reuse it for every fragment — the voice stays consistent across an entire article.

Voice Design (Generate a Voice from a Description)

Describe the voice you want using attributes — no sample required. Attributes are comma-separated and can be freely combined: gender, age, pitch, style (whisper), English accent, Chinese dialect.

audio = model.generate(
    text="This is a voice design test.",
    instruct="female, low pitch, british accent",
)

Voice Design was trained only on Chinese and English data. It works for other languages too, but results can be inconsistent for rarer languages and edge cases. Voice cloning remains the most reliable mode.

Auto Voice

The model picks a voice automatically if nothing is specified:

audio = model.generate(text="A sentence with no voice prompt at all.")

Generation Parameters

audio = model.generate(
    text="...",
    num_step=32,     # diffusion steps; 16 is faster but slightly rougher
    speed=1.0,        # speech rate: >1.0 faster, <1.0 slower
    duration=10.0,     # fixed duration in seconds (overrides speed)
)

For the reference sample, use 3–10 seconds of clean audio. Longer samples slow down inference and can degrade the clone quality. For natural pronunciation, use a sample in the same language as the target speech — cross-lingual cloning will carry an accent from the sample's language.

Numbers and dates in text: by default the model may read "2345" digit by digit. For narrating articles and site content, enable text normalization with model.generate(text=..., normalize_text=True). This requires the extra package pip install "omnivoice[tn]", and on macOS (Apple Silicon) you'll also need conda install -c conda-forge pynini first.

Pronunciation Control

OmniVoice understands inline control tags embedded directly in the text.

  • Non-verbal sounds: tags right in the text, e.g. [laughter], [sigh], [surprise-ah]
  • Chinese pronunciation: pinyin with a tone number to correct specific characters
  • English pronunciation: CMU dictionary transcription in uppercase brackets, e.g. [B EY1 S], to force a specific pronunciation
audio = model.generate(text="[laughter] Well, that's a twist I didn't see coming.")

Command Line Interface

Three commands cover everything the Python API offers.

CommandPurpose
omnivoice-demoInteractive web UI (Gradio)
omnivoice-inferSingle generation
omnivoice-infer-batchBatch generation across multiple GPUs

Example of single-shot voice cloning:

omnivoice-infer \
  --model k2-fsa/OmniVoice \
  --text "This is a text-to-speech test." \
  --ref_audio ref.wav \
  --ref_text "Transcript of the reference audio." \
  --output hello.wav

Batch generation accepts JSONL input, where only id and text are required:

{"id": "sample_001", "text": "Hello, world", "ref_audio": "/path/ref.wav", "ref_text": "Sample", "speed": 1.0}

License and Limitations

The code is released under the Apache 2.0 license. For the model weights, check the licensing terms on the Hugging Face model page before any commercial use — open-source speech models sometimes have stricter restrictions on weights than on code.

Clone only your own voice, or a voice you have explicit permission to use. The authors explicitly prohibit using the model for unauthorized cloning, impersonation, or fraud. Responsibility for how it's used rests with the user.

Where a Local, Voice-Cloning Model Pays Off

  • Narrated articles and blog posts in your own voice. Batch-narrate site content with no per-character billing and no content leaving your infrastructure — this is our main use case, described below.
  • Multilingual versions of the same content. One voice clone → the same article narrated in dozens of languages; for natural pronunciation, use a reference sample in the target language.
  • Audiobooks and podcasts. Long-form text in a consistent voice thanks to a saved VoiceClonePrompt; batch generation runs conveniently through omnivoice-infer-batch.
  • Voice notifications and assistants. Offline synthesis for local services and smart-home setups where privacy and no-internet operation matter (the model is already used in Home Assistant).
  • Characters and dubbing without hiring voice talent. Voice Design generates a voice from a description (gender, age, accent, whisper) — handy for prototypes, training videos, and game dialogue.
  • Rough drafts and script review. Quickly "listen through" a text before a final recording; non-verbal tags like [laughter] and [sigh] help gauge intonation early.

Case Study: Narrating a Site's Articles on a Mac Mini

We run OmniVoice on a Mac mini and use it to narrate site content with a cloned version of the author's own voice.

VPS: narration job → Mac mini: OmniVoice → synthesize audio with cloned voice → VPS: save and publish

Here's how the pipeline works:

  • The voice clone was captured from a 10-second recording made directly in QuickTime.
  • Generation runs on the Mac mini: a job arrives from a VPS, the Mac mini synthesizes the audio, and sends the finished file back to the VPS, where it's published on the site.
  • On our hardware, this takes about 23 seconds of processing per minute of finished audio.
  • The synthesis pipeline is swappable: the same content can be regenerated either through Yandex SpeechKit or locally through OmniVoice, and the entire site's audio can be rebuilt on demand.

The takeaway: a local pipeline removes dependency on the cloud and per-character pricing. Audio is generated in your own voice, offline, with the ability to regenerate the entire site's narration at any time.

If you have long-form content or a knowledge base you'd like narrated in your own voice, without depending on a cloud TTS vendor, a local pipeline built on OmniVoice is genuinely practical to put together and get into production. The hardware requirements are modest, the API is straightforward, and the payoff — consistent, private, offline narration — makes it worth the setup time.

For AI Agents

Read with AI

Short prompt for a summary, takeaways, and applying this to your task.

ChatGPTClaude

Want to discuss your own task?

Tell us about the workflow you want to improve. We will help you identify the practical next step.

Request a free consultationExplore our services