qwen3-livetranslate-flash translates audio and video files across 18 languages. It accepts audio or video input and returns translated text, synthesized audio, or both via a streaming API. For video input, visual context improves translation accuracy (e.g., distinguishing "medical mask" vs. "masquerade mask" based on video frames).
How it works
-
Set the languages: Refer to Supported languages and set the source language (
source_lang) and target language (target_lang) in thetranslation_optionsparameter.Omitting
source_langenables automatic language detection, but specifying the language improves translation accuracy. -
Input the file to translate: The
messagesarray must contain exactly one message withroleset touser, and thecontentfield must contain the URL or Base64 data of the audio or video file to translate. -
Control the output modality:Use the
modalitiesparameter to control the output modality:-
["text"]: text output only; -
["text","audio"]: outputs text and Base64-encoded audio.If the output includes audio, set the voice (
voice) in theaudioparameter. Refer to Supported voices.
-
- Single-turn translation: The model is designed for translation tasks and does not support multi-turn conversations.
- No system message: Setting global behavior through the
systemrole is not supported. - Invocation method:Only streaming output compatible with the OpenAI protocol is supported.
chunk is the streaming response object:
- Text: read
chunk.choices[0].delta.content. - Audio: read
chunk.choices[0].delta.audio["data"]. The model outputs audio at a 24 kHz sample rate.
Supported models
| Model name | Version | Context length | Max input | Max output |
|---|---|---|---|---|
| (tokens) | ||||
qwen3-livetranslate-flashCurrently equivalent to qwen3-livetranslate-flash-2025-12-01 | Stable version | 53,248 | 49,152 | 4,096 |
| qwen3-livetranslate-flash-2025-12-01 | Snapshot version | |||
How to use
The qwen3-livetranslate-flash model supports audio or video input and outputs text and audio.
Make sure you have obtained and configured an API key and set the API key as an environment variable. If you call through the OpenAI SDK, install the SDK.
The following examples use audio input. To input a video file, uncomment the corresponding code.
Parse Base64 audio data
The model outputs audio in a streaming, Base64-encoded format. You can process the data in one of the following two ways:
- Concatenate and decode: concatenate all returned Base64 fragments, decode them all at once after generation completes, and save the result as an audio file.
- Real-time playback: decode each Base64 fragment in real time and play it directly.
Billing
- Audio
- Video
API reference
For the input and output parameters of the qwen3-livetranslate-flash model, see Audio and video file translation - Qwen.
Supported languages
The language codes in the following table can be used to specify the source and target languages.
Some target languages support text output only and do not support audio output.
Language code | Language | Supported output modalities |
|---|---|---|
en | English | Audio, text |
zh | Chinese | Audio, text |
ru | Russian | Audio, text |
fr | French | Audio, text |
de | German | Audio, text |
pt | Portuguese | Audio, text |
es | Spanish | Audio, text |
it | Italian | Audio, text |
id | Indonesian | Text |
ko | Korean | Audio, text |
ja | Japanese | Audio, text |
vi | Vietnamese | Text |
th | Thai | Text |
ar | Arabic | Text |
yue | Cantonese | Audio, text |
hi | Hindi | Text |
el | Greek | Text |
tr | Turkish | Text |
Supported voices
| Voice name | voice parameter | Voice effect | Description | Supported languages |
|---|---|---|---|---|
| Cherry | Cherry | A cheerful, approachable, and naturally friendly young woman. | Chinese, English, French, German, Russian, Italian, Spanish, Portuguese, Japanese, Korean | |
| Nofish | Nofish | A designer who cannot pronounce retroflex consonants. | Chinese, English, French, German, Russian, Italian, Spanish, Portuguese, Japanese, Korean | |
| Shanghai-Jada | Jada | A brisk, energetic Shanghai lady. | Chinese | |
| Beijing-Dylan | Dylan | A young man who grew up in the hutongs of Beijing. | Chinese | |
| Sichuan-Sunny | Sunny | A Sichuan girl sweet to the core. | Chinese | |
| Tianjin-Peter | Peter | Tianjin crosstalk style, a professional supporting performer. | Chinese | |
| Cantonese-Kiki | Kiki | A sweet best friend from Hong Kong. | Cantonese | |
| Sichuan-Eric | Eric | An unconventional, street-smart man from Chengdu, Sichuan. | Chinese |
FAQ
Q: What content is translated when I input a video file?
A: The model translates the audio content of the video. Visual information is used to assist context understanding and improve accuracy.
Example:
When the audio content is This is a mask:
- If the frame shows a protective face mask, it is translated as "This is a medical mask";
- If the frame shows a masquerade mask, it is translated as "This is a masquerade mask".