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) .
This document applies only to the Qwen-Omni and Qwen-Omni-Realtime voice cloning API. If you use a text-to-speech model, see Speech synthesis.
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.8-omni-flash-realtime
- 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
Applicable to the Qwen3.5-Omni-Realtime series models. For more information, see Qwen-Omni-Realtime.
Python
API reference
Use the same account across all APIs.
Create a voice
Upload audio for cloning and create a custom voice.
-
URL
The following URL uses Singapore. For another region, replace
ap-southeast-1in the URL and use an API key from that region. See Regions.
-
Request headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Supported | Authentication token in the format
Bearer $DASHSCOPE_API_KEY. Replace$DASHSCOPE_API_KEYwith your actual API key. | | Content-Type | string | Supported | Media type of the request body. Set toapplication/json. | - Request body The request body includes all parameters. Omit optional fields as needed. Note the distinction between:
model: The voice cloning model. Set to qwen-voice-enrollment.target_model: The omni model that drives the voice. This must match the model used in the subsequent real-time multimodal API call. Otherwise, synthesis fails.The
voice_clone_mode parameter in parameters is required when using qwen3.8-omni series models. If omitted, the system falls back to qwen3.5-omni talker system instruct mode for backward compatibility.-
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 tocreate. | | target_model | string | - | Supported | The omni model that drives the voice:- qwen3.8-omni-flash-realtime
- qwen3.5-omni-plus-realtime
- qwen3.5-omni-flash-realtime
- qwen3.5-omni-plus
- qwen3.5-omni-flash
data:{mediatype};base64,{data}{mediatype}: The MIME type
- WAV:
audio/wav - MP3:
audio/mpeg - M4A:
audio/mp4 {data}: The Base64-encoded string of the audio
- Example:
data:audio/wav;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjI5LjEwMAAAAAAAAAAAAAAA//PAxABQ/BXRbMPe4IQAhl9
- File size must not exceed 10 MB.
- The URL must be publicly accessible without authentication.
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 inaudio.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. | | voice_clone_mode | string | - | Conditionally required | Voice cloning mode. Required when using qwen3.8-omni series models. If omitted, falls back to qwen3.5-omni talker system instruct mode for backward compatibility. Valid values:normal: Standard modedialect: Dialect modecrosslingual: Cross-lingual mode
parameters. | | skip_audio_process | boolean | false | Unsupported | Whether to skip audio preprocessing. Default:false. This parameter must be placed inparameters. |
- Response parameters
View response example
View response example
| Parameter | Type | Description |
|---|---|---|
| voice | string | The voice name. Use this value directly as the voice parameter in the real-time multimodal API. |
| target_model | string | The omni model that drives the voice:
|
| 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
model: The voice cloning model. Set to qwen-voice-enrollment.target_model: The omni model that drives the voice. This must match the model used in the subsequent real-time multimodal API call. Otherwise, synthesis fails.- curl
- python
- java
If you have not set the API key as an environment variable, you must replace
$DASHSCOPE_API_KEY in the example with your actual API key.List voices
Query your created voices with pagination.
-
URL
The following URL uses Singapore. For another region, replace
ap-southeast-1in the URL and use an API key from that region. See Regions.
- Request headers
- Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| 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
View response example
View response example
| Parameter | Type | Description |
|---|---|---|
| voice | string | The voice name. Use this value directly in the voice parameter 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:
|
| request_id | string | The 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. count is always 0. |
- Sample code
model: The voice cloning model. The value is fixed as qwen-voice-enrollment. Do not modify this value.- cURL
- Python
- Java
If you have not set the API key as an environment variable, you must replace
$DASHSCOPE_API_KEY in the example with your actual API key.Delete a voice
Delete a specific voice and release the corresponding quota.
-
URL
The following URL uses Singapore. For another region, replace
ap-southeast-1in the URL and use an API key from that region. See Regions.
- Request headers
- Request body Omit optional fields as needed.
model: The voice cloning model. The value is fixed as qwen-voice-enrollment. Do not modify this value.- Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| action | string | - | Supported | The action type. Set to delete. |
| voice | string | - | Supported | The voice to delete. |
- Response parameters
View response example
View response example
| Parameter | Type | Description |
|---|---|---|
| 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. count is always 0. |
- Sample code
model: The voice cloning model. The value is fixed as qwen-voice-enrollment. Do not modify this value.- cURL
- Python
- Java
If you have not set the API key as an environment variable, you must replace
$DASHSCOPE_API_KEY in 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.
QwenCloud free quota (Singapore only):
- 1,000 free voice creations within 90 days of activating QwenCloud.
- 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.