Skip to navigation

Qwen Audio 3.1 ASR Message

Qwen Audio 3.1 ASR Message
Alibaba Cloud · Transcription
WEBSOCKET /v1/realtime

Transcription tuned for voice messages and voice input over a socket, returning each utterance as one complete transcript when the speaker pauses.

At a glance

FieldValue
Model idqwen-audio-3-1-asr-message
Model release date2026-09-21
Input modalitiesAudio
Output modalitiesText
Context window-
Weight precision-
RegionSingapore
Featurestranscription, speech_to_text, realtime, multilingual
Native inferenceNo
NewYes
Supported endpointsWEBSOCKET /v1/realtime
Alternate model idsqwen-audio-3.1-asr-message, alibaba/qwen-audio-3-1-asr-message

Pricing

ChargeSpecRate
Inputper 1M audio input tokens$1.86
Outputper 1M generated tokens$1.40

Example request

import asyncio, json, os, websockets
URL = "wss://api.empiriolabs.ai/v1/realtime?model=qwen-audio-3-1-asr-message"
async def main():
async with websockets.connect(
URL,
additional_headers=[("Authorization", f"Bearer {os.environ['EMPIRIOLABS_API_KEY']}")],
max_size=None,
) as ws:
print(json.loads(await ws.recv())["type"]) # session.created
await ws.send(json.dumps({
"type": "conversation.item.create",
"item": {"type": "message", "role": "user",
"content": [{"type": "input_text", "text": "Say hello."}]},
}))
await ws.send(json.dumps({"type": "response.create"}))
async for raw in ws:
event = json.loads(raw)
if event["type"] == "response.done":
break
asyncio.run(main())

Parameters

ParameterTypeRequiredDefaultDescription
input_audio_formatenumno"pcm16"Encoding of the audio you append to the input buffer: base64 16-bit PCM, mono, at 16 kHz. · Allowed: pcm16
languageenumno"auto"Language of the speech, or auto to detect it from the audio. Set it with the language query parameter of the connection URL, or as input_audio_transcription.language in session.update. · Allowed: auto, zh, en, ja, ko, vi, th, id, ms, tl, hi, ar, fr, de, es, pt, ru, it, nl, sv, da, fi, no, el, pl, cs, hu, ro, bg, hr, sk
silence_duration_msintegerno800The pause, in milliseconds, that ends a sentence, from 200 to 6000. A shorter pause settles each sentence sooner; a longer one keeps a pause inside a sentence. Also accepted as turn_detection.silence_duration_ms. · Range: 200 – 6000
thresholdnumberno-How clear speech must be before it is transcribed, from 0.0 to 1.0. A higher value ignores more background noise and can miss quiet speech. When omitted, the model’s own default applies. Also accepted as turn_detection.threshold. · Range: 0 – 1
noise_reductionenumno"far_field"The microphone the speech detection is tuned for: near_field for a headset or a phone held close, far_field for a laptop or room microphone. Also accepted as input_audio_noise_reduction.type. · Allowed: far_field, near_field
keep_dialectbooleannofalseKeeps Chinese dialect words as spoken. When off, dialect speech is written as standard Mandarin.
partial_resultsbooleannofalseAlso sends each utterance while it is spoken, as conversation.item.input_audio_transcription.delta events carrying the utterance so far, which can still change before it settles.

Notes

Connecting

Voice message transcription over a WebSocket at wss://api.empiriolabs.ai/v1/realtime?model=qwen-audio-3-1-asr-message, authenticated with the ordinary Authorization Bearer header.

Sending audio

Stream 16 kHz mono pcm16 audio with input_audio_buffer.append. Voice activity detection decides where each utterance ends, so there is no commit to send.

Session settings

Send session.update right after session.created, before the first audio, with any of these settings: input_audio_transcription.language (or the language query parameter of the connection URL; auto by default), turn_detection.silence_duration_ms (200 to 6000, default 800) and turn_detection.threshold (0.0 to 1.0), and input_audio_noise_reduction (near_field or far_field). keep_dialect keeps Chinese dialect words as spoken. A setting changed while audio is streaming ends the utterance in progress and applies to the audio sent after it.

What comes back

Each utterance arrives whole, as one conversation.item.input_audio_transcription.completed event once the speaker pauses. Set partial_results to also receive it while it is spoken, as conversation.item.input_audio_transcription.delta events that can still change before it settles. For live captions, qwen-audio-3-1-asr-stream always sends them.

Billing

Input and output tokens are priced per 1M, and each completed utterance is billed on its own from the usage the model reports.


Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/qwen-audio-3-1-asr-message.