Reference for server events of Qwen-Audio-Realtime API. All server events include the common fields event_id (automatically generated by the server) and type (event type).
User guide: Real-time voice conversation (Qwen-Audio-Realtime). For the event interaction sequence, see WebSocket access.
For WebSocket SDK usage, see Android SDK, iOS SDK, and HarmonyOS SDK. To select a model and protocol, see Overview.
Description: Returned when a request fails or a service error occurs. Client errors (Unique identifier for this event.Event type. Always Error details.
Error type, such as Error code.Error message.The parameter associated with the error.
Description: The first event sent by the server after the connection is established. Contains the default session configuration.
Unique identifier for this event.Event type. Always Session configuration.
Always Model name.Output modalities of the model.Voice used for audio generation. Either a system voice name or the Audio transcription configuration.
Transcription model, such as Turn detection (VAD) configuration.Unique session identifier.
Description: Returned after a Unique identifier for this event.Event type. Always Full session configuration after the update. Shares the same structure as the session object in
Description: Sent when Voice Activity Detection (VAD) detects the start of speech in server_vad / smart_turn / smart_turn_v2 modes.
Unique identifier for this event.Event type. Always Timestamp in milliseconds when speech started.ID of the item that will be created when this speech segment is committed.
Description: Sent when VAD detects the end of speech in server_vad / smart_turn / smart_turn_v2 modes.
Unique identifier for this event.Event type. Always Timestamp in milliseconds when speech ended.ID of the user message item to be created.Returned only in smart_turn / smart_turn_v2 modes. When set to
Description: The audio buffer has been committed as a user message, either through a push-to-talk commit or automatic VAD commit.
Unique identifier for this event.Event type. Always ID of the previous conversation item.ID of the created user message item.
Description: The audio buffer has been cleared (push-to-talk mode only).
Unique identifier for this event.Event type. Always
Description: A new conversation item was created. Triggered when user audio is committed, the client manually creates an item, or an assistant response begins.
Unique identifier for this event.Event type. Always ID of the previous conversation item.The created conversation item.
Unique identifier for the conversation item.Always Item type: Item status, such as Message role, such as Message content list. Only present for
Description: A conversation item was deleted. Returned as a confirmation after the client sends a Unique identifier for this event.Event type. Always ID of the deleted conversation item.
Description: A conversation item was retrieved successfully. Returned after the client sends a Unique identifier for this event.Event type. Always The retrieved conversation item.
Unique identifier for the conversation item.Always Item type: Message role, such as Message content list. For audio-type content, only the transcript text is included; raw audio data isn't returned.
Description: Incremental Automatic Speech Recognition (ASR) transcription result, streamed during speech recognition. Includes emotion and language detection information.
Unique identifier for this event.Event type. Always ID of the associated conversation item.Index of the content part.Finalized transcription text.Tentative text that hasn't been finalized yet.
Description: Final ASR transcription result. The transcribed text is written to the Unique identifier for this event.Event type. Always ID of the associated conversation item.Index of the content part.The complete transcription text.
Description: ASR transcription failed.
Unique identifier for this event.Event type. Always ID of the associated conversation item.Index of the content part.Error details.
Error type, such as Error code, such as Error message.
Description: smart_turn / smart_turn_v2 modes only. Incremental transcription result for ambient audio. When VAD detects voice activity but semantic analysis classifies the turn as invalid (for example, background noise or filler words like "hmm" or "uh"), the ASR result is forwarded to the client as an ambient event. This event isn't linked to any conversation item. The Unique identifier for this event.Event type. Always A standalone temporary ID, not associated with any conversation item.Index of the content part.Finalized transcription text.Tentative text that hasn't been finalized yet.
Description: smart_turn / smart_turn_v2 modes only. Final transcription result for ambient audio. Paired with the corresponding delta event to mark the end of an ambient audio transcription segment. This result isn't written to the conversation context.
Unique identifier for this event.Event type. Always A standalone temporary ID, not associated with the conversation context.Index of the content part.The complete transcription text.
Description: Sent when a model inference round starts.
Unique identifier for this event.Event type. Always The response object.
Unique identifier for the response.Always Response status, such as Output modalities of the model.Voice used for audio generation. Either a system voice name or the Output items of the response. Initially an empty array.
Description: A new output item was added to the response. The output item type is Unique identifier for this event.Event type. Always Associated response ID.Index of the output item within the response.The added output item.
Unique identifier for the output item.Always Output item type: Output item status, such as Message role. Always Message content list. Only present for
Description: A new content part was added to an output item.
Unique identifier for this event.Event type. Always Associated response ID.Associated output item ID.Index of the output item within the response.Index of the content part within the output item.The added content part.
Content type, such as Text content. Initially an empty string.
Description: Text delta event in text-only mode. Streams text fragments incrementally.
Unique identifier for this event.Event type. Always Associated response ID.Associated output item ID.Index of the output item within the response.Index of the content part within the output item.Incremental text fragment.
Description: Text output complete event in text-only mode.
Unique identifier for this event.Event type. Always Associated response ID.Associated output item ID.Index of the output item within the response.Index of the content part within the output item.The complete text output.
Description: Transcript delta event in audio mode. Streams transcript fragments incrementally.
Unique identifier for this event.Event type. Always Associated response ID.Associated output item ID.Index of the output item within the response.Index of the content part within the output item.Incremental transcript fragment.
Description: Transcript output complete event in audio mode.
Unique identifier for this event.Event type. Always Associated response ID.Associated output item ID.Index of the output item within the response.Index of the content part within the output item.The complete transcript text.
Description: For WebSocket access, this is an incremental audio data event in audio mode. The Unique identifier for this event.Event type. Always Associated response ID.Associated output item ID.Index of the output item within the response.Index of the content part within the output item.Base64-encoded PCM audio data fragment.
Description: Audio output complete event in audio mode. Contains no audio data.
Unique identifier for this event.Event type. Always Associated response ID.Associated output item ID.Index of the output item within the response.Index of the content part within the output item.
Description: A content part within an output item has completed.
Unique identifier for this event.Event type. Always Associated response ID.Associated output item ID.Index of the output item within the response.Index of the content part within the output item.The completed content part.
Content type, such as Text content or audio transcript text.
Description: An output item within the response has completed.
Unique identifier for this event.Event type. Always Associated response ID.Index of the output item within the response.The completed output item with full details.
Unique identifier for the output item.Always Output item type: Output item status, such as Message role. Always Message content list. Only present for
Description: Function Calling argument delta. When the model decides to invoke a tool, the server first sends Unique identifier for this event.Event type. Always Associated response ID.Associated output item ID.Index of the output item within the response.Unique identifier for the function call.Incremental fragment of the function call arguments (JSON string fragment).
Description: Sent when Function Calling argument output is complete. After receiving this event, the client should: execute the corresponding tool, write the result to the conversation via Unique identifier for this event.Event type. Always Associated response ID.Associated output item ID.Index of the output item within the response.Unique identifier for the function call.Name of the invoked function.Complete function call arguments (JSON string).
Description: An inference round is complete. Unique identifier for this event.Event type. Always The complete response object.
Unique identifier of the response.Always Completion status of the response. Valid values:Status details. Present only when the status is
Status type, such as Cancellation reason: Output modalities of the model.Voice used for audio generation. Either a system voice name or the List of output items in the response, containing complete item objects.Token consumption for this response. Returned only when
Total number of tokens consumed by this response.Number of input tokens.Number of output tokens.Breakdown of input tokens, including Breakdown of output tokens, including Plug-in usage metering information. Returned when web search (
Web search metering information.
Number of searches.Search strategy.
Description: The voiceprint registration process is in progress asynchronously.
Unique identifier for this event.Event type. Always Unique identifier for the voiceprint registration task.
Description: The voiceprint registration process has completed successfully.
Unique identifier for this event.Event type. Always Unique identifier for the voiceprint registration task.
Description: The voiceprint registration failed. Normal conversation calls are not blocked.
Unique identifier for this event.Event type. Always Unique identifier for the voiceprint registration task.Description of the failure reason.
This page is the event reference for Qwen-Audio-Realtime. Event definitions are based on WebSocket access. AOQ and WebRTC use their respective data channels to send and receive model events, and media tracks to transmit media. First read WebSocket access, WebRTC access, or AOQ access.
error
Description: Returned when a request fails or a service error occurs. Client errors (invalid_request_error) keep the connection open. Server errors (server_error) terminate the connection.
event_idstringtypestringerror.errorobjectProperties
Properties
typestringinvalid_request_error (client error) or server_error (server error).codestringmessagestringparamstringsession.created
Description: The first event sent by the server after the connection is established. Contains the default session configuration.
event_idstringtypestringsession.created.sessionobjectProperties
Properties
objectstringrealtime.session.modelstringmodalitiesarrayvoicestringvoice_id of a cloned voice.input_audio_transcriptionobjectProperties
Properties
modelstringfun-asr.turn_detectionobjectidstringsession.updated
Description: Returned after a session.update request is processed successfully. Contains the full updated session configuration. If the request fails, an error event is returned instead.
event_idstringtypestringsession.updated.sessionobjectsession.created.input_audio_buffer.speech_started
Description: Sent when Voice Activity Detection (VAD) detects the start of speech in server_vad / smart_turn / smart_turn_v2 modes.
event_idstringtypestringinput_audio_buffer.speech_started.audio_start_msintegeritem_idstringinput_audio_buffer.speech_stopped
Description: Sent when VAD detects the end of speech in server_vad / smart_turn / smart_turn_v2 modes.
event_idstringtypestringinput_audio_buffer.speech_stopped.audio_end_msintegeritem_idstringreasonstringturn_invalid, indicates the current turn was classified as invalid (no semantic content) and inference will not be triggered. This field is absent for valid turns.input_audio_buffer.committed
Description: The audio buffer has been committed as a user message, either through a push-to-talk commit or automatic VAD commit.
event_idstringtypestringinput_audio_buffer.committed.previous_item_idstringitem_idstringinput_audio_buffer.cleared
Description: The audio buffer has been cleared (push-to-talk mode only).
event_idstringtypestringinput_audio_buffer.cleared.conversation.item.created
Description: A new conversation item was created. Triggered when user audio is committed, the client manually creates an item, or an assistant response begins.
event_idstringtypestringconversation.item.created.previous_item_idstringitemobjectProperties
Properties
idstringobjectstringrealtime.item.typestringmessage (standard message) or function_call (function call).statusstringin_progress or completed.rolestringuser or assistant. Only present for message type items.contentarraymessage type items.conversation.item.deleted
Description: A conversation item was deleted. Returned as a confirmation after the client sends a conversation.item.delete event.
event_idstringtypestringconversation.item.deleted.item_idstringconversation.item.retrieved
Description: A conversation item was retrieved successfully. Returned after the client sends a conversation.item.retrieve event. For audio-type content, only the transcript text is included; raw audio data isn't returned.
event_idstringtypestringconversation.item.retrieved.itemobjectProperties
Properties
idstringobjectstringrealtime.item.typestringmessage (standard message) or function_call (function call).rolestringuser or assistant. Only present for message type items.contentarrayconversation.item.input_audio_transcription.delta
Description: Incremental Automatic Speech Recognition (ASR) transcription result, streamed during speech recognition. Includes emotion and language detection information.
event_idstringtypestringconversation.item.input_audio_transcription.delta.item_idstringcontent_indexintegertextstringstashstringconversation.item.input_audio_transcription.completed
Description: Final ASR transcription result. The transcribed text is written to the transcript field of the corresponding item.
event_idstringtypestringconversation.item.input_audio_transcription.completed.item_idstringcontent_indexintegertranscriptstringconversation.item.input_audio_transcription.failed
Description: ASR transcription failed.
event_idstringtypestringconversation.item.input_audio_transcription.failed.item_idstringcontent_indexintegererrorobjectProperties
Properties
typestringtranscription_error.codestringtranscription_failed.messagestringconversation.item.ambient_audio_transcription.delta
Description: smart_turn / smart_turn_v2 modes only. Incremental transcription result for ambient audio. When VAD detects voice activity but semantic analysis classifies the turn as invalid (for example, background noise or filler words like "hmm" or "uh"), the ASR result is forwarded to the client as an ambient event. This event isn't linked to any conversation item. The item_id is a standalone temporary ID.
event_idstringtypestringconversation.item.ambient_audio_transcription.delta.item_idstringcontent_indexintegertextstringstashstringconversation.item.ambient_audio_transcription.completed
Description: smart_turn / smart_turn_v2 modes only. Final transcription result for ambient audio. Paired with the corresponding delta event to mark the end of an ambient audio transcription segment. This result isn't written to the conversation context.
event_idstringtypestringconversation.item.ambient_audio_transcription.completed.item_idstringcontent_indexintegertranscriptstringresponse.created
Description: Sent when a model inference round starts.
event_idstringtypestringresponse.created.responseobjectProperties
Properties
idstringobjectstringrealtime.response.statusstringin_progress.modalitiesarrayvoicestringvoice_id of a cloned voice.outputarrayresponse.output_item.added
Description: A new output item was added to the response. The output item type is message for standard replies, or function_call for Function Calling.
event_idstringtypestringresponse.output_item.added.response_idstringoutput_indexintegeritemobjectProperties
Properties
idstringobjectstringrealtime.item.typestringmessage (standard message) or function_call (function call).statusstringin_progress.rolestringassistant. Only present for message type items.contentarraymessage type items.- Message event
- Function Call item fragment
A single response can include multiple
function_call items and may also contain standard message output alongside function_call output. The Function Calling portion isn't sent to TTS for audio playback.response.content_part.added
Description: A new content part was added to an output item.
event_idstringtypestringresponse.content_part.added.response_idstringitem_idstringoutput_indexintegercontent_indexintegerpartobjectProperties
Properties
typestringaudio or text.textstringresponse.text.delta
Description: Text delta event in text-only mode. Streams text fragments incrementally.
event_idstringtypestringresponse.text.delta.response_idstringitem_idstringoutput_indexintegercontent_indexintegerdeltastringresponse.text.done
Description: Text output complete event in text-only mode.
event_idstringtypestringresponse.text.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegertextstringresponse.audio_transcript.delta
Description: Transcript delta event in audio mode. Streams transcript fragments incrementally.
event_idstringtypestringresponse.audio_transcript.delta.response_idstringitem_idstringoutput_indexintegercontent_indexintegerdeltastringresponse.audio_transcript.done
Description: Transcript output complete event in audio mode.
event_idstringtypestringresponse.audio_transcript.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegertranscriptstringresponse.audio.delta
Description: For WebSocket access, this is an incremental audio data event in audio mode. The delta field contains Base64-encoded PCM audio data.
event_idstringtypestringresponse.audio.delta.response_idstringitem_idstringoutput_indexintegercontent_indexintegerdeltastringresponse.audio.done
Description: Audio output complete event in audio mode. Contains no audio data.
event_idstringtypestringresponse.audio.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegerresponse.content_part.done
Description: A content part within an output item has completed.
event_idstringtypestringresponse.content_part.done.response_idstringitem_idstringoutput_indexintegercontent_indexintegerpartobjectProperties
Properties
typestringaudio or text.textstringresponse.output_item.done
Description: An output item within the response has completed.
event_idstringtypestringresponse.output_item.done.response_idstringoutput_indexintegeritemobjectProperties
Properties
idstringobjectstringrealtime.item.typestringmessage (standard message) or function_call (function call).statusstringcompleted.rolestringassistant. Only present for message type items.contentarraymessage type items.response.function_call_arguments.delta
Description: Function Calling argument delta. When the model decides to invoke a tool, the server first sends response.output_item.added (with item.type=function_call) and conversation.item.created, then streams argument fragments through this event.
event_idstringtypestringresponse.function_call_arguments.delta.response_idstringitem_idstringoutput_indexintegercall_idstringdeltastringresponse.function_call_arguments.done
Description: Sent when Function Calling argument output is complete. After receiving this event, the client should: execute the corresponding tool, write the result to the conversation via conversation.item.create with a function_call_output item, and then send response.create to trigger a follow-up inference round.
event_idstringtypestringresponse.function_call_arguments.done.response_idstringitem_idstringoutput_indexintegercall_idstringnamestringargumentsstringresponse.done
Description: An inference round is complete. status indicates the reason for completion.
event_idstringtypestringresponse.done.responseobjectProperties
Properties
idstringobjectstringrealtime.response.statusstringcompleted: Completed normally.cancelled: Interrupted and cancelled.status_details.reasonisturn_detected(VAD interruption) orclient_cancelled(client-initiated cancellation).failed: LLM or TTS error.
status_detailsobjectcancelled or failed.Properties
Properties
typestringcancelled.reasonstringturn_detected (VAD interruption) or client_cancelled (client-initiated cancellation).modalitiesarrayvoicestringvoice_id of a cloned voice.outputarrayusageobjectstatus is completed.Properties
Properties
total_tokensintegerinput_tokensintegeroutput_tokensintegerinput_tokens_detailsobjecttext_tokens (text token count) and audio_tokens (audio token count, present only when the audio modality is used).output_tokens_detailsobjecttext_tokens (text token count) and audio_tokens (audio token count, present only when the audio modality is used).pluginsobject(optional)enable_search) is enabled.Properties
Properties
searchobjectProperties
Properties
countintegerstrategystring- Completed normally
- Interrupted and cancelled
voiceprint_audio_list.in_progress
Description: The voiceprint registration process is in progress asynchronously.
event_idstringtypestringvoiceprint_audio_list.in_progress.item_idstringvoiceprint_audio_list.completed
Description: The voiceprint registration process has completed successfully.
event_idstringtypestringvoiceprint_audio_list.completed.item_idstringvoiceprint_audio_list.failed
Description: The voiceprint registration failed. Normal conversation calls are not blocked.
event_idstringtypestringvoiceprint_audio_list.failed.item_idstringreasonstring