Skip to content

VoxCPM2

Synthesize expressive 48 kHz speech across 30 languages using OpenBMB’s VoxCPM2 text-to-speech model.

VoxCPM2 is a 2B-parameter multilingual speech model supporting voice cloning, transcript-assisted Ultimate Cloning, and natural-language Voice Design. TomoriBot connects to the official voxcpm Python library through the server in servers/tts/voxcpm2/, running the official unquantized openbmb/VoxCPM2 BF16 checkpoint comfortably within 16 GB of VRAM.

VoxCPM2 code and model weights are released under Apache-2.0, including commercial use subject to the license terms. TomoriBot does not redistribute the weights; the installer downloads them from the official Hugging Face repository.

Official upstream resources:

VoxCPM2 officially supports 30 languages without requiring a language tag:

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.

OpenBMB also documents several Chinese dialects. TomoriBot may still send a language field for compatibility with the common TTS contract, but VoxCPM2 detects the language from the synthesis text and the wrapper does not force a language tag.

Use Auto and Plain markup for cloning and voice design. A reference transcript enables Ultimate Cloning; a delivery instruction takes precedence and omits the transcript for that request.

Recommended starting point:

  • Python 3.10-3.12 (required by both installers)
  • NVIDIA GPU with 8 GB VRAM or more for the official BF16 runtime (12-16 GB gives comfortable headroom), or Apple Silicon with sufficient unified memory for the 2B model
  • CPU is supported as a fallback but is substantially slower

When running on CUDA, VOXCPM2_OPTIMIZE=1 (the default) compiles the model with torch.compile and Triton: the first start takes about 2-3 minutes while PyTorch compiles the model, later starts take under a minute with cached kernels, and synthesis runs roughly 2.5-3x faster than uncompiled while using about 2 GB more system memory. If Triton is missing on a CUDA setup, rerun the installer or set VOXCPM2_OPTIMIZE=0.

On non-CUDA devices (CPU and Apple Silicon mps), the wrapper leaves the VOXCPM2_OPTIMIZE Triton guard inactive so startup does not require Triton, and VOXCPM2_LOAD_DENOISER=0 keeps the CPU-bound denoiser disabled by default.

The server pins the current stable voxcpm 2.0.3 package and downloads openbmb/VoxCPM2 into the normal Hugging Face cache. Run the installer for your OS from the TomoriBot repository root:

The PowerShell installer runs natively (WSL is not required) and installs CUDA-enabled PyTorch 2.10 (cu128) plus triton-windows for VOXCPM2_OPTIMIZE=1:

Terminal window
.\servers\tts\voxcpm2\install-voxcpm2.ps1
.\servers\tts\voxcpm2\.venv\Scripts\python.exe servers\tts\voxcpm2\server.py

On a CPU-only machine without an NVIDIA GPU, pass -Cpu:

Terminal window
.\servers\tts\voxcpm2\install-voxcpm2.ps1 -Cpu

If native Windows PyTorch ever needs a manual CUDA reinstall or driver realignment:

Terminal window
.\servers\tts\voxcpm2\.venv\Scripts\pip.exe install --force-reinstall torch==2.10.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cu128
.\servers\tts\voxcpm2\.venv\Scripts\pip.exe install "triton-windows>=3.6,<3.7"

The first setup downloads several gigabytes of model weights. To install the Python environment without prefetching the model (so voxcpm downloads the checkpoint on first server start instead), set VOXCPM2_PREFETCH=0:

Terminal window
$env:VOXCPM2_PREFETCH = "0"
.\servers\tts\voxcpm2\install-voxcpm2.ps1

After setup, bun run launch --voxcpm2 starts the server together with TomoriBot. The default endpoint is http://127.0.0.1:8016.

Run /providers, choose Add New Custom Endpoint, and configure the Speech endpoint:

  • Capability: Speech
  • API Compatibility: tts-clone
  • Endpoint URL: http://127.0.0.1:8016
  • Voice Source Mode: Auto
  • Script Markup: Plain
  • Supports Instruct: Yes

After saving the connection, select it and use its model dropdown to add a Speech model. Then open /config > Models > Switch Models and select the VoxCPM2 speech model.

Auto is recommended because the same server supports reference-audio cloning and Voice Design. You do not need separate VoxCPM2 processes for the two modes.

For a persona that should clone an existing speaker:

  1. Prepare a clean reference clip with one speaker and little or no background music. Upstream treats 5 to 30 seconds as the practical range.
  2. Open /config under Models > TTS Parameters & Voices and upload the clip.
  3. Add the exact transcript of the reference clip when available. VoxCPM2 uses it for Ultimate Cloning and can reproduce more of the reference rhythm, emotion, and style.
  4. Open /config under Persona > Voice, choose the persona, and assign the saved sample.

If no transcript is stored, VoxCPM2 still performs normal reference-audio cloning.

For a persona that should be created from a written voice description instead of a sample:

  1. Open /config under Persona > Voice and choose VoiceDesign.
  2. Choose the persona.
  3. Enter a natural-language description such as Young adult woman, soft warm voice, relaxed pace, slightly playful delivery.

For a cloned voice, one-off delivery instructions take precedence over the reference transcript.

VariableDefaultPurpose
VOXCPM2_MODEL_IDopenbmb/VoxCPM2Hugging Face model ID or local model directory
VOXCPM2_DEVICEautoRuntime device: auto, cuda, cuda:N, cpu, or mps
VOXCPM2_OPTIMIZE1Compile the model with torch.compile on CUDA; needs Triton, and the server stops at startup without it
VOXCPM2_LOAD_DENOISER0Load the optional upstream denoiser; disabled by default to save memory
VOXCPM2_CFG_VALUE2.0Guidance strength
VOXCPM2_INFERENCE_TIMESTEPS10Flow-matching inference steps; more can improve quality at the cost of speed
VOXCPM2_MAX_LEN4096Maximum generation length
VOXCPM2_NORMALIZE0Enable upstream text normalization
VOXCPM2_RETRY_BADCASE1Enable upstream retry behavior for abnormal generations
VOXCPM2_RETRY_BADCASE_MAX_TIMES3Maximum automatic retries
VOXCPM2_RETRY_BADCASE_RATIO_THRESHOLD6.0Upstream bad-case length threshold
VOXCPM2_PREFETCH1Installer only: download the model during setup
VOXCPM2_PORT8016VoxCPM2 local server port
TOMORI_TTS_HOST127.0.0.1Local server bind address; see Network access

Reference audio must be a non-empty WAV container of at most 10 MB decoded, which the wrapper checks before writing a temporary file.