Skip to main content

Voice cloning HTTP API: Qwen-Omni and LiveTranslate

HTTP parameters, responses, and examples for creating, listing, and deleting Qwen-Omni voices, and creating and deleting pre-created LiveTranslate voices.

This reference covers Qwen-Omni, Qwen-Omni-Realtime, and pre-created Qwen-LiveTranslate-Realtime voices.
Target modelOperations in this reference
Qwen-Omni, Qwen-Omni-RealtimeCreate, list, and delete voices
Qwen-LiveTranslate-RealtimeCreate and delete pre-created voices
First Obtain API Key and Configure Environment Variables. Request examples read from DASHSCOPE_API_KEY. When managing the same voice across different APIs, use the same account.

Service endpoint

Qwen-Omni、Qwen-Omni-Realtime

  • China (Beijing)
  • Singapore
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/audio/tts/customization
Replace {WorkspaceId} with the actual Workspace ID; this can be found on the Workspace Details page in the Alibaba Cloud Model Studio console. The API keys differ between Beijing and Singapore.
Alibaba Cloud Model Studio has released workspace-specific domains for the China (Beijing) and Singapore regions. The new dedicated domains deliver superior performance and higher stability for inference requests. We recommend migrating to the new domains:
  • China (Beijing) Region: Migrate from dashscope.aliyuncs.com to {WorkspaceId}.cn-beijing.maas.aliyuncs.com.
  • Singapore Region: Migrate from dashscope-intl.aliyuncs.com to {WorkspaceId}.ap-southeast-1.maas.aliyuncs.com.
Existing domain names remain fully functional.

Qwen-LiveTranslate-Realtime

China (Beijing) Region: POST https://dashscope.aliyuncs.com/api/v1/services/audio/tts/customization

Request headers

Authorizationstring(Required)
Authentication token in the format Bearer <your_api_key>. Replace <your_api_key> with your actual API key.
Content-Typestring(Required)
Set to application/json.

Audio Requirements and Costs

Qwen-Omni, Qwen-Omni-Realtime: Supported input audio formats include WAV (16-bit), MP3, and M4A. Recommended length is 10–20 seconds, maximum 60 seconds, file size under 10 MB, sampling rate no less than 24 kHz, and mono-only. The audio must contain at least 3 seconds of continuous, clear speech, with pauses no longer than 2 seconds; avoid background music, noise, or other voices throughout the recording. Use normal speech audio—do not upload songs or singing. Supported languages and dialects are listed in the language parameters below; recording recommendations are provided in the Audio Requirements. Cloning steps, complete examples, and costs are detailed in the Voice Cloning User Guide. Qwen-LiveTranslate-Realtime: Supports qwen3.8-livetranslate-flash-realtime and qwen3.5-livetranslate-flash-realtime. This section describes pre-creating a voice; extracting the input voice in real time during translation is covered in Voice configuration. Pre-creating a voice incurs separate charges; model invocation remains billed by token usage, as outlined in Billing Information. Reference audio must use a publicly accessible URL.

Request body

modelstring— Required
Set to qwen-voice-enrollment.
inputobject— Required
actionstring— Required
Operation:
  • create: Create a voice.
  • list: List voices (Qwen-Omni and Qwen-Omni-Realtime only).
  • delete: Delete a voice.
target_modelstring— Required for creation
The model that will use the voice. It must match the model used in subsequent synthesis or conversation calls; otherwise, the call fails.Qwen-Omni, Qwen-Omni-Realtime: The omni model:
  • qwen3.8-omni-flash-realtime
  • qwen3.5-omni-plus-realtime
  • qwen3.5-omni-flash-realtime
  • qwen3.5-omni-plus
  • qwen3.5-omni-flash
Qwen-LiveTranslate-Realtime: The real-time translation model used in subsequent sessions.
audioobject— Required for creation
The reference audio object.
datastring— Required
Qwen-Omni, Qwen-Omni-Realtime: Audio used for cloning (recording must follow the Recording Guidelines, and the audio must meet the Audio Requirements).For Qwen-Omni and Qwen-Omni-Realtime, audio data can be submitted in one of two ways:
  1. Data URL Format: data:<mediatype>;base64,<data>
    • <mediatype>: MIME type
      • WAV:audio/wav
      • MP3:audio/mpeg
      • M4A:audio/mp4
    • <data>: Base64-encoded string of the audio Base64 encoding increases file size; please keep the original file small so that the encoded file remains under 10 MB.
    • Example: data:audio/wav;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjI5LjEwMAAAAAAAAAAAAAAA//PAxABQ/BXRbMPe4IQAhl9
  2. Audio URL (it is recommended to upload the audio to OSS)
    • File size must not exceed 10 MB.
    • The URL must be publicly accessible and require no authentication.
python
import base64, pathlib

# input.mp3 is the local audio file for voice cloning. Replace with your own file path. Make sure the file meets the audio requirements.
file_path = pathlib.Path("input.mp3")
base64_str = base64.b64encode(file_path.read_bytes()).decode()
data_uri = f"data:audio/mpeg;base64,{base64_str}"
Qwen-LiveTranslate-Realtime: Public URL of the reference audio.
preferred_namestring— Required for creation
Qwen-Omni, Qwen-Omni-Realtime: Assign a recognizable name to the voice (only digits, uppercase and lowercase letters, and underscores are allowed; maximum 16 characters).
This keyword will appear in the cloned voice name; for example, if the keyword is “guanyu,” the final voice name will be “qwen-omni-vc-guanyu-voice-20250812105009984-838b.”
Qwen-LiveTranslate-Realtime: Identifier in the voice name.
textstring— Optional for creation
Applies to: Qwen-Omni, Qwen-Omni-Realtime.Text that matches the audio content in the data field of the audio object.When provided, the server validates the audio against the text. If the mismatch is too large, an Audio.PreprocessError is returned.
languagestring— Optional for creation
Applies to: Qwen-Omni, Qwen-Omni-Realtime.The language corresponding to the data audio in the audio object.Supported languages include 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 (Northeastern Mandarin), Shannxi (Shaanxi dialect), Sichuan (Sichuan dialect), Henan (Henan dialect), Changsha (Changsha dialect), Tianjin (Tianjin dialect), Hangzhou (Hangzhou dialect), Liaoning (Liaoning dialect), Shenyang (Shenyang dialect), Anshan (Anshan dialect).If this parameter is used, the specified language must match the language of the audio actually used for cloning.
page_indexinteger— Optional when listing voices
The page index. Default: 0. Value range: [0, 1000000].
page_sizeinteger— Optional when listing voices
The number of entries per page. Default: 10. Value range: [0, 1000000].
voicestring— Required for deletion
The voice ID to delete.After deleting a voice via Qwen-Omni or Qwen-Omni-Realtime, the corresponding voice quota will be released.
parametersobject— Conditionally required for creation
Applies to: Qwen-Omni, Qwen-Omni-Realtime.The configuration parameters. For qwen3.8-omni series models, this object is required to supply voice_clone_mode.
voice_clone_modestring— Conditionally required
Voice cloning mode. Required when using the qwen3.8-omni series models; if not specified, it defaults to the qwen3.5-omni talker system instruct mode (backward compatible with legacy services).Valid values:
  • normal: Normal mode
  • dialect: Dialect mode
  • crosslingual: Cross-language mode
skip_audio_processboolean— Optional
Default value: false.Whether to skip audio preprocessing.

Request examples

  • Create
  • List
  • Delete
  • qwen3.8-omni-flash-realtime
  • qwen3.8-livetranslate-flash-realtime
The cURL example uses an audio URL. Replace https://xxx.wav with your actual address. The Python and Java examples read a local audio file. Replace input.mp3 with your actual file path.
cURL
# If the environment variable is not set, replace $DASHSCOPE_API_KEY below with your API key.
# ======= Important =======
# The following is the Singapore region URL. Replace {WorkspaceId} with your actual workspace ID. URLs vary by region.
# API keys differ between regions. Get an API key: https://www.alibabacloud.com/help/model-studio/get-api-key
# === Remove these comments before running ===

curl --location --request POST 'https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/audio/tts/customization' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "qwen-voice-enrollment",
    "parameters": {"voice_clone_mode": "normal"},
    "input": {
        "action": "create",
        "target_model": "qwen3.8-omni-flash-realtime",
        "preferred_name": "guanyu",
        "audio": {"data": "https://xxx.wav"}
    }
}'

Response body

request_idstring
The unique identifier of this request.
outputobject
Returned for creation and listing. This field is absent for deletion.
voicestring
— Returned for creationQwen-Omni, Qwen-Omni-Realtime: The voice name, which can be used as the voice parameter in subsequent Omni API calls.Qwen-LiveTranslate-Realtime: The created voice ID is used in the voice parameter of subsequent translation sessions.
target_modelstring
— Returned for creationQwen-Omni, Qwen-Omni-Realtime: 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
It must match the model used in subsequent calls to the omni API. Otherwise, synthesis will fail.Qwen-LiveTranslate-Realtime: The target model specified during voice creation.
voice_listarray[object]
— Returned when listing voicesList of voices found.
voicestring
The voice name, which can be used as the voice parameter in subsequent Omni API calls.
target_modelstring
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
It must match the model used in subsequent calls to the omni API. Otherwise, synthesis will fail.
gmt_createstring
The time when the voice was created.
usageobject
Applies to: Qwen-Omni, Qwen-Omni-Realtime.Usage information for this request.
countinteger
The number of "create voice" operations actually billed for this request. The cost of this request is $count × 0.01.Always 1 for voice creation. Listing or deleting voices is free, so the value is always 0.

Response examples

  • Create
  • List
  • Delete
  • qwen3.8-omni-flash-realtime
  • qwen3.8-livetranslate-flash-realtime
  • Response structure
{
    "output": {
        "voice": "yourVoice",
        "target_model": "qwen3.8-omni-flash-realtime"
    },
    "usage": {
        "count": 1
    },
    "request_id": "yourRequestId"
}

Error messages

If you encounter any errors, please refer to Error Codes for troubleshooting.

Using voices in model calls