Qwen Audio 3.1 ASR Stream

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

Live transcription over a socket, streaming partial words while the speaker talks and a settled sentence at each pause, priced per token.

At a glance

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

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-stream"
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

Notes

Connecting

Live transcription over a WebSocket at wss://api.empiriolabs.ai/v1/realtime?model=qwen-audio-3-1-asr-stream, 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 sentence ends, so there is no commit to send.

What comes back

conversation.item.input_audio_transcription.delta events carry the sentence so far while the speaker is still talking, and conversation.item.input_audio_transcription.completed carries the settled sentence at each pause.

Billing

Input and output tokens are priced per 1M, and each completed sentence 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-stream.