Back to AI guides

VoxCPM2: Voice Cloning, Design, and Multilingual TTS in One Self-Hosted Model

Stanley Ulili
Updated on September 7, 2026

ElevenLabs produces excellent audio, but every request sends your text to a third-party server, costs per character, and adds network round-trip latency. VoxCPM2 from OpenBMB is the most complete open alternative: a 2-billion parameter model that handles speech generation, voice design, and voice cloning entirely locally under the Apache 2.0 license. It was released in April 2026 and is available at huggingface.co/openbmb/VoxCPM2.

What makes VoxCPM2 different

Most TTS pipelines convert speech to discrete codec tokens before processing it, compressing the audio into fixed units. This process loses the subtle continuous details that make a voice sound human: the slight pauses, shifts in breath, and mid-sentence emotional changes.

A visual comparison showing the difference between discrete bar-like "Codec Tokens" and a smooth, wavy "Continuous" audio representation.

VoxCPM2 works directly with continuous speech representations, which is why the model card describes it as "tokenizer-free." The output is 48kHz audio. The model handles approximately 30 languages without language tags, automatically detecting the input language.

Why self-host

A diagram showing that a self-hosted model avoids sending data to external services like ElevenLabs or requiring audio uploads.

The three concrete reasons to self-host:

Latency. A hosted API adds a network round trip for every request. With a local model, inference runs next to your application and latency drops to GPU compute time only.

Cost at scale. Hosted TTS charges per character. A fixed hardware cost means generating a million utterances or a billion costs the same.

Data privacy. Every request to a cloud TTS service sends your text off-network. For applications handling sensitive, proprietary, or private content, that's a meaningful risk. With VoxCPM2, input and output stay within your infrastructure.

Installation

Requirements: Python 3.10–3.12 (3.13 is not yet supported), PyTorch 2.5+, CUDA 12.0+ for GPU inference. Create a virtual environment first:

 
python -m venv .venv
 
source .venv/bin/activate

Install PyTorch with audio support, then the VoxCPM package:

 
pip install torch torchaudio
 
pip install voxcpm

A terminal window showing the successful completion of the `pip install voxcpm` command.

The voxcpm package downloads model weights (~4.96 GB) from Hugging Face on first run. Before downloading, you can test the model in the browser at the official Hugging Face Space.

Basic speech generation

generate.py
from voxcpm import VoxCPM
import soundfile as sf

model = VoxCPM.from_pretrained(
    "openbmb/VoxCPM2",
    load_denoiser=False,  # faster; enable for cleaner output on noisy hardware
)

wav = model.generate(
    text="This is VoxCPM2 running entirely on local hardware.",
    cfg_value=2.0,         # classifier-free guidance strength; 2.0 is a good default
    inference_timesteps=10, # higher = better quality, slower; 10 is the recommended starting point
)

sf.write("output.wav", wav, model.tts_model.sample_rate)

cfg_value controls guidance strength. Lower values produce more variation; higher values are more faithful to the prompt. inference_timesteps trades speed for quality.

Voice design from a text description

Rather than providing reference audio, you can describe the voice you want and the model synthesizes it. The description goes inside parentheses at the start of the text:

voice_design.py
from voxcpm import VoxCPM
import soundfile as sf

model = VoxCPM.from_pretrained("openbmb/VoxCPM2", load_denoiser=False)

# Describe the voice, then the content
wav = model.generate(
    text="(A middle-aged man, calm and authoritative, podcast host tone) "
         "Welcome back to the show. Today we're covering local AI inference.",
    cfg_value=2.0,
    inference_timesteps=10,
)

sf.write("designed_voice.wav", wav, model.tts_model.sample_rate)

Useful descriptor categories: gender, age, tone (warm, crisp, husky), emotion (cheerful, solemn, energetic), role (news anchor, storyteller, customer service). The model doesn't guarantee exact characteristics but generally produces voices consistent with the description.

Voice cloning from a reference file

Cloning takes a clean WAV file of the target voice and applies its timbre and style to new text:

clone.py
from voxcpm import VoxCPM
import soundfile as sf

model = VoxCPM.from_pretrained("openbmb/VoxCPM2", load_denoiser=False)

wav = model.generate(
    text="This is a clone of the reference speaker saying something new.",
    reference_wav_path="/path/to/speaker.wav",
    cfg_value=2.5,  # slightly higher guidance helps preserve voice characteristics
)

sf.write("cloned.wav", wav, model.tts_model.sample_rate)

You can combine cloning with style control by adding a description in parentheses alongside the reference_wav_path:

 
wav = model.generate(
    text="(slightly faster, cheerful tone) This is the cloned voice with style adjustments.",
    reference_wav_path="/path/to/speaker.wav",
    cfg_value=2.5,
)

A few seconds of clean audio is enough for a usable clone. Longer or cleaner references improve fidelity. The model analyzes timbre, pitch, and cadence rather than replaying the reference.

Multilingual output

Language detection is automatic. Pass text in the target language and the model handles the rest:

The script is updated to show Arabic text being passed to the model.

 
# French
wav = model.generate(text="Tu as compris la dernière phrase ? Dis-moi que oui.")

# Arabic
wav = model.generate(text="يومًا أقرب إلى الأبد يا حبيبتي")

# Japanese
wav = model.generate(text="今日は良い天気ですね。")

Quality varies by language. European languages and Mandarin tend to produce strong results. Some lower-resource languages are still improving. Testing on your target language before committing is worth doing.

Serving as an API with vLLM

Running a Python script is fine for testing. Production use needs a persistent server. vLLM can host VoxCPM2 and expose it through an OpenAI-compatible API:

 
vllm serve openbmb/VoxCPM2 --omni --port 8000

This starts a server at port 8000 exposing /v1/audio/speech. If your application already uses OpenAI's TTS API, the only code change is the base_url:

A diagram shows an application seamlessly switching its target from the OpenAI API to a local server API by simply changing the URL.

client.py
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8000/v1",  # local VoxCPM2 server
    api_key="not-needed",
)

response = client.audio.speech.create(
    model="openbmb/VoxCPM2",
    voice="alloy",  # ignored by VoxCPM2, but required by the SDK
    input="Your application now uses a self-hosted TTS model.",
)
response.stream_to_file("output.mp3")

For on-device inference on Apple Silicon or edge hardware, llama.cpp-omni also supports VoxCPM2 without a CUDA dependency.

Hardware requirements

8GB VRAM handles basic inference for single-request testing. A production server handling concurrent requests and KV caching needs at least 24GB to maintain smooth throughput. The model runs on CPU but is significantly slower.

Where it fits

VoxCPM2 is not the only open TTS option. Chatterbox is lighter and easier to run on constrained hardware, while Qwen3-TTS is strong for voice design specifically. VoxCPM2's advantage is that it covers generation, voice design, and voice cloning in a single 4.96 GB checkpoint with commercial-friendly licensing.

A practical deployment approach is to handle most TTS traffic locally with VoxCPM2, then fall back to a hosted service for edge cases where quality matters most. That hybrid can reduce API costs and latency without giving up quality where it counts.

The GitHub repository at github.com/OpenBMB/VoxCPM covers installation, fine-tuning with SFT and LoRA, the CLI, and the web demo.

Got an article suggestion? Let us know
Licensed under CC-BY-NC-SA

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.