Qwen-Audio-Live

Updated at:

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 WebSocket connection. Choose a setup based on how you want 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.