Clone a voice from 10-20 seconds of audio without training. This document covers the voice cloning API parameters and usage. For model invocation, see Qwen-Omni-Realtime or Non-real-time (Qwen-Omni) .
Audio requirements
High-quality input audio produces better cloning results.
Item | Requirement |
|---|---|
Supported formats | WAV (16-bit), MP3, M4A |
Duration | 10 to 20 seconds recommended. Maximum: 60 seconds. |
File size | < 10 MB |
Sample rate | >= 24 kHz |
Channels | Mono |
Content | The audio must contain at least 3 seconds of continuous, clear speech with no background sounds. The remaining portion may include brief pauses (<=2 seconds). Avoid background music, noise, or other voices throughout the entire audio. Use normal spoken audio as input. Don't upload songs or singing audio. |
Languages | Chinese (zh), English (en), German (de), Italian (it), Portuguese (pt), Spanish (es), Japanese (ja), Korean (ko), French (fr), Russian (ru), Thai (th), Indonesian (id), Arabic (ar), Czech (cs), Danish (da), Dutch (nl), Finnish (fi), Hebrew (he), Hindi (hi), Icelandic (is), Malay (ms), Norwegian (no), Persian (fa), Polish (pl), Swedish (sv), Tagalog (tl), Turkish (tr), Urdu (ur), Vietnamese (vi) Chinese dialects: Dongbei, Shannxi, Sichuan, Henan, Changsha, Tianjin, Hangzhou, Liaoning, Shenyang, Anshan |
Quick start
1. Workflow
Voice cloning follows a "create first, then use" workflow:
-
Create a voice
Call the Create a voice API and upload an audio clip. The system analyzes the audio and creates a custom cloned voice. You must specify
target_modelin this step to declare which omni model will drive the voice. If you already have a created voice (call the List voices API to check), skip this step and proceed to the next one. -
Use the voice in a conversation
Call the Omni API (realtime or non-realtime) and pass in the voice obtained in the previous step. The omni model specified in this step must match the
target_modelfrom the previous step.
2. Model configuration and prerequisites
Select models and complete the prerequisites before starting.
Model configuration
Voice cloning requires two models:
- Voice cloning model: qwen-voice-enrollment
-
Omni model that drives the voice:
- qwen3.5-omni-plus-realtime
- qwen3.5-omni-flash-realtime
- qwen3.5-omni-plus
- qwen3.5-omni-flash
Prerequisites
- Get an API key: Obtain an API key. For security, configure the API key as an environment variable.
- Install the SDK: Make sure you have installed the latest DashScope SDK.
- Prepare the audio for cloning: The audio must meet the Audio requirements.
3. End-to-end example
This example clones a voice and uses it in a conversation.
Key principle: The target_model specified during cloning must match the model in the subsequent Omni API call. Otherwise, synthesis fails. Replace the example file voice.mp3 with your own audio.
- Realtime
- Non-realtime
API reference
Use the same account across all APIs.
Create a voice
Upload audio for cloning and create a custom voice.
- URL North China 2 (Beijing):
-
Request headers
Parameter
Type
Required
Description
Authorization
string
Supported
Authentication token in the format
Bearer <your_api_key>. Replace<your_api_key>with your actual API key.Content-Type
string
Supported
Media type of the request body. Set to
application/json. - Request body The request body includes all parameters. Omit optional fields as needed. Note the distinction between:
-
Request parameters
Parameter Type Default Required Description model string Supported The voice cloning model. Set to qwen-voice-enrollment.action string Supported The action type. Set to create.target_model string Supported The omni model that drives the voice: - qwen3.5-omni-plus-realtime
- qwen3.5-omni-flash-realtime
- qwen3.5-omni-plus
- qwen3.5-omni-flash
preferred_name string Supported A human-readable name for the voice. Allowed characters: digits, letters, underscores. Maximum: 16 characters. This keyword appears in the final voice name. For example, if the keyword is "guanyu", the resulting voice name is "qwen-omni-vc-guanyu-voice-20250812105009984-838b".
audio.data string Supported The audio for cloning (follow the Recording guide when recording, and make sure the audio meets the Audio requirements).Submit audio data in one of the following ways: -
Data URL
Format:
data:<mediatype>;base64,<data>-
<mediatype>: The MIME type- WAV:
audio/wav - MP3:
audio/mpeg - M4A:
audio/mp4
- WAV:
-
<data>: The Base64-encoded string of the audio Base64 encoding increases file size. Keep the encoded result under 10 MB. -
Example:
data:audio/wav;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjI5LjEwMAAAAAAAAAAAAAAA//PAxABQ/BXRbMPe4IQAhl9View sample code
-
-
Audio URL (we recommend uploading your audio to OSS)
- File size must not exceed 10 MB.
- The URL must be publicly accessible without authentication.
text string Unsupported The transcript that matches the audio in audio.data.When provided, the server validates the audio against the text. If the mismatch is too large, an Audio.PreprocessError is returned.language string Unsupported The language of the audio in audio.data.Supported values:zh(Chinese),en(English),de(German),it(Italian),pt(Portuguese),es(Spanish),ja(Japanese),ko(Korean),fr(French),ru(Russian),th(Thai),id(Indonesian),ar(Arabic),cs(Czech),da(Danish),nl(Dutch),fi(Finnish),he(Hebrew),hi(Hindi),is(Icelandic),ms(Malay),no(Norwegian),fa(Persian),pl(Polish),sv(Swedish),tl(Tagalog),tr(Turkish),ur(Urdu),vi(Vietnamese).Chinese dialects:Dongbei,Shannxi,Sichuan,Henan,Changsha,Tianjin,Hangzhou,Liaoning,Shenyang,Anshan.Set this to the actual language of the audio used for cloning. -
Response parameters
Key response parameters:
View response example
Parameter
Type
Description
voice
string
The voice name. Use this value directly as the
voiceparameter in the real-time multimodal API.target_model
string
The omni model that drives the voice:
qwen3.5-omni-plus-realtime
qwen3.5-omni-flash-realtime
This must match the model used in the subsequent real-time multimodal API call. Otherwise, synthesis fails.
request_id
string
Request ID.
count
integer
The number of "create voice" operations billed for this request. The cost is $ count × 0.01.
When creating a voice, count is always 1.
-
Sample code
- curl
- python
- java
If you have not set the API key as an environment variable, you must replace$DASHSCOPE_API_KEYin the example with your actual API key.
List voices
Query your created voices with pagination.
- URL North China 2 (Beijing):
-
Request headers
Parameter
Type
Required
Description
Authorization
string
Supported
Authentication token in the format
Bearer <your_api_key>. Replace<your_api_key>with your actual API key.Content-Type
string
Supported
Media type of the request body. Set to
application/json. -
Request parameters
Parameter
Type
Default
Required
Description
model
string
-
Supported
The voice cloning model. Set to
qwen-voice-enrollment.action
string
-
Supported
The action type. Set to
list.page_index
integer
0
Unsupported
Page number index. Valid values: 0 to 1,000,000.
page_size
integer
10
Unsupported
Number of items per page. Valid values: 0 to 1,000,000.
-
Response parameters
Key response parameters:
View response example
Parameter
Type
Description
voice
string
The voice name. Use this value directly in the
voiceparameter of the real-time multimodal API.gmt_create
string
The time when the voice was created.
target_model
string
The omni model that drives the voice:
qwen3.5-omni-plus-realtime
qwen3.5-omni-flash-realtime
qwen3.5-omni-plus
qwen3.5-omni-flash
This must match the omni model used in the subsequent API call. Otherwise, synthesis fails.
request_id
string
Request ID.
count
integer
This request is charged based on the actual number of 'Create Voice' operations. The cost for this request is $ count × 0.01 .
Listing voices is free.
countis always 0. -
Sample code
- cURL
- Python
- Java
If you have not set the API key as an environment variable, you must replace$DASHSCOPE_API_KEYin the example with your actual API key.
Delete a voice
Delete a specific voice and release the corresponding quota.
- URL North China 2 (Beijing):
-
Request headers
Parameter
Type
Required
Description
Authorization
string
Supported
Authentication token in the format
Bearer <your_api_key>. Replace<your_api_key>with your actual API key.Content-Type
string
Supported
Media type of the request body. Set to
application/json. - Request body Omit optional fields as needed.
-
Request parameters
Parameter
Type
Default
Required
Description
model
string
-
Supported
The voice cloning model. Set to
qwen-voice-enrollment.action
string
-
Supported
The action type. Set to
delete.voice
string
-
Supported
The voice to delete.
-
Response parameters
Key response parameters:
View response example
Parameter
Type
Description
request_id
string
Request ID.
count
integer
This request is charged based on the actual number of 'Create Voice' operations. The cost for this request is $ count × 0.01 .
Deleting a voice is free.
countis always 0. -
Sample code
- cURL
- Python
- Java
If you have not set the API key as an environment variable, you must replace$DASHSCOPE_API_KEYin the example with your actual API key.
Use in conversation
To use a cloned voice in a conversation, see the Quick start.
Voice quota and auto-cleanup
Total limit: 1,000 voices per account.
No dedicated count endpoint exists. Call the List voices API to count your voices.Auto-cleanup: Voices unused for one year are automatically deleted.
Billing
Voice cloning and model invocation are billed separately:
-
Voice cloning: billed at $0.01/voice. Failed creations are not billed.
Free quota (China site Beijing region and International site Singapore region only):
- 1,000 free voice creations within 90 days of activating Model Studio.
- Failed creations don't consume the free quota.
- Deleting a voice doesn't restore the free quota.
- After the free quota is used up or the 90-day period expires, voice creation is billed at $0.01/voice.
- Conversation with a cloned voice: Billed by token usage for model invocation. For details, see Model inference pricing.
Copyright and legal compliance
You are responsible for the ownership and legal use of the voice you provide. Read the Service Agreement.
Recording guide
Recording equipment
Use a noise-cancelling microphone, or record with a phone at close range in a quiet environment.
Recording environment
Location
- Record in a small enclosed space of 10 square meters or less.
- Choose a room with sound-absorbing materials such as acoustic foam, carpets, or curtains.
- Avoid large open halls, conference rooms, or classrooms where reverberation is high.
Noise control
- Outdoor noise: Close doors and windows to block traffic, construction, and other external sounds.
- Indoor noise: Turn off air conditioners, fans, and fluorescent light ballasts.
- Record ambient sound with your phone and play it back at high volume to identify hidden noise sources.
Reverberation control
- Reverberation causes audio to sound muffled and reduces clarity.
- Reduce reflections from smooth surfaces: close curtains, open wardrobe doors, and cover desks and shelves with clothing or blankets.
- Use irregular objects such as bookshelves and upholstered furniture to create diffuse reflections.
Script preparation
- Match the script to the target use case. For example, use customer service dialog style for a customer service scenario.
- Make sure the script doesn't contain sensitive or illegal content (such as political, pornographic, or violent material), as this causes cloning to fail.
- Avoid short phrases (such as "hello" or "yes"). Use complete sentences.
- Maintain semantic coherence and avoid frequent pauses when reading. At least 3 consecutive seconds without interruption is recommended.
- You can convey the target emotion (such as friendly or serious), but avoid overly dramatic or theatrical delivery. Keep the tone natural.
Recommended steps
Using a typical bedroom as an example:
- Close doors and windows to block external noise.
- Turn off air conditioners, fans, and other appliances.
- Close curtains to reduce glass reflections.
- Cover the desk surface with clothing or a blanket to reduce desktop reflections.
- Familiarize yourself with the script, set the character's tone, and deliver naturally.
- Maintain about 10 cm distance from the recording device to avoid plosive distortion or weak signal.