# VoxCPM

> Open text-to-speech model that makes, designs and clones voices in 30 languages

- Repository: https://github.com/OpenBMB/VoxCPM
- Category: Image, video & audio
- Stars: 39,952 · Forks: 4,550 · Language: Python · License: Apache-2.0
- Experience: Some experience
- Page: https://ir.adyog.com/repos/openbmb/voxcpm/

VoxCPM2 turns text into speech. Many TTS systems first convert audio into discrete tokens and then predict those tokens. This one skips that step. It generates continuous speech representations directly, using a diffusion autoregressive design built on the MiniCPM-4 language model backbone.

The model has 2 billion parameters and was trained on over 2 million hours of speech. You give it text in any of 30 languages, with no language tag. You can put a short description in parentheses before the text, such as a young woman with a gentle voice, and it invents a matching voice. Or you can give it a reference clip and it copies that voice, with an optional transcript for a closer match.

It accepts 16kHz reference audio and outputs 48kHz audio, with no separate upsampler. The README reports a real-time factor of about 0.3 on an RTX 4090, and about 0.13 with the Nano-vLLM or vLLM-Omni serving engines. Weights and code are under Apache-2.0.

## What it does

- **Voice Design from a description**: Put a description such as age, gender, tone or pace in parentheses at the start of the text. The model creates a new voice with no reference audio.
- **Controllable and ultimate cloning**: Clone a voice from a short reference clip and steer style or emotion with a text instruction. For closer similarity, supply the clip plus its exact transcript.
- **30 languages, 48kHz output**: Text in any supported language is synthesized directly, including several Chinese dialects. Output is 48kHz.
- **Streaming and serving options**: A streaming Python API is included. For higher throughput, the README points to Nano-vLLM-VoxCPM and vLLM-Omni, which offers an OpenAI-compatible speech endpoint.
- **Python API, CLI and web demo**: Use it from Python, from the voxcpm command (design, clone, batch), or through a local web app. The README also links GGUF weights and llama.cpp-omni for on-device use.

## What you could build

- Generate narration or voice-overs in many languages from plain text.
- Design a custom character voice by describing it, without recording anyone.
- Clone a voice from a short clip to read new text in that voice, with consent from the speaker.
- Serve a speech endpoint with an OpenAI-compatible API using vLLM-Omni.
- Batch-convert a text file into audio files from the command line.

## Who it's for

Developers and researchers who want an open TTS model and are comfortable with Python, PyTorch and a CUDA GPU.

## Get started

Install the package on Python 3.10 to 3.12 with PyTorch 2.5 or newer and CUDA 12 or newer. Then load openbmb/VoxCPM2 with VoxCPM.from_pretrained and call generate, or run the voxcpm command to write a wav file.

```
pip install voxcpm
```

Tags: text-to-speech, voice-cloning, multilingual, speech-synthesis, pytorch
