Skip to main content

Qwen-Audio-Live

Choose a transport and a delegation mode for Qwen-Audio-Live.

Qwen-Audio-Live handles complex tasks within a full-duplex voice session. The frontend speech model carries on the conversation, delegates tasks, and can incorporate task results into its spoken replies.

Choose a transport

Both setups start with a control WebSocket. Use it for audio, or establish a separate media connection to send and receive audio.
  • WebSocket only. Send and receive Base64-encoded PCM in WebSocket events. Omit session.transport or set its type to websocket.
  • WebSocket + WebRTC or AOQ. Keep the control WebSocket open to configure the session, set up the media connection, and send task requests. Once the media connection is ready, use it to send and receive audio. Receive server events over either connection.
    • WebRTC. Send and receive audio over WebRTC media tracks. Set session.transport.type to rtc. Send the Offer and receive the Answer over the control WebSocket.
    • AOQ. Connect to an AOQ relay with the AOQ Client SDK. Set session.transport.type to aoq. The session.updated event on the control WebSocket carries temporary AOQ connection details. Set session.transport.aoq.ws_audio to true to receive a copy of downlink audio over the control WebSocket.
After sending session.update, wait for session.updated. With WebRTC or AOQ, also wait for the media connection to be ready.

Choose who executes tasks

  • Client mode (client): Your application receives the task, invokes its own agent or service, and sends back the result.
  • Responses mode (responses): The service invokes the configured backend model. The frontend model can use its result to continue the conversation.
Use call_id to correlate a frontend function call with its result. Use the delegation_id from the task event to submit task results. See client events, server events, and the Qwen-Audio-Live user guide.

Look up events by operation

Configure and end a session

OperationClient actionServer returns
Establish a WebSocket connectionInitiate connectionsession.created
Configure session parameterssession.updatesession.updated
View session usageListen for usage updates sent by the server every 5 secondssession.usage.updated
End sessionsession.closesession.closed
Handle request errorsTroubleshoot errors returned by eventerror

Send and receive audio, subtitles, and text

OperationClient actionServer returns
Send and receive audio using pure WebSocket integrationsession.input_audio.appendsession.output_audio.delta
Mute or unmute upstream audiosession.input_audio.mute, session.input_audio.unmutesession.input_audio.muted, session.input_audio.unmuted
Display user transcription and model-generated subtitlesReceive and accumulate text fragmentssession.input_transcript.delta, session.output_transcript.delta
Send text messagessession.item.create, item.type is set to messageReturns audio and captions according to the session configuration

Handle delegated tasks and function calls

OperationRequest or eventAssociated field or acknowledgment
Receive an automatically dispatched taskService sends session.delegation.createddelegation_id
Update task progressApplication sends session.thinking.appendsession.thinking.appended
Prompt the user to provide additional informationApplication sends session.instruction.append, filling in delegation_id for the current taskListen for session.instructions.appended. The request name uses instruction and the acknowledgment uses instructions. Read additional information from supplements, if present, in subsequent session.delegation.created events.
Return Client-mode task resultsApplication sends session.commentary.append, filling in delegation_idsession.commentary.appended
Explicitly initiate backend generationApplication sends response.item.create with input, then sends response.createresponse.event. The inner response.completed indicates completion of backend generation
Handle frontend function callsService sends session.event; application returns the result by sending session.item.createcall_id
For the complete list of fields and JSON examples, see Client Events and Server Events.