POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/audio/tts/customization
Replace {WorkspaceId} with your actual workspace ID.
ImportantAlibaba Cloud Model Studio has released workspace-specific domains for the China (Beijing) regions. The new dedicated domains deliver superior performance and higher stability for inference requests. We recommend migrating to the new domains:
China (Beijing): from dashscope.aliyuncs.com to {WorkspaceId}.cn-beijing.maas.aliyuncs.com
Replace {WorkspaceId} with your actual Workspace ID. The existing domains remain fully functional.
Request headers
Parameter
Type
Required
Description
Authorization
string
Yes
Set to Bearer <your_api_key>. Replace <your_api_key> with your API key.
Content-Type
string
Yes
Media type of the request body. Set to application/json.
Qwen-Audio-TTS/CosyVoice (voice-enrollment): Set to create_voice.
target_modelstring(Required)
The text-to-speech (TTS) model for the voice. Must match the model in TTS API calls, or synthesis fails.
voice_promptstring(Required)
Description of desired voice characteristics. Chinese and English only.
Qwen-Audio-TTS/CosyVoice (voice-enrollment): Maximum 500 characters.
preview_textstring(Required)
The text for the preview audio.
Qwen-Audio-TTS/CosyVoice (voice-enrollment): Minimum 15 characters, maximum 200 characters. Chinese and English are supported.
prefixstring(Required)
ImportantOnly applicable to Qwen-Audio-TTS/CosyVoice (when model is voice-enrollment).
Voice name prefix. Alphanumeric only, max 10 characters. Generated name format: {target_model}-vd-{prefix}-{unique_id}
language_hintsarray[string](Optional)
ImportantOnly applicable to Qwen-Audio-TTS/CosyVoice (when model is voice-enrollment).
The language tendency of the generated voice, which affects the language characteristics and pronunciation tendencies of the voice. We recommend selecting the corresponding language code based on your actual usage scenario. If you use this parameter, the language must match the language of preview_text.
This parameter is an array, but the current version only processes the first element.
Valid values:
zh: Chinese
en: English
Default: ["zh"].
parametersobject(Optional)
Configuration for voice design.
Properties
sample_rateint(Optional)
Sample rate of the preview audio, in Hz.
Qwen-Audio-TTS/CosyVoice: 16000, 24000, or 48000.
Default: 24000.
response_formatstring(Optional)
Format of the preview audio.
Qwen-Audio-TTS/CosyVoice: pcm, wav, or mp3.
Default: wav.
The following examples use the China (Beijing) region configuration. Replace {WorkspaceId} with your actual workspace ID. Configurations vary by region.
curl -X POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/audio/tts/customization \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "voice-enrollment",
"input": {
"action": "create_voice",
"target_model": "cosyvoice-v3.5-plus",
"voice_prompt": "A composed middle-aged male announcer with a deep, rich and magnetic voice, a steady speaking speed and clear articulation, is suitable for news broadcasting or documentary commentary.",
"preview_text": "Dear listeners, hello everyone. Welcome to the evening news.",
"prefix": "announcer",
"language_hints": ["en"]
},
"parameters": {
"sample_rate": 24000,
"response_format": "wav"
}
}'
Response body
request_idstring
The unique identifier of this request.
outputobject
The data returned by the model.
Properties
voice_idstring
The voice ID. Use it in the voice parameter of the TTS API.
ImportantOnly applicable to Qwen-Audio-TTS/CosyVoice.
Filter voices by name prefix.
page_indexinteger(Optional)
The page index.
page_sizeinteger(Optional)
The number of entries per page.
The following examples use the China (Beijing) region configuration. Replace {WorkspaceId} with your actual workspace ID. Configurations vary by region.
The voice ID. Use it in the voice parameter of the TTS API.
gmt_createstring
The creation time.
gmt_modifiedstring
The last modification time.
statusstring
ImportantReturned by Qwen-Audio-TTS/CosyVoice only.
The voice status. For valid values, see "Voice status reference".
voice_promptstring
The voice description text.
preview_textstring
The preview audio text.
usageobject
Usage information for this request.
Properties
countinteger
Always 1.
{
"output": {
"voice_list": [
{
"voice_id": "cosyvoice-v3.5-plus-vd-announcer-xxxxxx",
"gmt_create": "2025-12-10 14:54:09",
"gmt_modified": "2025-12-10 17:47:48",
"status": "OK",
"voice_prompt": "A composed middle-aged male announcer with a deep, rich and magnetic voice, a steady speaking speed and clear articulation, is suitable for news broadcasting or documentary commentary.",
"preview_text": "Dear listeners, hello everyone. Welcome to the evening news."
}
]
},
"usage": {
"count": 1
},
"request_id": "xxxx-xxxx-xxxx"
}
ImportantOnly applicable to Qwen-Audio-TTS/CosyVoice.
The voice ID to query.
The following examples use the China (Beijing) region configuration. Replace {WorkspaceId} with your actual workspace ID. Configurations vary by region.
The voice ID. Use it in the voice parameter of the TTS API.
gmt_createstring
The creation time.
gmt_modifiedstring
The last modification time.
statusstring
ImportantReturned by Qwen-Audio-TTS/CosyVoice only.
The voice status. For valid values, see "Voice status reference".
target_modelstring
The TTS model that drives the voice.
voice_promptstring
ImportantReturned by Qwen-Audio-TTS/CosyVoice voice design only.
The voice description text.
preview_textstring
ImportantReturned by Qwen-Audio-TTS/CosyVoice voice design only.
The preview audio text.
usageobject
Usage information for this request.
Properties
countinteger
Always 1.
{
"output": {
"voice_id": "cosyvoice-v3.5-plus-vd-announcer-xxxxxx",
"gmt_create": "2025-12-10 14:54:09",
"gmt_modified": "2025-12-10 17:47:48",
"preview_text": "Dear listeners, hello everyone. Welcome to the evening news.",
"target_model": "cosyvoice-v3.5-plus",
"status": "OK",
"voice_prompt": "A composed middle-aged male announcer with a deep, rich and magnetic voice, a steady speaking speed and clear articulation, is suitable for news broadcasting or documentary commentary."
},
"usage": {
"count": 1
},
"request_id": "xxxx-xxxx-xxxx"
}
ImportantOnly applicable to Qwen-Audio-TTS/CosyVoice.
The voice ID to delete.
The following examples use the China (Beijing) region configuration. Replace {WorkspaceId} with your actual workspace ID. Configurations vary by region.