POST https://ap-southeast-1.maas.qwencloudapi.com/api/v1/services/audio/tts/customizationThis is the Singapore endpoint. For another region, replace ap-southeast-1 in the URL. API keys are region-specific. See Regions.
# Singapore (ap-southeast-1). For another region, replace ap-southeast-1 in the URL.# API keys are region-specific. See https://docs.qwencloud.com/developer-guides/getting-started/regionscurl -X POST https://ap-southeast-1.maas.qwencloudapi.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": "qwen-audio-3.0-tts-flash", "prefix": "myvoice", "audio": "https://your-audio-url.wav", "language_hints": ["en"], "enable_volume_normalization": "false" }}'
For a local WAV file, use the following code to generate a Base64 Data URI and pass the value of audio to input.audio in the create or update request. Replace sample.wav with your local audio path.
(required) The target model that uses the voice. It must match the model used in subsequent requests with this voice; otherwise, the requests fail.
input.audio
string
(required) Reference audio for voice cloning. Accepts a publicly accessible URL or a Base64 Data URI, such as data:audio/wav;base64,.... Note: The legacy url parameter is still supported. You can omit audio when using url. The url parameter will be phased out; use audio for new requests.
input.prefix
string
(required) A prefix for the voice name. Only alphanumeric characters are allowed, with a maximum length of 10 characters. The resulting voice name follows this format: {target_model}-{prefix}-{unique_id}.
input.language_hints
array[string]
(optional) Helps the model identify the language of the sample audio to extract voice features more accurately and improve cloning quality. If the specified language doesn't match the actual audio language (for example, setting en when the audio is in Chinese), the system ignores this value and detects the language automatically. This parameter is an array and must contain exactly one element. Note: Applies to qwen-audio-3.1-tts-plus, qwen-audio-3.1-tts-flash, qwen-audio-3.0-tts-plus, qwen-audio-3.0-tts-flash, qwen-audio-3.1-realtime-plus, qwen-audio-3.0-realtime-plus, qwen-audio-3.0-realtime-flash, cosyvoice-v3.5-plus, cosyvoice-v3.5-flash, cosyvoice-v3-plus, cosyvoice-v3-flash (cosyvoice-v3.5-plus and cosyvoice-v3.5-flash are available only in China North 2 (Beijing)).
(optional) The maximum duration (in seconds) of the reference audio after preprocessing. Valid values: [3.0, 30.0]. Default: 10.0. Note: Applies to qwen-audio-3.1-tts-plus, qwen-audio-3.1-tts-flash, qwen-audio-3.0-tts-plus, qwen-audio-3.0-tts-flash, qwen-audio-3.1-realtime-plus, qwen-audio-3.0-realtime-plus, qwen-audio-3.0-realtime-flash, cosyvoice-v3.5-plus, cosyvoice-v3.5-flash, cosyvoice-v3-flash (cosyvoice-v3.5-plus and cosyvoice-v3.5-flash are available only in China North 2 (Beijing)).
input.enable_preprocess
boolean
(optional) Whether to enable audio preprocessing (noise reduction, audio enhancement, and volume normalization). Enable this for recordings with background noise. Disable it for recordings in quiet environments to preserve the original voice characteristics. Default: false. Note: Applies to qwen-audio-3.1-tts-plus, qwen-audio-3.1-tts-flash, qwen-audio-3.0-tts-plus, qwen-audio-3.0-tts-flash, qwen-audio-3.1-realtime-plus, qwen-audio-3.0-realtime-plus, qwen-audio-3.0-realtime-flash, cosyvoice-v3.5-plus, cosyvoice-v3.5-flash, cosyvoice-v3-flash (cosyvoice-v3.5-plus and cosyvoice-v3.5-flash are available only in China North 2 (Beijing)).
input.enable_volume_normalization
string
(optional) Whether to normalize the volume of the sample audio used for voice cloning. Valid values:
"true": Enable volume normalization.
"false": Disable volume normalization.
When enabled, audio synthesized with the created voice may have a different volume than audio synthesized with a voice created with this parameter disabled. Default: "false".
# Singapore (ap-southeast-1). For another region, replace ap-southeast-1 in the URL.# API keys are region-specific. See https://docs.qwencloud.com/developer-guides/getting-started/regionscurl -X POST https://ap-southeast-1.maas.qwencloudapi.com/api/v1/services/audio/tts/customization \-H "Authorization: Bearer $DASHSCOPE_API_KEY" \-H "Content-Type: application/json" \-d '{ "model": "voice-enrollment", "input": { "action": "query_voice", "voice_id": "yourVoiceId" }}'
# Singapore (ap-southeast-1). For another region, replace ap-southeast-1 in the URL.# API keys are region-specific. See https://docs.qwencloud.com/developer-guides/getting-started/regionscurl -X POST https://ap-southeast-1.maas.qwencloudapi.com/api/v1/services/audio/tts/customization \-H "Authorization: Bearer $DASHSCOPE_API_KEY" \-H "Content-Type: application/json" \-d '{ "model": "voice-enrollment", "input": { "action": "update_voice", "voice_id": "yourVoiceId", "audio": "https://new-audio-url.wav" }}'
Parameter
Type
Description
input.action
string
(required) Set to update_voice.
input.voice_id
string
(required) The voice ID to update.
input.audio
string
(required) New reference audio. Accepts a publicly accessible URL or a Base64 Data URI, such as data:audio/wav;base64,.... Note: The legacy url parameter is still supported. You can omit audio when using url. The url parameter will be phased out; use audio for new requests.
The data returned by the model. The update operation returns no business data. The response may include a preview_audio field, which is an empty object that you can ignore.
# Singapore (ap-southeast-1). For another region, replace ap-southeast-1 in the URL.# API keys are region-specific. See https://docs.qwencloud.com/developer-guides/getting-started/regionscurl -X POST https://ap-southeast-1.maas.qwencloudapi.com/api/v1/services/audio/tts/customization \-H "Authorization: Bearer $DASHSCOPE_API_KEY" \-H "Content-Type: application/json" \-d '{ "model": "voice-enrollment", "input": { "action": "delete_voice", "voice_id": "yourVoiceId" }}'