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).
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).
All examples use the OpenAI-compatible streaming API. Set source and target languages via
These examples use a public file URL. To use a local file, see Input a Base64-encoded local file.
The
Specify the source and target languages in the
In the Python SDK,
Control the output format with the
When the output includes audio, set the voice in the
Each streaming
Concatenate all Base64 audio fragments from the stream, then decode and save the result after the stream completes.
Decode each Base64 fragment as it arrives and play it directly. This approach requires platform-specific audio libraries.
Install
Install dependencies first:
For token pricing, see Model list.
Use these language codes for
Set the
The model translates the video's audio track. Visual information improves translation accuracy.
For example, if the audio says "This is a mask":
For full input and output parameter details, see Audio and video translation - Qwen.
Before you begin
- Create an API key.
- Configure the API key as an environment variable.
- (Optional) If you use the OpenAI SDK, install the SDK.
Quick start
All examples use the OpenAI-compatible streaming API. Set source and target languages via translation_options. The default input is audio; uncomment the video input block in each example to translate video files instead.
Specifying source_lang improves accuracy. Omit it to enable automatic language detection.
Request parameters
Input
The messages array must contain exactly one message with role set to user. The content field holds the audio or video to translate:
- Audio: Set
typetoinput_audio. Provide the file URL or Base64-encoded data ininput_audio.data, and specify the format (for example,wav) ininput_audio.format. - Video: Set
typetovideo_url. Provide the file URL invideo_url.url.
Translation options
Specify the source and target languages in the translation_options parameter:
translation_options is not a standard OpenAI parameter. Pass it through extra_body:
Output modality
Control the output format with the modalities parameter:
modalities value | Output |
|---|---|
["text"] | Translated text only |
["text", "audio"] | Translated text and Base64-encoded synthesized audio |
audio parameter. See Supported voices for available options.
Constraints
- Single-turn only: The model handles one translation per request. Multi-turn conversations are not supported.
- No system message: The
systemrole is not supported. - Streaming only: Only OpenAI-compatible streaming output is supported.
Parse the response
Each streaming chunk object contains:
- Text:
chunk.choices[0].delta.content - Audio:
chunk.choices[0].delta.audio["data"](Base64-encoded, 24 kHz sample rate)
Save audio to a file
Concatenate all Base64 audio fragments from the stream, then decode and save the result after the stream completes.
Python
Node.js
Real-time playback
Decode each Base64 fragment as it arrives and play it directly. This approach requires platform-specific audio libraries.
Python
Install pyaudio first:
| Platform | Installation |
|---|---|
| macOS | brew install portaudio && pip install pyaudio |
| Ubuntu / Debian | sudo apt-get install python-pyaudio python3-pyaudio or pip install pyaudio |
| CentOS | sudo yum install -y portaudio portaudio-devel && pip install pyaudio |
| Windows | python -m pip install pyaudio |
Node.js
Install dependencies first:
| Platform | Installation |
|---|---|
| macOS | brew install portaudio && npm install speaker |
| Ubuntu / Debian | sudo apt-get install libasound2-dev && npm install speaker |
| Windows | npm install speaker |
Billing
- Audio
- Video
Each second of input or output audio consumes 12.5 tokens. Audio shorter than 1 second is billed as 1 second.
Model details
| Model | Version | Context window | Max input | Max output |
|---|---|---|---|---|
| qwen3-livetranslate-flash | Stable | 53,248 tokens | 49,152 tokens | 4,096 tokens |
| qwen3-livetranslate-flash-2025-12-01 | Snapshot | 53,248 tokens | 49,152 tokens | 4,096 tokens |
qwen3-livetranslate-flash currently has the same capabilities as qwen3-livetranslate-flash-2025-12-01.
Supported languages
Use these language codes for source_lang and target_lang. Some target languages support text output only.
| Language code | Language | Supported output |
|---|---|---|
| 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
Set the voice parameter in audio when output includes synthesized audio.
| Voice name | voice parameter | Description | Supported languages |
|---|---|---|---|
| Cherry | Cherry | A cheerful, friendly, and genuine young woman. | Chinese, English, French, German, Russian, Italian, Spanish, Portuguese, Japanese, Korean |
| Nofish | Nofish | A designer who has difficulty pronouncing retroflex consonants. | Chinese, English, French, German, Russian, Italian, Spanish, Portuguese, Japanese, Korean |
| Shanghai-Jada | Jada | A bustling and energetic Shanghai lady. | Chinese |
| Beijing-Dylan | Dylan | A young man who grew up in the hutongs of Beijing. | Chinese |
| Sichuan-Sunny | Sunny | A sweet girl from Sichuan. | Chinese |
| Tianjin-Peter | Peter | A voice in the style of a Tianjin crosstalk performer (the supporting role). | Chinese |
| Cantonese-Kiki | Kiki | A sweet best friend from Hong Kong. | Cantonese |
| Sichuan-Eric | Eric | A man from Chengdu, Sichuan, who is unconventional and stands out from the crowd. | Chinese |
FAQ
When I input a video file, what content is translated?
The model translates the video's audio track. Visual information improves translation accuracy.
For example, if the audio says "This is a mask":
- When the video shows a medical mask, the model translates it as "This is a medical mask."
- When the video shows a masquerade mask, the model translates it as "This is a masquerade mask."