Skip to main content

Overview

The Duix SDK emits various events throughout the session lifecycle. Developers can listen to these events using the duix.on(eventName, callback) method to handle errors, progress updates, speech synchronization, and RTC quality monitoring.

Event Summary


Event Details

1. error

Triggered when an unexpected error occurs. Payload
Error codes

progress

Indicates the current loading progress of the digital human and its resources. Returns a numeric value between 0 and 100. Payload: number Example

speakSection

Emitted for each incremental speech segment — typically used for real-time subtitles or streaming speech visualization. When answer() is used, this event streams continuously; for speak(), it aligns with speakStart. Payload
Example

speakStart

Triggered when the avatar begins speech playback. Payload
Example

speakEnd

Triggered when the avatar completes speech playback. Useful for synchronizing UI transitions or logic after speech completion. Payload
Example

asrData

Triggered during active speech recognition (ASR). Each ASR cycle starts with asrStart and ends with asrStop. Use this event to display incremental transcription results. Payload
Example

report

Delivers a detailed periodic (once per second) network and video quality report. This event helps developers monitor RTC connection quality and performance metrics in real time. Payload
Example

cameraChange

Payload
Example
Note: Event payloads not explicitly documented above will return empty objects. Register all event listeners before invoking duix.start().