Use the Voice Design HTTP API to create, list, query, and delete custom voices.
User guide: Voice Design.
Created voices go through a review process. These statuses apply to Qwen-Audio-TTS/CosyVoice only (model
Endpoint
- Singapore
- China (Beijing)
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/audio/tts/customizationReplace {WorkspaceId} with your actual workspace ID.Request headers
Parameter | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Set to |
Content-Type | string | Yes | Media type of the request body. Set to |
Create a voice
Request bodymodelstring(Required)The voice design model. Valid values:
object(Required)The input parameter object.
Properties action string(Required)The operation type.
string(Required)The text-to-speech (TTS) model for the voice. Must match the model in TTS API calls, or synthesis fails.qwen-audio-3.0-tts-plus and qwen-audio-3.0-tts-flash do not support Voice Design.voice_prompt string(Required)Description of desired voice characteristics. Chinese and English only.
string(Required)The text for the preview audio.
string(Conditionally required)Voice name prefix. Alphanumeric only, max 10 characters. Generated name format: {target_model}-vd-{prefix}-{unique_id}preferred_name string(Conditionally required)Voice name prefix. Alphanumeric and underscores, max 16 characters.language_hints array[string](Optional)Language hint for voice generation. Must match the language of preview_text.Currently, only the first element is used.Valid values:
string(Optional)Language hint for voice generation. Must match the language of preview_text.Valid values:
object(Optional)Configuration for voice design.
Properties sample_rate int(Optional)Sample rate of the preview audio, in Hz.
string(Optional)Format of the preview audio.
| Qwen-Audio-TTS/CosyVoice Voice Design is available only in the Beijing region. Qwen Voice Design supports the Singapore region. The Qwen-Audio-TTS/CosyVoice examples below use the China (Beijing) region URL. The Qwen examples below use the Singapore region URL (replace {WorkspaceId} with your actual workspace ID). |
Response bodyrequest_idstringThe unique identifier of this request.outputobjectThe data returned by the model.
Properties voice_id / voice stringQwen-Audio-TTS/CosyVoice returns voice_id; Qwen returns voice. Pass this value as the voice parameter in TTS API calls.preview_audioobjectThe preview audio data.
Properties data stringThe preview audio data, Base64-encoded.sample_rate intThe sample rate of the preview audio, in Hz.response_format stringThe format of the preview audio.stringThe TTS model that drives the voice.objectUsage information for this request.
Properties count integerThe number of voices created. Always 1. |
List voices
Request bodymodelstring(Required)The voice design model. Valid values:
object(Required)The input parameter object.
Properties action string(Required)The operation type. Qwen-Audio-TTS/CosyVoice: list_voice. Qwen: list.prefix string(Optional)Filter voices by name prefix.page_index integer(Optional)The page index.page_size integer(Optional)The number of entries per page. | Qwen-Audio-TTS/CosyVoice Voice Design is available only in the Beijing region. Qwen Voice Design supports the Singapore region. The Qwen-Audio-TTS/CosyVoice examples below use the China (Beijing) region URL. The Qwen examples below use the Singapore region URL (replace {WorkspaceId} with your actual workspace ID). |
Response bodyrequest_idstringThe unique identifier of this request.outputobjectThe data returned by the model.
Properties page_index integerThe current page index.page_sizeintegerThe number of entries per page.total_countintegerThe total number of voices.voice_listarray[object]The list of voices returned by the query.
Properties voice_id / voice stringThe voice ID. Qwen-Audio-TTS/CosyVoice uses voice_id, and Qwen uses voice.gmt_createstringThe creation time.gmt_modifiedstringThe last modification time.statusstringThe voice status. For valid values, see "Voice status reference".target_modelstringThe TTS model that drives the voice.languagestringThe voice language.voice_promptstringThe voice description text.preview_textstringThe preview audio text.objectUsage information for this request.
Properties count integerQwen-Audio-TTS/CosyVoice: always 1. Qwen: always 0. |
Query voice details
Request bodymodelstring(Required)The voice design model. Valid values:
object(Required)The input parameter object.
Properties action string(Required)The operation type. Qwen-Audio-TTS/CosyVoice: query_voice. Qwen voice design: query.voice_id string(Conditionally required)The voice ID to query.voice string(Conditionally required)The voice name to query. | Qwen-Audio-TTS/CosyVoice Voice Design is available only in the Beijing region. Qwen Voice Design supports the Singapore region. The Qwen-Audio-TTS/CosyVoice examples below use the China (Beijing) region URL. The Qwen examples below use the Singapore region URL (replace {WorkspaceId} with your actual workspace ID). |
Response bodyrequest_idstringThe unique identifier of this request.outputobjectThe data returned by the model.
Properties voice_id / voice stringThe voice ID. Qwen-Audio-TTS/CosyVoice returns voice_id, and Qwen returns voice.gmt_createstringThe creation time.gmt_modifiedstringThe last modification time.statusstringThe voice status. For valid values, see "Voice status reference".target_modelstringThe TTS model that drives the voice.languagestringThe voice language.voice_promptstringThe voice description text.preview_textstringThe preview audio text.objectUsage information for this request.
Properties count integerQwen: always 0. Not returned by Qwen-Audio-TTS/CosyVoice (the usage object is empty). |
Delete a voice
Request bodymodelstring(Required)The voice design model. Valid values:
object(Required)The input parameter object.
Properties action string(Required)The operation type. Qwen-Audio-TTS/CosyVoice: delete_voice. Qwen: delete.voice_id string(Conditionally required)The voice ID to delete.voice string(Conditionally required)The voice name to delete. | Qwen-Audio-TTS/CosyVoice Voice Design is available only in the Beijing region. Qwen Voice Design supports the Singapore region. The Qwen-Audio-TTS/CosyVoice examples below use the China (Beijing) region URL. The Qwen examples below use the Singapore region URL (replace {WorkspaceId} with your actual workspace ID). |
Response bodyrequest_idstringThe unique identifier of this request.outputobjectThe data returned by the model. Qwen-Audio-TTS/CosyVoice returns an empty object. Qwen returns the name of the deleted voice.
Properties voice stringThe name of the deleted voice.objectUsage information for this request.
Properties count integerQwen-Audio-TTS/CosyVoice: always 1. Qwen: always 0. |
Voice status reference
Created voices go through a review process. These statuses apply to Qwen-Audio-TTS/CosyVoice only (model voice-enrollment). Qwen responses do not include a status field.
Status | Description |
|---|---|
DEPLOYING | Under review or processing. |
OK | Review passed. The voice is ready for use. |
UNDEPLOYED | Review rejected. The voice can't be used. |