Voice cloning

cosyvoice3-clone

Upload a short clip of the speaker, type what that clip says, then type the new words.

Native waveform: 24 kHz mono. Clips longer than 30 seconds are rejected.. Live price and availability are on GET /v1/models/cosyvoice3-clone.

  • The upload is the speaker clip. Keep it at or under 30 seconds.
  • reference_text is the transcript of that clip, not the new sentence. Required.
  • text is the new words to speak in that voice.
  • No instruct field.

Parameters

FieldTypeDescription
params.speed
Default 1
numberHow fast that voice reads. 0.5 to 2. Default is 1. CosyVoice3 clone only. Voice conversion has no speed field.
params.output_format
Default wav (flac for stems)
stringwav, flac, mp3, or model (the model native file).
params.output_sample_rate
Default source
string or integersource keeps the upload (or the model rate when there is no upload). model uses the model native rate. Or pass 8000, 16000, 22050, 24000, 32000, 44100, or 48000.
params.output_channels
Default source
stringsource, model, mono, or stereo. Applied after inference, not before.

Example

curl https://api.pascalai.co/v1/voice-cloning \
  -H "Authorization: Bearer $PASCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -F model=cosyvoice3-clone \
  -F text="Keep walking toward the river." \
  -F reference_text="Hello, my name is Ada." \
  -F params='{"speed":1,"output_format":"wav","output_sample_rate":"source","output_channels":"source"}' \
  -F file=@voice.wav

curl https://api.pascalai.co/v1/voice-cloning/$JOB_ID \
  -H "Authorization: Bearer $PASCAL_API_KEY"