Speech API¶
vLLM-Omni provides an OpenAI-compatible API for text-to-speech (TTS) generation. Supported TTS models include:
- Qwen3-TTS (
Qwen/Qwen3-TTS-12Hz-*) -- Qwen3-based TTS with CustomVoice, VoiceDesign, and Base (voice cloning) task types. Native output: 24 kHz; API output can be resampled to 8 kHz. - Fish Speech S2 Pro (
fishaudio/s2-pro) -- Dual-AR TTS with DAC codec. Supports text-to-speech and voice cloning via reference audio. Output: 44.1 kHz. - Fish Audio Drama 3 (
fishaudio/drama-3) -- Qwen3.5 MoE backbone with a codebook tower and the Fish Speech DAC codec. Supports text-to-speech, voice cloning via reference audio, speaker tags and inline event tags. Output: 44.1 kHz. - Voxtral TTS (
mistralai/Voxtral-4B-TTS-2603) -- AR + FlowMatching TTS with preset voices. Output: 24 kHz. - CosyVoice3 (
FunAudioLLM/Fun-CosyVoice3-0.5B-2512) -- 2-stage talker + flow-matching code2wav. Voice cloning viaref_audio+ref_text(no presets). Output: 24 kHz. - Gepard-1.0 (
nineninesix/gepard-1.0) -- single-stage native-AR TTS with a 22.05 kHz NanoCodec. Zero-shot default voice only.
See the Supported Models section below for the full list, including OmniVoice, VoxCPM2, MOSS-TTS-Nano, and Breeze-TTS-2.
Deployment recipes
TTS deployment recipes are published at recipes.vllm.ai (e.g. Qwen3-TTS, Higgs-Audio v3). The in-repo runbooks live under recipes/.
Each server instance runs a single model (specified at startup via vllm serve <model> --omni).
Quick Start¶
Start the Server¶
# Qwen3-TTS: CustomVoice model (predefined speakers)
vllm serve Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice \
--deploy-config vllm_omni/deploy/qwen3_tts.yaml \
--omni \
--port 8091 \
--trust-remote-code \
--enforce-eager
# Fish Speech S2 Pro
vllm serve fishaudio/s2-pro --omni --port 8091
# Fish Audio Drama 3
vllm serve fishaudio/drama-3 --omni --port 8091
# Voxtral TTS
vllm serve mistralai/Voxtral-4B-TTS-2603 --omni --port 8091
# CosyVoice3 (voice cloning only — supply ref_audio + ref_text per request)
vllm serve FunAudioLLM/Fun-CosyVoice3-0.5B-2512 \
--omni --port 8091 --trust-remote-code
# Gepard-1.0 (zero-shot default voice; packaged gepard.yaml)
vllm-omni serve nineninesix/gepard-1.0 --omni --port 8091 --trust-remote-code \
--stage-init-timeout 900 \
--deploy-config vllm_omni/deploy/gepard.yaml
Generate Speech¶
Qwen3-TTS CustomVoice, using curl:
curl -X POST http://localhost:8091/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "Hello, how are you?",
"voice": "vivian",
"language": "English"
}' --output output.wav
Gepard-1.0, using curl:
Gepard accepts input (required), voice ("default"), response_format, stream / stream_format, max_new_tokens, and seed. Unsupported fields include speed, language, instructions, task_type, ref_audio, ref_text, extra_params, and word_timestamps.
curl -X POST http://localhost:8091/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "Hello, this is Gepard speaking.",
"voice": "default",
"seed": 7
}' --output output.wav
Qwen3-TTS CustomVoice, using Python:
import httpx
response = httpx.post(
"http://localhost:8091/v1/audio/speech",
json={
"input": "Hello, how are you?",
"voice": "vivian",
"language": "English",
},
timeout=300.0,
)
with open("output.wav", "wb") as f:
f.write(response.content)
Using OpenAI SDK:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8091/v1", api_key="none")
response = client.audio.speech.create(
model="Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice",
voice="vivian",
input="Hello, how are you?",
)
response.stream_to_file("output.wav")
API Reference¶
Endpoint¶
Request Parameters¶
OpenAI Standard Parameters¶
| Parameter | Type | Default | Description |
|---|---|---|---|
input | string | required | The text to synthesize into speech |
model | string | server's model | Model to use (optional, should match server if specified) |
voice | string | "vivian" | Speaker name (e.g., vivian, ryan, aiden) |
response_format | string | "wav" | Audio format: wav, mp3, flac, pcm, opus |
speed | float | 1.0 | Playback speed (0.25-4.0) |
vLLM-Omni Extension Parameters¶
| Parameter | Type | Default | Description |
|---|---|---|---|
task_type | string | null (inferred) | TTS task type: CustomVoice, VoiceDesign, or Base. For Qwen3-TTS, ref_audio or ref_text infers Base when this field is omitted, while an uploaded/precomputed voice always selects Base. Other omitted values select CustomVoice; VoiceDesign must be specified explicitly. |
sample_rate | integer | model native | Target output sample rate. Qwen3-TTS supports 8000 or 24000 Hz; the model remains native 24 kHz internally and is resampled before encoding. |
language | string | "Auto" | Language (see supported languages below) |
instructions | string | "" | Voice style/emotion instructions |
max_new_tokens | integer | 2048 | Maximum tokens to generate |
seed | integer | null | Random seed for repeatable generation. |
initial_codec_chunk_frames | integer | null | Per-request initial chunk size override for TTFA tuning. When null, IC is computed dynamically based on server load. |
non_streaming_mode | bool | null | Qwen3-TTS prompt construction mode override. Does not affect HTTP response streaming or async-chunk pipelining. When null, Qwen3-TTS uses model defaults: Base=false, CustomVoice/VoiceDesign=true. |
extra_params | object | null | Model-specific generation controls. See the model sections for supported fields. |
stream | bool | false | When true, stream OpenAI speech.audio.* SSE events (requires response_format="pcm" or "wav"). For raw PCM/WAV byte streaming, set stream_format="audio". |
stream_format | string | null | Streaming output format. "audio" streams raw audio bytes as they are decoded; "sse" streams OpenAI speech.audio.* Server-Sent Events. If omitted, stream=true selects SSE and stream=false remains non-streaming. See Response Format. |
cache_salt | string | null | Caller-supplied prefix-cache salt namespace. Composed with the server-derived conditioning identity (adapter-computed or the derived default), so callers narrow sharing (tenants, sessions) without dropping voice/input isolation. |
Supported languages: Only applicable to Qwen3-TTS. Derived from the model configuration (talker_config.codec_language_id in the checkpoint's config.json), plus Auto, which is always accepted. Official Qwen3-TTS checkpoints support: Auto, Chinese, English, Japanese, Korean, German, French, Russian, Portuguese, Spanish, Italian.
Voice Clone Parameters (Base task)¶
| Parameter | Type | Default | Description |
|---|---|---|---|
ref_audio | string | null | Reference audio (HTTP URL, base64 data URL, or file:// URI with --allowed-local-media-path). Local files fold mtime_ns and size into cache keys to automatically reload on-disk edits; HTTP URLs and base64 URIs remain cached by string locator. |
ref_text | string | null | Transcript of reference audio |
x_vector_only_mode | bool | null | Use speaker embedding only (no ICL) |
Response Format¶
The response shape depends on the streaming parameters:
Non-streaming (default). With stream=false and no stream_format, returns the complete clip as binary audio data with an appropriate Content-Type header (e.g. audio/wav). Because the raw-bytes body has no JSON carrier, successful non-streaming responses from non-diffusion speech servers report usage through response headers:
| Header | Description |
|---|---|
x-vllm-omni-input-tokens | Total input tokens (text_tokens + audio_tokens). |
x-vllm-omni-output-tokens | Generated codec/audio tokens. |
x-vllm-omni-total-tokens | input_tokens + output_tokens. |
x-vllm-omni-input-text-tokens | Tokens from the synthesized text (input plus instructions). |
x-vllm-omni-input-audio-tokens | Reference-audio codec frames, non-zero only for in-context voice cloning. |
Diffusion-mode speech servers route through a separate response path and do not emit these usage headers. They do report the audio format headers described below.
Raw audio stream (stream_format="audio"). Streams raw audio bytes (PCM or WAV) as they are decoded.
pcm is 16-bit signed little-endian, interleaved, at the model's native sample rate and channel count (24 kHz mono for most models; MOSS-TTS-Local v1.5 emits 48 kHz stereo). Raw streams and non-streaming responses state the format in response headers:
| Header | Description |
|---|---|
x-audio-sample-rate | Sample rate of the returned audio in Hz (after any sample_rate resampling). |
x-audio-channels | Channel count of the returned audio. |
x-audio-duration-seconds | Duration of the returned audio in seconds, to three decimals. Non-streaming responses only: a raw stream sends its headers before the audio is generated, so it cannot report a duration. A clip that encoded to zero frames reports 0.000; the header is omitted only when no duration is known. |
Both streaming modes (stream_format="audio" and "sse") require response_format="pcm" or "wav", and speed must be 1.0 (or omitted).
SSE stream (stream=true or stream_format="sse"). Streams OpenAI speech.audio.* Server-Sent Events. Each event has an event: line and a JSON data: line:
-
speech.audio.delta— a base64 audio chunk:{ "type": "speech.audio.delta", "audio": "<base64>", "response_format": "pcm", "sample_rate": 24000, "channels": 1 }sample_rateandchannelsextend the OpenAI event and describe the decoded chunk. -
speech.audio.done— terminal event, carrying the generated audiodurationand tokenusage:{ "type": "speech.audio.done", "duration": 3.2, "usage": { "input_tokens": 119, "output_tokens": 77, "total_tokens": 196, "input_token_details": { "text_tokens": 18, "audio_tokens": 101 } } }durationextends the OpenAI event: it is the total length in seconds of the audio already sent asspeech.audio.deltaevents. Non-streaming responses report the same value in thex-audio-duration-secondsheader. Like that header, it is0.0when the encoder reports zero frames and is absent when no duration is known: empty chunks are skipped before encoding, so a stream with no audio reports no duration rather than0.0. -
speech.audio.error— emitted instead ofspeech.audio.doneif generation fails:
The usage object on speech.audio.done is the same shape returned per item by the batch endpoint:
input_tokens=text_tokens+audio_tokenstext_tokens: tokens of the synthesized text (inputplusinstructions)audio_tokens: reference-audio codec frames, non-zero only for in-context voice cloning (Base task);0for CustomVoice/VoiceDesign or x-vector-only
output_tokens: generated codec tokenstotal_tokens=input_tokens+output_tokens
Voices Endpoint¶
Lists available voices for the loaded model.
{
"voices": ["aiden", "dylan", "eric", "ono_anna", "ryan", "serena", "sohee", "uncle_fu", "vivian", "custom_voice_1"],
"uploaded_voices": [
{
"name": "custom_voice_1",
"consent": "user_consent_id",
"created_at": 1738660000,
"file_size": 1024000,
"mime_type": "audio/wav",
"ref_text": "The exact transcript of the audio sample.",
"speaker_description": "warm narrator"
}
]
}
uploaded_voices is always present (empty list when no custom voices have been uploaded). Fields ref_text and speaker_description are omitted per-entry when not provided at upload time.
Upload a new voice sample for voice cloning in Base task TTS requests.
Form Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
audio_sample | file | Yes | Audio file (max 10MB, supported formats: wav, mp3, flac, ogg, aac, webm, mp4) |
consent | string | Yes | Consent recording ID |
name | string | Yes | Name for the new voice |
ref_text | string | No | Transcript of the audio. When provided, enables in-context voice cloning (higher quality). Without it, only the speaker embedding is extracted. |
speaker_description | string | No | Free-form description of the voice (e.g. "warm narrator", "energetic presenter"). Stored as metadata and returned in GET /v1/audio/voices. |
Response Example:
{
"success": true,
"voice": {
"name": "custom_voice_1",
"consent": "user_consent_id",
"created_at": 1738660000,
"mime_type": "audio/wav",
"file_size": 1024000,
"ref_text": "The exact transcript of the audio sample.",
"speaker_description": "warm narrator"
}
}
Fields ref_text and speaker_description are omitted when not provided at upload time.
Naming rules:
- Names that collide with one of the model's built-in or precomputed voices are rejected (400). Voice files already on disk under such a name are ignored at startup with a warning, so an upload can never shadow a built-in voice.
- Re-uploading an existing uploaded name overwrites it in place (the previous audio file is deleted). Set
VLLM_OMNI_SPEAKER_REGISTRATION_POLICY=immutableon the server to reject duplicates instead, requiring an explicitDELETE /v1/audio/voices/{name}before re-registering — useful when the endpoint is reachable by multiple writers and silent overwrites are a risk. - The voice registry has no per-user ownership: any client that can reach the endpoint can overwrite (default policy) or delete any uploaded voice. For multi-tenant deployments, add authentication at a proxy and namespace voice names per user (e.g.
{user}.{name}).
Usage Example:
curl -X POST http://localhost:8091/v1/audio/voices \
-F "audio_sample=@/path/to/voice_sample.wav" \
-F "consent=user_consent_id" \
-F "name=custom_voice_1" \
-F "ref_text=The exact transcript of the audio sample." \
-F "speaker_description=warm narrator"
Streaming Text Input (WebSocket)¶
The /v1/audio/speech/stream WebSocket endpoint accepts text incrementally. Its default buffered mode synthesizes all text received before input.done as one request. For the supported Qwen3-TTS Chinese/English scope, M1 commitment mode can instead start an independent request whenever the semantic-readiness policy marks a boundary after accumulated raw text.
Important
Commitment mode is not a general sentence detector. Its strong-terminator boundaries say only that the configured finite policy no longer needs to withhold a recognized lexical or special-text suffix. A released segment may be shorter or longer than a linguistic sentence. Every segment is synthesized as a new one-shot request; model and acoustic state are not continued from the preceding segment.
Text transport and audio transport are separate choices. input.text always arrives incrementally. stream_audio=false sends one binary audio frame per synthesis request; stream_audio=true sends one or more PCM chunks per request.
In buffered mode, split_granularity="sentence" or "clause" enables the linguistic splitter and emits requests before EOF. Commitment mode requires split_granularity="none" because only the readiness policy may decide its irreversible boundaries.
WebSocket Protocol¶
Client -> Server:
| Message | Description |
|---|---|
{"type": "session.config", ...} | Session configuration (first message; may be resent between utterances to change it) |
{"type": "input.text", "text": "..."} | Text chunk. It is accumulated in buffered mode or fed to the readiness policy in commitment mode. |
{"type": "input.done"} | End-of-input for the current utterance. It flushes buffered text or closes and flushes the commitment policy, waits for submitted work, and keeps the connection open. |
{"type": "session.close"} | Close the connection. In commitment mode it cancels active and queued synthesis. In buffered mode it discards text not yet submitted, but a close frame cannot be handled while a request is generating, including requests from the linguistic splitter. There is no separate input.cancel message. |
Server -> Client:
| Message | Description |
|---|---|
{"type": "audio.start", "utterance_index": 0, "sentence_index": 0, "sentence_text": "...", "format": "pcm", "sample_rate": 24000, "channels": 1} | Audio generation is starting for one request. In commitment mode, sentence_text is the raw committed segment and sentence_index is its zero-based ordinal; the legacy field names do not assert that it is a sentence. For streamed PCM, it is sent with the first audio chunk and carries that audio's sample_rate and channels (omitted when no audio was produced). |
| Binary frame | Raw audio bytes (one or more PCM chunks when stream_audio=true) |
{"type": "audio.done", "utterance_index": 0, "sentence_index": 0, "total_bytes": 96000, "error": false} | The corresponding request is complete. error=true means it failed. |
{"type": "session.done", "utterance_index": 0, "total_sentences": N} | Terminal marker after input.done/EOF and all started requests have settled. It is not a success indicator. total_sentences is the number of requests that emitted audio.start, despite the compatibility name. |
{"type": "error", "message": "..."} | A protocol, limit, validation, or generation error. Some protocol errors are recoverable; a segment failure terminates the current utterance. |
No additional acknowledgment, boundary, or cancellation event is introduced for M1. Events for a given utterance are emitted in segment order.
Buffered and Commitment Modes¶
text_input_mode in session.config selects the input policy:
buffered(default) preserves the existing behavior. The server stores allinput.textchunks and, oninput.done, strips the outer whitespace and submits the non-empty result as one TTS request. Arbitrary punctuation inside the buffer does not split it into sentences whensplit_granularity="none"(the default). Selectingsentenceorclauseinstead enables the existing linguistic splitter, which may submit requests beforeinput.done.commitmentfeeds each chunk to thezh_en_special_v1semantic-readiness policy. When that policy reportsboundary_after, the server submits all raw source accumulated since the preceding boundary as a new, independent TTS request.input.doneis explicit EOF: it releases any remaining suffix exactly once and then waits until all started segments have settled before sendingsession.done.
The readiness policy does not normalize text. It withholds recognized, unfinished Chinese/English special-text suffixes, including supported numbers, units, symbols, and ASCII words or abbreviations, so a transport packet seam is not itself treated as a safe boundary. The Qwen3-TTS frontend receives each raw released segment and performs its normal per-request tokenization and text normalization.
zh_en_special_v1 is deliberately finite. It is not a general language model, sentence segmenter, pronunciation oracle, or comprehensive text-normalization system. Unrecognized ambiguous text can be released immediately, and a recognized prefix can be held longer than necessary. Clients must not infer prosodic or sentence meaning from the boundaries.
For M1, boundary_after is exposed only after a confirmed strong terminator: ., !, ?, 。, !, ?, …, or a newline. A terminator that might still belong to an unfinished decimal, address, abbreviation, or other recognized atom remains pending until following input disambiguates it. Consecutive terminators such as ... or ?! form one boundary rather than punctuation-only requests. A terminator run at the current transport frontier remains pending until a following non-terminator or EOF confirms the whole run. Commas and transport packet seams do not create boundaries. EOF always flushes the remaining non-whitespace source, even without a strong terminator; whitespace-only segments are not synthesized.
M1 commitment mode has these availability constraints:
- the loaded model must be Qwen3-TTS;
languagemust be explicitlyChineseorEnglish;Autoand every other language are rejected; and- each segment is an independent request. There is no scheduler, connector, Talker, Code2Wav, codec, KV-cache, or acoustic-state inheritance between segments, so seamless cross-segment prosody is not guaranteed.
Independent segments can introduce audible prosody discontinuities and repeat prefill, scheduling, and cleanup work. Use the default buffered mode with split_granularity="none" when whole-utterance continuity matters more than early audio. M1 does not claim a throughput improvement or acoustic continuity.
The adapter's TextCommitmentCapabilities declares its profile, supported languages, independent-segment/context behavior, audio streaming, timestamps, and retry support. The handler checks these capabilities before accepting the session. Qwen3-TTS advertises independent segments without inherited context or segment retries; timestamps still require a configured forced aligner. Commitment requires split_granularity="none" so its released text cannot be split again by a different boundary policy.
Other models and languages remain supported through buffered mode. M1 does not implement the planned M2 rho/CAPS or capacity-based hard-cut policies, resumable scheduler requests, dummy EOF tokens, connector changes, codec ramping, or M3 Talker/Code2Wav state inheritance and acoustic continuity.
Boundaries, Limits, and Failure¶
The commitment policy preserves source order and losslessly partitions input into released raw spans plus at most one pending suffix. Released non-whitespace source is never revised, removed, duplicated, or merged into a later request. EOF is a boundary even when the pending suffix would otherwise remain ambiguous.
The implementation bounds all request-local accumulation:
- at most 4,096 characters may remain unresolved in the readiness policy;
- the utterance may contain at most 128 Ki characters across all
input.textmessages; and - at most eight ready segments may wait in the synthesis queue.
When the segment queue is full, an independent segment producer waits for capacity while the WebSocket receive loop remains able to process control frames such as session.close. Segments already accepted from input.text are staged in source order, with their accumulated text bounded by the 128 Ki character utterance limit. The server does not drop, reorder, merge, or force-release text to relieve backpressure. Exceeding a text limit fails the current utterance.
If synthesis of a segment fails, the server reports error, marks that segment's audio.done with error=true, prevents later queued segments from starting, and waits for input.done. EOF then emits session.done so the connection can return to idle. That event is only an utterance boundary; use error and audio.done.error to determine success. In commitment mode, client disconnect and session.close abort active generation, discard unsubmitted or queued work, and do not emit session.done.
Flushing vs. Closing¶
input.done is a flush, not a disconnect. The server synthesizes the buffered text or finishes the commitment stream, emits terminal session.done after started work has settled, and then waits on the same connection for the next utterance. A client that speaks repeatedly (for example one driven by an upstream LLM) pays the WebSocket handshake once instead of once per utterance.
- The session config is sticky. Send
input.textagain straight aftersession.doneto reuse it, or send anothersession.configfirst to change voice, format, reference audio, ortext_input_mode. Asession.configsent while an utterance is buffered, committing, or draining is rejected so no pending input is silently dropped. - An utterance is the
input.doneunit, not a linguistic one.utterance_indexidentifies end-of-input cycles across the connection. Inbufferedmode withsplit_granularity="none", a non-empty utterance has one request, so it reportssentence_index: 0andtotal_sentences: 1. Incommitmentmode those compatibility fields count the ordered independent segments within the same utterance. - End the connection with
session.close, or by closing the socket. An idle connection is still closed after the server's idle timeout, including gaps between utterances and unresolved-input periods with no committed work. Queued or in-flight commitment synthesis is server generation time, not client idle time; a fresh idle window starts when that work settles.
Session Config Parameters¶
All REST API parameters are supported, plus:
| Parameter | Type | Default | Description |
|---|---|---|---|
stream_audio | bool | false | Stream one or more PCM chunks for each synthesis request over WebSocket |
text_input_mode | "buffered" or "commitment" | "buffered" | Select whole-utterance buffering or M1 semantic-readiness commitment. Commitment requires Qwen3-TTS and explicit language="Chinese" or "English". |
split_granularity | string | "none" | "none": one request per input.done. "sentence": split on .!? plus CJK 。!?…, Indic danda ।॥, and Arabic ؟. "clause": also split on ,;,;،؛. |
seed | integer | null | Forwarded to the speech engine for this session |
ASCII punctuation only ends a unit when whitespace or input.done follows it, and decimals (3.14), thousands separators (1,000), abbreviations (Dr., e.g.) and initials (J. R.) are not treated as boundaries. A punctuation run and any closing quote or bracket stay with the unit they close, so Wait... and He said "Hello." are one request each.
Delete an uploaded voice sample.
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the voice to delete |
Response Example:
Error Response (404 Not Found):
Usage Example:
Examples¶
CustomVoice with Style Instruction¶
curl -X POST http://localhost:8091/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "I am so excited!",
"voice": "vivian",
"instructions": "Speak with great enthusiasm"
}' --output excited.wav
VoiceDesign (Natural Language Voice Description)¶
# Start server with VoiceDesign model first
vllm serve Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign \
--deploy-config vllm_omni/deploy/qwen3_tts.yaml \
--omni \
--port 8091 \
--trust-remote-code \
--enforce-eager
curl -X POST http://localhost:8091/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "Hello world",
"task_type": "VoiceDesign",
"instructions": "A warm, friendly female voice with a gentle tone"
}' --output designed.wav
Base (Voice Cloning)¶
# Start server with Base model first
vllm serve Qwen/Qwen3-TTS-12Hz-1.7B-Base \
--deploy-config vllm_omni/deploy/qwen3_tts.yaml \
--omni \
--port 8091 \
--trust-remote-code \
--enforce-eager
curl -X POST http://localhost:8091/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "Hello, this is a cloned voice",
"task_type": "Base",
"ref_audio": "https://example.com/reference.wav",
"ref_text": "Original transcript of the reference audio",
"non_streaming_mode": true
}' --output cloned.wav
Upload Voice¶
Upload voice (speaker embedding only):
curl -X POST http://localhost:8091/v1/audio/voices \
-F "audio_sample=@/path/to/voice_sample.wav" \
-F "consent=user_consent_id" \
-F "name=custom_voice_1"
Upload voice with transcript (in-context cloning, higher quality):
curl -X POST http://localhost:8091/v1/audio/voices \
-F "audio_sample=@/path/to/voice_sample.wav" \
-F "consent=user_consent_id" \
-F "name=custom_voice_2" \
-F "ref_text=The exact transcript of the audio sample."
Use Uploaded Voice¶
curl -X POST http://localhost:8091/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{
"input": "Hello, this is a cloned voice",
"voice": "custom_voice_1"
}' --output cloned.wav
For Qwen3-TTS, an uploaded voice is a Base voice-cloning input. The server infers task_type="Base" when voice names an uploaded entry, so the request must be sent to a Base checkpoint. Built-in presets such as vivian and ryan remain CustomVoice speakers and require a CustomVoice checkpoint.
Voice Storage & Caching¶
Uploaded voices are persisted to disk as a single .safetensors file per voice (audio samples + metadata — name, consent, ref_text, sample_rate, created_at — in the file header). On server restart the directory is scanned and all previously uploaded voices are restored automatically, so uploads survive process restarts.
Uploading an existing name overwrites the previous entry (a warning is logged).
Feature extraction artifacts (ref_code, speaker_embedding, DAC codes, etc.) are cached in-process with a shared LRU so repeated requests with the same voice=... skip the extraction pipeline. The cache is a true singleton across all TTS model types; deleting a voice invalidates every model-type slot at once.
Decoded reference waveforms use a separate LRU cache of owned, contiguous float32 arrays at the source sampling rate. Its byte budget counts numeric buffers (four bytes per mono sample), excluding cache metadata. Numeric storage avoids retaining a Python float object for every sample during garbage collection. MOSS reference encoding consumes these arrays directly; other list-based interfaces, including MOSS Nano, receive temporary lists that are not retained in the resolve cache. The MOSS reference encoder also releases completed batch inputs before waiting for more work.
Precomputed Custom Voices¶
Qwen3-TTS Base and VoxCPM2 can load offline-precomputed voices at startup. Qwen3-TTS precomputed voices follow the same Base task and checkpoint-matching rules as uploaded voices.
Generate a directory containing custom_voice_manifest.json plus one .safetensors file per voice, then set the pipeline-wide deploy config field:
Qwen3-TTS profiles are created with:
python examples/online_serving/text_to_speech/qwen3_tts/precompute_custom_voice.py \
--model Qwen/Qwen3-TTS-12Hz-1.7B-Base \
--voice-name alice \
--ref-audio /path/to/reference.wav \
--ref-text "Original transcript of the reference audio" \
--mode icl \
--output-dir /path/to/custom_voices
VoxCPM2 profiles are created with:
python examples/online_serving/text_to_speech/voxcpm2/precompute_custom_voice.py \
--model openbmb/VoxCPM2 \
--voice-name alice \
--ref-audio /path/to/reference.wav \
--mode ref_continuation \
--prompt-text "Original transcript of the reference audio" \
--output-dir /path/to/custom_voices
Only profiles whose safetensors payload can be loaded and validated are exposed by GET /v1/audio/voices. Valid precomputed voices can be used in POST /v1/audio/speech by passing voice="alice" without ref_audio.
Configuration (environment variables):
| Variable | Default | Description |
|---|---|---|
SPEAKER_SAMPLES_DIR | ~/.cache/vllm-omni/speakers | Directory for persisted uploaded speakers (.safetensors files). |
SPEAKER_MAX_UPLOADED | 1000 | Maximum number of uploaded speakers kept on disk. Upload requests past the cap return 400. |
VLLM_OMNI_SPEAKER_REGISTRATION_POLICY | overwrite | immutable rejects re-uploading an existing uploaded name (400) until it is deleted; any other value fails startup. |
The in-memory LRU has a fixed 512 MiB byte budget.
Batch Speech Generation¶
The batch endpoint synthesizes multiple texts in a single request, returning all results as JSON with base64-encoded audio.
Endpoint¶
Request Parameters¶
| Parameter | Type | Default | Description |
|---|---|---|---|
items | array | required | List of items to synthesize (1–32) |
model | string | server's model | Model to use |
voice | string | null | Default voice for all items |
response_format | string | "wav" | Default audio format for all items |
speed | float | 1.0 | Default playback speed (0.25–4.0) |
task_type | string | null | Default TTS task type |
language | string | null | Default language |
instructions | string | null | Default voice style instructions |
ref_audio | string | null | Default reference audio (Base task) |
ref_text | string | null | Default reference transcript (Base task) |
max_new_tokens | integer | null | Default max tokens |
non_streaming_mode | bool | null | Default Qwen3-TTS prompt construction mode override. Does not affect HTTP response streaming or async-chunk pipelining. When null, Qwen3-TTS uses model defaults: Base=false, CustomVoice/VoiceDesign=true. |
Each item in the items array requires only input (the text). All other fields are optional and override the batch-level defaults when set:
| Field | Type | Description |
|---|---|---|
input | string | required — text to synthesize |
voice | string | Override voice for this item |
response_format | string | Override format for this item |
speed | float | Override speed for this item |
task_type | string | Override task type |
language | string | Override language |
instructions | string | Override instructions |
ref_audio | string | Override reference audio |
ref_text | string | Override reference transcript |
max_new_tokens | integer | Override max tokens |
non_streaming_mode | bool | Override Qwen3-TTS prompt construction mode. Does not affect HTTP response streaming or async-chunk pipelining. When null, inherits the batch-level value (then the model default). |
Response Format¶
{
"id": "speech-batch-abc123",
"results": [
{
"index": 0,
"status": "success",
"audio_data": "<base64-encoded audio>",
"media_type": "audio/wav",
"usage": {
"input_tokens": 119,
"output_tokens": 77,
"total_tokens": 196,
"input_token_details": { "text_tokens": 18, "audio_tokens": 101 }
}
},
{
"index": 1,
"status": "error",
"error": "Input text cannot be empty"
}
],
"total": 2,
"succeeded": 1,
"failed": 1
}
Each successful item carries a usage object (errored items omit it):
input_tokens=text_tokens+audio_tokenstext_tokens: tokens of the synthesized text (inputplusinstructions)audio_tokens: reference-audio codec frames, non-zero only for in-context voice cloning (Base task);0for CustomVoice/VoiceDesign or x-vector-only
output_tokens: generated codec tokenstotal_tokens=input_tokens+output_tokens
This is the same usage object emitted on the terminal speech.audio.done event of the single endpoint's SSE stream (stream_format="sse").
Examples¶
Basic batch with shared defaults:
curl -X POST http://localhost:8091/v1/audio/speech/batch \
-H "Content-Type: application/json" \
-d '{
"items": [
{"input": "Hello, how are you?"},
{"input": "Goodbye, see you later!"}
],
"voice": "vivian",
"language": "English"
}'
Per-item overrides (different voices and formats):
curl -X POST http://localhost:8091/v1/audio/speech/batch \
-H "Content-Type: application/json" \
-d '{
"items": [
{"input": "Hello!", "voice": "vivian", "response_format": "mp3"},
{"input": "你好!", "voice": "ryan", "language": "Chinese"}
],
"response_format": "wav"
}'
Voice cloning with shared reference audio (Base task):
curl -X POST http://localhost:8091/v1/audio/speech/batch \
-H "Content-Type: application/json" \
-d '{
"items": [
{"input": "First sentence in the cloned voice."},
{"input": "Second sentence in the cloned voice."}
],
"task_type": "Base",
"ref_audio": "https://example.com/reference.wav",
"ref_text": "Transcript of the reference audio"
}'
Setting ref_audio at the batch level applies it to all items, avoiding the need to repeat it per item.
Decoding the response in Python:
import base64
import httpx
response = httpx.post(
"http://localhost:8091/v1/audio/speech/batch",
json={
"items": [
{"input": "First sentence."},
{"input": "Second sentence."},
],
"voice": "vivian",
},
timeout=300.0,
)
for result in response.json()["results"]:
if result["status"] == "success":
audio_bytes = base64.b64decode(result["audio_data"])
with open(f"output_{result['index']}.wav", "wb") as f:
f.write(audio_bytes)
Configuration¶
| Parameter | Source | Default | Description |
|---|---|---|---|
tts_batch_max_items | engine kwarg | 32 | Maximum number of items per batch request |
All items are fanned out to generate() concurrently. The engine's stage worker automatically batches them up to the configured max_num_seqs and queues the rest — no client-side throttling needed.
For best throughput, set both stages' max_num_seqs above 1 via --stage-overrides. On the current Qwen3-TTS CustomVoice benchmark, stage 1 performed best at max_num_seqs: 10:
vllm serve Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice \
--omni --port 8091 --trust-remote-code --enforce-eager \
--stage-overrides '{"0":{"max_num_seqs":10,"gpu_memory_utilization":0.2},
"1":{"max_num_seqs":10,"gpu_memory_utilization":0.2}}'
The bundled qwen3_tts.yaml uses a multi-request default and lets stage 1 batch chunks across in-flight requests. For latency-sensitive deployments, avoid forcing stage 1 back to max_num_seqs: 1; benchmark before reducing it below 10.
The bundled config also sets initial_codec_chunk_frames: 1. This emits only the first audio chunk early for lower TTFA, then returns to the normal codec_chunk_frames window so Code2Wav does not repeatedly decode tiny overlapping chunks.
Supported Models¶
Qwen3-TTS¶
| Model | Task Type | Description |
|---|---|---|
Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice | CustomVoice | Predefined speaker voices with optional style control |
Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign | VoiceDesign | Natural language voice style description |
Qwen/Qwen3-TTS-12Hz-1.7B-Base | Base | Voice cloning from reference audio or an uploaded/precomputed voice |
Qwen/Qwen3-TTS-12Hz-0.6B-CustomVoice | CustomVoice | Smaller/faster variant |
Qwen/Qwen3-TTS-12Hz-0.6B-Base | Base | Smaller/faster Base variant for voice cloning, including uploaded/precomputed voices |
Fish Speech S2 Pro¶
| Model | Description |
|---|---|
fishaudio/s2-pro | 4B dual-AR TTS with DAC codec (44.1 kHz). Supports text-to-speech and voice cloning. |
Fish Speech uses ref_audio and ref_text for voice cloning (no task_type needed). The voice field should be set to "default". See the Fish Speech section of the online TTS hub for details.
Fish Audio Drama 3¶
| Model | Description |
|---|---|
fishaudio/drama-3 | 35B-total / 3B-active MoE TTS with a codebook tower and the DAC codec (44.1 kHz). Supports text-to-speech and voice cloning. |
Drama 3 uses ref_audio and ref_text for voice cloning, like Fish Speech S2 Pro. Speaker tags (<|speaker:N|>) and event tags (for example [sighs]) go in input; event tags are free-form bracketed text, not a fixed list (see the Drama 3 recipe). See the Drama 3 section of the online TTS hub for details.
Voxtral TTS¶
| Model | Description |
|---|---|
mistralai/Voxtral-4B-TTS-2603 | 3B AR + FlowMatching TTS. Supports text-to-speech with preset voices. |
CosyVoice3¶
| Model | Description |
|---|---|
FunAudioLLM/Fun-CosyVoice3-0.5B-2512 | Voice cloning from ref_audio + ref_text. No built-in voice presets — upload a voice or pass ref_audio/ref_text per request. |
Gepard-1.0¶
| Model | Description |
|---|---|
nineninesix/gepard-1.0 | Zero-shot native-AR TTS. 22.05 kHz mono. voice must be omitted or "default". |
Gepard request fields:
| Field | Behavior |
|---|---|
input | Required. Empty/whitespace-only returns 400. |
voice | Omitted or "default" only. Other values 400. |
response_format | wav default. Non-streaming: wav/pcm/flac/mp3. opus returns 400 (22.05 kHz is not an Opus sample rate). Streaming: pcm/wav only. |
stream / stream_format | SSE (speech.audio.*) and raw audio byte streaming. |
speed | Must be 1.0. Gepard has no native speed control. |
max_new_tokens | Frame budget (1 token = 1 frame = 1024 samples ≈ 46.4 ms). Default 1000 from deploy YAML; adapter bounds 1..4096. |
seed | Optional. Reaches the in-model 32-head sampler. The packaged YAML currently pins seed: 42, so serving is deterministic by default until that pin is removed. |
extra_params | Any key returns 400, including temperature/top_p/top_k. |
| Cloning / style fields | ref_audio, ref_text, speaker_embedding, instructions, language, task_type, word_timestamps, and similar declared-but-unsupported fields return 400. |
See the Gepard section of the online TTS hub for launch commands. Native-AR recompute preemption is a known limitation under concurrency.
OmniVoice¶
| Model | Description |
|---|---|
k2-fsa/OmniVoice | OmniVoice generates mono speech at 24 kHz. It supports text-to-speech without a reference clip, voice cloning with ref_audio and optional ref_text, and voice design. It has no built-in voice presets. |
For voice cloning, send ref_audio. If ref_text is missing or blank, the default deploy config leaves Whisper unloaded until the first such request, then loads openai/whisper-large-v3-turbo on the worker device and transcribes the clip. Set additional_config.omnivoice_asr.load_asr_on_startup to true to load it during worker startup. Set additional_config.omnivoice_asr.asr_device to cuda:0 or cpu to override the worker device. Sending ref_text avoids ASR and uses the supplied transcript.
OmniVoice prepares the reference clip before it builds the voice cloning input. It performs these steps:
- It converts the clip to mono, resamples it to 24 kHz, and measures its original root mean square (RMS) level.
- When the original RMS is greater than zero and less than
0.1, it raises the waveform level to0.1and keeps the original RMS for output volume control. - When
ref_textis missing, it trims a clip longer than 20 seconds at a detected silence. Supplied text skips this special long-audio trim. - It removes middle silence and trims silence at both edges whether the transcript is automatic or supplied by the caller.
- It aligns the sample count down to the audio tokenizer hop size.
- When
ref_textis missing, it sends the prepared waveform to Whisper. - It adds a final period for English text or a Chinese full stop for Chinese text when the reference text has no ending punctuation.
- It sends the same prepared waveform to the audio tokenizer.
OmniVoice processes voice-cloning audio after decoding. It removes middle gaps of at least 500 milliseconds. It trims edge silence while keeping 100 milliseconds at each edge. It scales cloned output using the original reference RMS when that value is below 0.1, and leaves the level unchanged when the value is at least 0.1. It fades the first and last 100 milliseconds, then adds 100 milliseconds of silence at each edge. Text-only output returns the decoder tensor without this voice-cloning postprocessing.
OmniVoice uses packed variable-length attention for batched generator execution. The attention operator accepts FP16 and BF16 inputs, so its query, key, and value tensors are evaluated in BF16 even when the stage is configured with dtype: float32; the attention output is converted back to the model's hidden-state dtype before the output projection. Consequently, a float32 stage configuration does not imply FP32 attention arithmetic.
OmniVoice splits long input into smaller text chunks and joins the decoded audio. You can change the split behavior for one request through extra_params:
| Parameter | Type | Default | Description |
|---|---|---|---|
audio_chunk_duration | float | 15.0 | Target duration in seconds for each generated text chunk. The value must be positive. |
audio_chunk_threshold | float | 30.0 | Estimated duration in seconds above which chunking starts. The value must be non-negative. |
The splitter prefers complete sentences and line endings, merging adjacent segments when they fit the character budget. Commas, semicolons, and colons are fallback split points only when a sentence or line exceeds that budget. This avoids unnecessary audio joins inside sentences.
Unlike the upstream OmniVoice splitter, this implementation protects periods and commas between digits from punctuation-based splitting, so numbers such as 0.26 and 0,26 remain intact when they fit the character budget. Oversized chunks still fall back to clause boundaries, whitespace, and finally a hard character split; a single token longer than the budget can therefore still be split. Chunk duration is an estimate, not a hard duration or memory limit.
Use the defaults unless you have tested output quality for your workload. To retain protection from long text word loss, keep audio_chunk_duration at or below 15 seconds and audio_chunk_threshold at or below 30 seconds. Lower values create more chunks and audio joins, which can increase generation time and introduce audible pauses.
OmniVoice accepts at most 64 text chunks per request. Requests that exceed this limit return HTTP 400 before audio generation starts. Increase audio_chunk_duration within the recommended range, or send less text. At the default target duration, 64 chunks represent roughly 16 minutes of estimated audio. The limit bounds the number of generation passes, not the total response duration.
The default omnivoice.yaml uses step execution so a completed short request can return while a longer request continues. New requests can join when a scheduler slot is available. Step execution adds scheduling overhead and can increase the long request's latency. If you disable step_execution, every request in a batch waits for the longest request to finish all its chunks. Setting max_num_seqs: 1 prevents shared batches, but requests still wait behind the running request.
Voice cloning uses the supplied or automatically transcribed reference text and reference audio length to estimate the target duration. Reference-based estimation also applies to short requests that do not activate chunking. Text-only requests retain the fixed text-based duration heuristic.
{
"input": "A long passage to synthesize...",
"extra_params": {
"audio_chunk_duration": 15.0,
"audio_chunk_threshold": 30.0
}
}
VoxCPM2¶
| Model | Description |
|---|---|
openbmb/VoxCPM2 | TTS + voice cloning with built-in speaker presets and uploaded-voice support. Accepts voice (preset or uploaded) or ref_audio + optional ref_text. |
Startup LoRA adapter¶
To serve a fine-tuned VoxCPM2 voice, set voxcpm2_runtime_config.startup_lora_path in the stage's hf_overrides. Copy vllm_omni/deploy/voxcpm2.yaml to a local deploy config and add this key alongside its existing runtime settings:
# Under stages[0].engine_extras.hf_overrides.voxcpm2_runtime_config:
startup_lora_path: /absolute/path/to/adapter
Then launch with the modified config:
The directory must be accessible to the worker and contain the native VoxCPM2 training export: lora_config.json (with a lora_config object containing r, alpha, enabled groups, and target module names) and lora_weights.safetensors. PEFT checkpoints and pickle checkpoints are not accepted. Missing, unexpected, non-finite, or incorrectly shaped adapter tensors fail model loading rather than silently loading a partial adapter.
The adapter is merged into the base LM, residual LM, LocDiT, and optional projection layers selected by its configuration, after base weight loading and before compilation or CUDA graph capture. All requests use that adapter; voice still selects a reference voice, not a LoRA adapter. Changing adapters requires restarting the server. Runtime loading/unloading, per-request multi-LoRA selection, and load_format=dummy are not supported by this path. Weight fusion rounds to the base model's dtype, so numerical and speech-quality parity should be checked against the upstream adapter on your deployment.
MOSS-TTS-Nano¶
| Model | Description |
|---|---|
OpenMOSS-Team/MOSS-TTS-Nano | Voice cloning only. Requires ref_audio (or an uploaded voice); no built-in voice presets. ref_text is accepted but ignored — upstream's voice_clone mode does not consume a transcript. |
Breeze-TTS-2¶
| Model | Description |
|---|---|
BreezeBlue/Breeze-TTS-2 | Two-stage AR TTS (T5Gemma2 + Qwen3 talker with a depth decoder, bundled Qwen3-TTS codec) at 24 kHz. Four modes are selected from the request fields: plain (input + speaker tag voice, S0..S9), voice design (instructions), voice clone (ref_audio + ref_text, exactly one clip), and voice direction (reference + instructions). Greedy decoding only: sample_rate must be 24000, speed must be 1.0, and guidance_scale/cfg_scale other than 1.0, negative_prompt, temperature/top_p/top_k overrides, language, and speaker_embedding are rejected. Streaming returns PCM speech.audio.delta events. See recipes/BreezeBlue/Breeze-TTS-2.md. |
Error Responses¶
400 Bad Request¶
Invalid parameters:
{
"error": {
"message": "Input text cannot be empty",
"type": "BadRequestError",
"param": null,
"code": 400
}
}
Qwen3-TTS task/checkpoint mismatch:
{
"error": {
"message": "Qwen3-TTS CustomVoice checkpoint does not support task_type='Base'. Use task_type='CustomVoice' or load the matching Base checkpoint.",
"type": "BadRequestError",
"param": null,
"code": 400
}
}
404 Not Found¶
Model not found:
{
"error": {
"message": "The model `xxx` does not exist.",
"type": "NotFoundError",
"param": "model",
"code": 404
}
}
Troubleshooting¶
"TTS model did not produce audio output"¶
Ensure you're using the correct model variant for your task type:
- CustomVoice task → CustomVoice model
- VoiceDesign task → VoiceDesign model
- Base task → Base model
Uploaded and precomputed Qwen3-TTS voices select the Base task, even when the client supplies a different task_type; serve them with a Base checkpoint. Built-in Qwen3-TTS presets remain CustomVoice voices.
Server Not Running¶
Out of Memory¶
If you encounter OOM errors:
- Use smaller model variant:
Qwen/Qwen3-TTS-12Hz-0.6B-CustomVoice - Reduce
--gpu-memory-utilization
Unsupported Speaker¶
Use /v1/audio/voices to list available voices for the loaded model.
Orchestration Loop (experimental)¶
Multi-stage omni deployments route stage outputs through a single orchestrator loop. The legacy loop polls every stage replica on a 1 ms cadence. The event-driven mode replaces the poll with one reader task per live stage replica awaiting its client directly. Every pipeline uses the event-driven mode by default; the legacy poll remains available as an opt-out. The serving-side final-output loop is independent of this setting: it is always woken when the orchestrator queues output.
Configuration (environment variables):
| Variable | Default | Description |
|---|---|---|
VLLM_OMNI_EVENT_DRIVEN_ORCH | On | Selects between event-driven wakeups and the legacy 1 ms poll for the orchestration loop. The value is resolved at orchestrator construction. 1, true, yes, or on keeps event-driven mode, ignoring case and surrounding whitespace; any other value, such as 0, selects the legacy poll loop. |
Set it on the process that runs the orchestrator (stage 0 of an omni deployment) before starting the server when overriding the default. For example, select the legacy poll loop for Qwen3-TTS:
The server logs the selected loop mode and its reader/poller counts once at startup, so you can confirm which loop is live.
Routing, output ordering, and terminal-state behavior are identical on both loops; only the poll cadence changes. Leaving the variable unset selects event-driven orchestration for every pipeline.
Known limitations:
- The measured serving A/B (idle CPU 2.43% to 0.07%; TTFP p99 -32% at concurrency 8) predates the rebuild on the per-replica fault-isolation work in #4285. That work changed dead-replica handling and reader/poller lifecycle rather than the steady-state output path, and the parity suite covers it, but the serving A/B has not been re-run on the current head.
- Concurrency 1 and 32 measured at parity with the legacy loop. At 32 the latency is admission-bound, which this mode does not address.
Development¶
Enable debug logging:
vllm serve Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice \
--deploy-config vllm_omni/deploy/qwen3_tts.yaml \
--omni \
--port 8091 \
--trust-remote-code \
--enforce-eager \
--uvicorn-log-level debug
Reusing reference audio¶
The voice upload API and cache settings below are shared serving features. For repeated voices, upload the reference once and reuse its name. The example uses MOSS-TTS Local: uploading stores the audio, and the first speech request encodes it. MOSS-TTS Local can then reuse cached reference codes without resolving the waveform while the speaker cache entry remains resident. After a server restart or speaker-cache eviction, another speech request warms the codes again. Reference processing and cache-hit behavior for other models depend on their serving adapters.
curl --fail http://localhost:8123/v1/audio/voices \
-F 'name=my-speaker' \
-F 'consent=user_consent_id' \
-F 'audio_sample=@/path/to/reference.wav'
# Run once to warm the reference codes, then reuse the same voice.
curl --fail http://localhost:8123/v1/audio/speech \
-H 'Content-Type: application/json' \
-d '{"model":"OpenMOSS-Team/MOSS-TTS-Local-Transformer-v1.5","voice":"my-speaker","input":"Hello, world.","response_format":"wav"}' \
--output speech.wav
If you have the reference transcript, upload it with -F 'ref_text=...'. MOSS-TTS Local uses a reference transcript for continuation conditioning; omitting it uses reference-audio conditioning instead. Keep this choice consistent when comparing benchmarks. Supplying inline ref_audio overrides the uploaded voice and does not use the named-voice cache shortcut.
The separate decoded-waveform resolve cache defaults to 4 GiB and 2048 entries per speech server instance. These are LRU limits, not preallocated memory or a limit on total server RSS. Waveforms retain their source sampling rate and are stored as owned, contiguous float32 arrays in CPU memory. The byte limit counts numeric buffers (four bytes per mono sample), not the encoded file size or GPU memory. Either limit can cause eviction. Configure the API-process caches in the deploy YAML passed to --deploy-config (alongside stages, not inside a stage):
All values must be non-negative integers. Either resolve limit set to 0 disables waveform storage; speaker_max_bytes: 0 disables speaker artifact storage. Invalid values fail configuration loading. base_config inheritance merges this section by field, preserving unspecified values from the base. Restart the service to apply changes. The effective settings are logged at startup.
The speaker budget defaults to 512 MiB and counts cached tensor bytes, not Python metadata or total process RSS. It configures the API process's speaker cache. MOSS reference codes are cached as CPU int32 tensors; this budget does not reserve GPU memory or include the reference encoder's GPU weights and working memory. The shared cache itself does not move tensors between devices; other adapters determine the device of their cached artifacts. Separate model-worker caches are not controlled by this section. The process-wide singleton rejects a conflicting explicit budget instead of silently ignoring it.