OpenMAIC

VoxCPM2

Self-hosted TTS and voice cloning. Backend selection, configuration, and voice management.

VoxCPM2 is an open-source TTS model from OpenBMB with voice cloning support. OpenMAIC includes an adapter, so you only need to run VoxCPM on your own machine and connect it.

When to use VoxCPM2

  • You want stable, free TTS with no per-character charges.
  • You want voice cloning, with each Agent using a short sample to generate its own voice.
  • You deploy locally or in an offline environment.

If you only need one default voice, the built-in Doubao or OpenAI-compatible provider is simpler. See Configuration → TTS providers.

1. Run a VoxCPM backend

OpenMAIC supports three deployment modes. All three use the same OpenMAIC adapter; choose the one you run with options.backend on the provider in openmaic.yml (step 2).

BackendEndpointBest for
vLLM-Omni/v1/audio/speechOpenAI-compatible speech endpoint for GPU servers.
Python API/tts/uploadOfficial VoxCPM Python runtime based on FastAPI.
Nano-vLLM/generateLightweight Nano-vLLM FastAPI deployment for smaller machines.

See the VoxCPM repository for startup instructions for each backend. A typical local quick start:

# vLLM-Omni example
pip install vllm
python -m vllm_omni.server --model openbmb/VoxCPM2 --port 8000
# endpoint at http://localhost:8000/v1

2. Point OpenMAIC at it

VoxCPM2 runs on your own network, so its endpoint is configured by the deployment; workspaces cannot add it in Settings → Model Services. Declare it in openmaic.yml, choose the backend with options.backend, and assign it to the tts slot. No API key is required:

openmaic.yml
providers:
  voxcpm:
    preset: voxcpm-tts
    baseUrl: http://localhost:8000/v1
    options:
      backend: vllm-omni          # vllm-omni (default) | python-api | nano-vllm

slots:
  tts: voxcpm

The provider's options.backend applies to every request on the tts slot. Voice registration is available only on the vllm-omni backend; with python-api and nano-vllm, the voice prompt is sent with each request.

Without openmaic.yml, the legacy variable configures the endpoint but cannot choose a backend, so use openmaic.yml for python-api or nano-vllm:

TTS_VOXCPM_BASE_URL=http://localhost:8000/v1

Because the provider is server-managed, its endpoint may be on a private network without ALLOW_LOCAL_NETWORKS, and users cannot override it.

3. Voice management

Assign VoxCPM2 to the tts slot (step 2), then open Settings → Model Services → Text-to-Speech → VoxCPM2. The VoxCPM voice manager appears only when the tts slot resolves to a voxcpm-tts provider, and it has three voice modes.

Auto Voice (default)

During synthesis, OpenMAIC dynamically generates a voice prompt from each Agent's persona. No configuration is required; this is what you get by doing nothing.

Prompt voice

Describe a voice in natural language. Once generated, it can be reused and assigned to any Agent.

Example: “A warm female teacher voice, calm and encouraging, mid-range, with clear articulation.”

Clone voice

Upload a short reference audio clip (≤ 60 seconds, ≤ 10 MB), or record one directly in the browser. The audio is stored in IndexedDB and sent to the backend with each synthesis request.

Troubleshooting

SymptomLikely cause
Requests fail with 404options.backend does not match the backend you run; compare it with the endpoint table in step 1.
First clone request takes ~30sThe backend is cold-starting; later clones reuse the warm runtime.
Audio stops partway throughThe backend output token limit is too low; increase --max-tokens or the corresponding VoxCPM setting.
401 / 403TTS_VOXCPM_API_KEY was set for a backend that does not require a key; leave it empty.

On this page