本文档由 云音工坊 自动生成,如有疑问,请联系客服微信:yuntts !
voice_prompt + preview_text → 走声音设计;url 或上传 file)→ 走声音复刻。url(公网可访问)或 multipart/form-data 上传字段 file(wav/mp3/m4a,≤10MB)。model=voice-enrollment、input.action=create_voice;响应音色字段为 voice_id。{
"voice_name": "string",
"target_model": "cosyvoice-v3.5-plus",
"description": "string",
"prefix": "string",
"url": "string",
"voice_prompt": "string",
"preview_text": "string",
"language_hints": [
"zh"
],
"enable_preprocess": false,
"max_prompt_audio_length": 3,
"enable_volume_normalization": false,
"sample_rate": 24000,
"response_format": "wav"
}curl --location '/api/v1/cosyvoice-create-voice' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
"voice_name": "string",
"target_model": "cosyvoice-v3.5-plus",
"description": "string",
"prefix": "string",
"url": "string",
"voice_prompt": "string",
"preview_text": "string",
"language_hints": [
"zh"
],
"enable_preprocess": false,
"max_prompt_audio_length": 3,
"enable_volume_normalization": false,
"sample_rate": 24000,
"response_format": "wav"
}'{
"code": 200,
"message": "音色创建成功",
"data": {
"voice_id": "cosyvoice-v3.5-plus-yuntts-xxxxxxxx"
},
"database_saved": true
}