Skip to main content
CosyVoice3 needs either a reference clip or a voice preset supplied by the deployment. Use a transcript of the clip for zero-shot prompting.

Install and start

The default runs the language model, flow model and vocoder on one GPU. The optional cosyvoice3_split.yaml layout runs the flow model and vocoder on a second worker on the same GPU under NVIDIA MPS and needs about 67 GB.

cosyvoice3

Text, audio → audio. The default cosyvoice3.yaml uses 1 GPU. The weights use Apache-2.0.
Send the request.

Send a request

Run either client example in a second terminal after /health returns 200.

Synthesize a sentence

Record “Welcome aboard.” in speaker.wav, or substitute a clip of a few seconds and its exact transcript. The SDK writes a WAV. curl saves the PCM samples. Python SDK
curl

Deployment configs

To use an alternative, pass --config configs/<file> after the launcher name. From a wheel installation, copy the shipped YAML and pass its local path.

Settings and defaults

Request fields (on /v1/audio/speech, all but voice, instructions, temperature, top_p and seed go in extra_body): Deployment model_kwargs (listed in configs/cosyvoice3.yaml):

Limits

  • A request with neither ref_audio nor a preset voice is a 400, and so is a reference clip over 30 s.
  • One request’s prompt (transcript or instruction) and text may hold at most 512 tokens. /v1/audio/speech cuts long text into pieces under it; on /generate, split it yourself.
  • Request fields are strictly typed: ras_window and n_cfm_timesteps take a number, not a string or boolean, and an out-of-range value is a 400. voice, instruct and ref_text must be strings.
  • speed has no effect and is logged as ignored.
  • lm_dtype: float32 cannot be served; the paged attention runs in bfloat16 or float16.
  • Japanese written in kana only, with spaces between words, is read poorly, as it is by the official model.