Skip to content

Install OmniVoice TTS with Conda

Introduction

OmniVoice is a state-of-the-art massively multilingual zero-shot text-to-speech (TTS) model supporting over 600 languages. Built on a novel diffusion language model-style architecture, it generates high-quality speech with superior inference speed, supporting voice cloning and voice design.

GitHub: https://github.com/k2-fsa/OmniVoice
Hugging Face: https://hf.co/k2-fsa/OmniVoice
Paper: https://arxiv.org/abs/2604.00688
Demo: https://hf.co/spaces/k2-fsa/OmniVoice
Audio Samples: Coming soon!

Prerequisites

System requirements:

  • Operating System: Windows 10/11 (64-bit), macOS, or Linux (Debian/Ubuntu).
  • Python: version >= 3.10 required
  • Disk Space: 10GB+ recommended (for dependencies and model cache). At least 400 MB for Miniconda; 3 GB+ for full Anaconda.
  • The GPU is optional but HIGHLY Recommended for Performance
  • Internet: For downloading dependencies and models from Hugging Face Hub.
Requirements CPU RAM
Minimum Intel Core i3 or AMD Ryzen 3 8 GB
Recommended Intel Core i5 or AMD Ryzen 5 16 GB
High-performance Intel Core i7/i9 or AMD Ryzen 7/9 32 GB
Environment Run this Command Architecture
CPU only pip3 install torch torchvision IA-32 and Intel 64
Apple Silicon pip3 install torch torchvision
AMD ROCm Install PyTorch for ROCm
CUDA 11.8 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 Kepler/Maxwell → Ada Lovelace, Hopper
CUDA 12.1 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 Kepler/Maxwell → Ada Lovelace, Hopper
CUDA 12.4 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 Kepler/Maxwell → Ada Lovelace, Hopper
CUDA 12.6 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 Maxwell → Hopper
CUDA 12.8 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128 Volta → Blackwell
CUDA 12.9 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu129 Volta → Blackwell
CUDA 13.0 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130 Turing → Blackwell
CUDA 13.2 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu132 Turing → Blackwell
CUDA 13.4 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu134 Turing → Blackwell

PyTorch Available versions:

pip index versions torch
pip index versions torchaudio
pip index versions torchvision
pip index versions torch --index-url https://download.pytorch.org/whl/cu118
pip index versions torchaudio --index-url https://download.pytorch.org/whl/cu118
pip index versions torchvision --index-url https://download.pytorch.org/whl/cu118
Environment 2.15.0 2.14.1 2.14.0 2.13.0 2.12.1 2.12.0 2.11.0 2.10.0 2.9.1 2.9.0 2.8.0 2.7.1 2.7.0 2.6.0 2.5.1 2.5.0 2.4.1 2.4.0 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 2.1.0 2.0.1 2.0.0 1.13.1 1.13.0 1.12.1 1.12.0 1.11.0
cpu ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu118 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu121 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu124 ✅ ✅ ✅ ✅ ✅
cu126 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu128 ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu129 ✅ ✅
cu130 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅
cu132 ✅ ✅ ✅ ✅ ✅ ✅
cu134 ✅

Video tutorial

Step 1. Install Miniconda Package

Step 2. Create Conda Environment

Create a conda environment:

name: omnivoice
channels:
- pytorch
- conda-forge
- defaults
dependencies:
# Python version >= 3.10 required
- python=3.10
# Install FFmpeg for pydub audio library
- ffmpeg
- pip
- pip:
    # PyTorch CPU only
    - torch
    - torchaudio

    # OmniVoice-TTS
    - omnivoice

Activate conda environment:

conda env create -f environment.yml
conda activate omnivoice

Can be safely ignored if you only work with WAV audio files, as Pydub supports reading and writing WAV files natively without FFmpeg. However, FFmpeg is required for processing other audio formats such as MP3, OGG, and FLAC, as well as for audio format conversion.

Step 3. Create a Python Script

Create a file named omnivoice_tts_test.py:

from omnivoice import OmniVoice
import soundfile as sf
import torch

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

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.",
    instruct="female, young adult, high pitch, british accent",
) # audio is a list of `np.ndarray` with shape (T,) at 24 kHz.

# If you don't want to input `ref_text` manually, you can directly omit the `ref_text`.
# The model will use Whisper ASR to auto-transcribe it.

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

Run it:

python omnivoice_tts_test.py

The result will be the audio file out.wav

Launch the local web UI

Try OmniVoice without coding:

omnivoice-demo --ip 0.0.0.0 --port 8001

Open your browser and navigate to http://127.0.0.1:8001. The system will automatically download the required model weights from HuggingFace during this first run.