VoxCPM2
VoxCPM Speech Series
VoxCPM2 is built for multilingual speech generation, voice design and controllable voice cloning, giving text a richer voice. It supports 30 languages and 9 Chinese dialects with native 48kHz output. Describe a voice in natural language, or provide reference audio to keep a speaker’s timbre, and adjust emotion, pace and style as needed. With streaming generation plus LoRA and full fine-tuning, you can go further into interactive voice apps and personalized voices.
Get the VoxCPM2 model weights and runtime code. Use the weights and configuration for this version, and review the license and usage notes on the model page before downloading.
VoxCPM2 is the current flagship version of the VoxCPM speech series. Built on MiniCPM-4, it uses a diffusion autoregressive architecture without a discrete audio tokenizer, is trained on more than 2 million hours of multilingual speech, and targets multilingual text-to-speech, voice design, controllable voice cloning and streaming generation.
Model Download
| Model | Hugging Face | ModelScope | License |
|---|---|---|---|
| VoxCPM2 | openbmb/VoxCPM2 | OpenBMB/VoxCPM2 | Apache-2.0 |
Model Information
| Item | Official description |
|---|---|
| Parameters | 2B |
| Architecture | Tokenizer-Free Diffusion Autoregressive; the processing pipeline is LocEnc, TSLM, RALM, LocDiT. |
| Audio representation | AudioVAE V2. Reference audio is encoded at 16kHz; the model natively outputs 48kHz audio. |
| Languages | 30 languages, plus 9 Chinese dialects: Sichuanese, Cantonese, Wu, Northeastern Mandarin, Henan, Shaanxi, Shandong, Tianjin and Minnan (Hokkien). |
| Max sequence length | 8192 tokens |
| Inference VRAM | About 8 GB per the official model card; actual usage varies with device, concurrency, whether the denoiser is loaded, and sampling settings. |
| RTX 4090 RTF | About 0.30 on the standard PyTorch path; about 0.13 with Nano-vLLM as a reference. |
Supported Languages and Dialects
30 languages: Arabic, Burmese, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Indonesian, Italian, Japanese, Khmer, Korean, Lao, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Tagalog, Thai, Turkish and Vietnamese. No extra language tag is needed when entering text.
9 Chinese dialects: Sichuanese, Cantonese, Wu, Northeastern Mandarin, Henan, Shaanxi, Shandong, Tianjin and Minnan (Hokkien).
Official Evaluation Summary
| Test set | Intelligibility metric | Speaker similarity (SIM) | Setting |
|---|---|---|---|
| Internal 30-language test set | Average 1.68% | — | 500 samples per language; WER or CER is used per language depending on its characteristics, and the technical report describes the aggregate as average WER. |
| Seed-TTS-eval test-EN | WER 1.84 | 75.3 | Zero-shot voice cloning |
| Seed-TTS-eval test-ZH | CER 0.97 | 79.5 | Zero-shot voice cloning |
| Seed-TTS-eval test-ZH-Hard | CER 8.13 | 75.3 | A more challenging Chinese subset |
These figures are results published in the official technical report under the specified datasets, reference audio and evaluation process. They are intended to help understand the model's capability boundaries and for side-by-side comparison, and do not mean that all languages, voices, hardware or production inputs will achieve the same performance.
Core Capabilities
| Capability | Input | Use cases |
|---|---|---|
| Basic text-to-speech | Target text | Multilingual content generation and local integration. |
| Voice Design | A natural-language timbre description in parentheses before the target text | Designing character voices without reference audio. |
| Controllable voice cloning | Target text and reference audio; optional control description | Keep the timbre while adjusting emotion, speaking rate or expressive style. |
| Ultimate cloning | Target text, prompt audio and its accurate transcript; optionally the same reference audio | Preserve the details of the reference voice through audio continuation. |
| Streaming synthesis | Same as the generation interface | Interactive applications that return audio chunks while generating. |
Requirements
The official Python package requires Python >=3.10, <3.13 and PyTorch >=2.5.0; the NVIDIA GPU path requires CUDA >=12.0. The CLI and Web Demo also support explicitly selecting cpu, mps, cuda or cuda:N, but actual performance and available memory must be verified on the target device.
Known Limitations and Usage Boundaries
- Voice Design and Style Control results may vary between runs; the official model card recommends generating 1–3 times when needed and picking a suitable result.
- Performance varies across languages with training data coverage; build an independent evaluation set for your target language and business text before use.
- Very long or highly expressive inputs may occasionally be unstable; validate with text splitting, retry on failure and quality regression testing.
- Use for impersonation, fraud or spreading disinformation is strictly prohibited; AI-generated audio should be clearly labeled, and speaker consent, privacy and applicable legal requirements must be followed.
Quick Start
Go from setting up the environment to generating your first 48kHz audio clip, trying text-to-speech, voice design, controllable cloning and streaming output in turn. Choose Python or the command line as needed: get the basic example running first, then tune the voice and generation parameters.
Setting Up the Environment
| Item | Requirement or note |
|---|---|
| Python | >=3.10, <3.13 |
| PyTorch | >=2.5.0 |
| CUDA | >=12.0 required for the NVIDIA GPU path |
| Model | openbmb/VoxCPM2; downloaded from Hugging Face on first load. |
| Output | VoxCPM2 natively outputs 48kHz; always save audio using model.tts_model.sample_rate. |
pip install voxcpm soundfile
Basic Text-to-Speech
from voxcpm import VoxCPM
import soundfile as sf
model = VoxCPM.from_pretrained(
"openbmb/VoxCPM2",
load_denoiser=False,
)
wav = model.generate(
text="你好,欢迎使用 VoxCPM2。",
cfg_value=2.0,
inference_timesteps=10,
seed=42,
)
sf.write("output.wav", wav, model.tts_model.sample_rate)
Play output.wav and confirm that the text content, volume, pauses and speaking rate are normal. For the first verification, we recommend fixing seed so you can compare subsequent parameter changes.
Voice Design
No reference audio is needed. Put a description of timbre, age, emotion or speaking rate in parentheses at the beginning of the target text.
wav = model.generate(
text="(年轻女性,声音温柔甜美,语速适中)你好,欢迎使用 VoxCPM2!",
cfg_value=2.0,
inference_timesteps=10,
seed=42,
)
sf.write("voice_design.wav", wav, model.tts_model.sample_rate)
Controllable Voice Cloning
Providing only reference_wav_path is enough to clone the reference timbre; adding a parenthesized description before the target text gives further control over emotion, speaking rate or expressive style.
wav = model.generate(
text="(稍快一点,欢快的语气)这是带风格控制的克隆语音。",
reference_wav_path="speaker.wav",
cfg_value=2.0,
inference_timesteps=10,
seed=42,
)
sf.write("controlled_clone.wav", wav, model.tts_model.sample_rate)
Ultimate Cloning
This path continues from the prompt audio as a speech prefix, so you must provide an accurate transcript of the prompt audio. To improve similarity, you can pass the same clip to both prompt_wav_path and reference_wav_path.
wav = model.generate(
text="这是 VoxCPM2 的极致克隆演示。",
prompt_wav_path="speaker_reference.wav",
prompt_text="参考音频的准确文本转写。",
reference_wav_path="speaker_reference.wav",
)
sf.write("ultimate_clone.wav", wav, model.tts_model.sample_rate)
Streaming Output
import numpy as np
chunks = []
for chunk in model.generate_streaming(
text="这是 VoxCPM2 的流式语音合成演示。",
):
chunks.append(chunk)
wav = np.concatenate(chunks)
sf.write("streaming.wav", wav, model.tts_model.sample_rate)
Command-line Verification
# 音色设计
voxcpm design --text "你好,欢迎使用 VoxCPM2。" --control "年轻女声,温暖柔和" --seed 42 --output design.wav
# 可控声音克隆
voxcpm clone --text "这是克隆后的声音。" --reference-audio speaker.wav --output clone.wav
# 极致克隆
voxcpm clone --text "这是音频续写式克隆。" --prompt-audio speaker.wav --prompt-text "参考音频的准确文本转写。" --reference-audio speaker.wav --output ultimate.wav
# 每行一条文本的批量生成
voxcpm batch --input texts.txt --output-dir outputs
Optional Timestamps
The CLI can output timestamps after generation via stable-ts. This is an optional dependency and does not change VoxCPM2's speech generation path.
pip install "voxcpm[timestamps]"
voxcpm design \
--text "欢迎使用 VoxCPM2。" \
--output out.wav \
--timestamps \
--timestamp-level word \
--timestamp-language zh
Character-level timestamps are derived on a best-effort basis from word-level alignment results; they are not native per-character boundaries from the model. For subtitle segmentation or precise synchronization, spot-check the results and allow for corrections on the application side.
Parameters and Effects
| Parameter | Official default or recommendation | Effect |
|---|---|---|
cfg_value | Default 2.0; CLI recommended range 1.0–3.0 | Higher values usually strengthen adherence to the text or control, but values that are too high may make the voice tense or distorted. |
inference_timesteps | Default 10; CLI accepts 1–100, recommended 4–30 | More steps usually improve detail but also increase inference time. |
seed | Optional | A fixed random seed makes reproduction and parameter comparison easier. |
normalize | Off by default | Enables external text normalization; changes the raw text processing path. |
denoise | Enable only as needed for reference or prompt audio | Can reduce noise but may cause distortion; the 1.x model card also notes that denoising limits the sample rate. |
FAQ
| Symptom | Troubleshooting |
|---|---|
| Model downloads slowly or is unreachable from an internal network | Pre-download with ModelScope snapshot_download("OpenBMB/VoxCPM2"), then pass the local directory to from_pretrained. |
| Low cloning similarity | Switch to a clear, single-speaker, low-noise clip; for ultimate cloning, prompt_text must match the audio verbatim. |
| Control effects fluctuate | The official model card notes that Voice Design and Style Control may vary between generations; fix the seed and generate 1–3 times to compare. |
| Unstable on long text | Split by sentence or paragraph first; the official model card notes that very long or highly expressive inputs may occasionally be unstable. |
| Out of VRAM | Turn off the denoiser, reduce concurrency and make sure the model isn't loaded more than once; the official model card's reference value for a single instance is about 8 GB. |
For long-running services, concurrency and on-device paths, see the VoxCPM2 Deployment Guide.
Related Resources
| Topic | Link |
|---|---|
| Deployment | VoxCPM2 deployment guide |
| Fine-tuning | VoxCPM2 fine-tuning guide |
| Technical report | Technical report in this knowledge base / arXiv paper |
| Code repository | OpenBMB/VoxCPM |
| Official website | voxcpm.com |
| Full documentation | ReadTheDocs |
| Online demo | Mainland China demo / Hugging Face Spaces |
| Audio samples | VoxCPM2 Demo Page |