Overview
The Duix SDK emits various events throughout the session lifecycle. Developers can listen to these events using theduix.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
progress
Indicates the current loading progress of the digital human and its resources. Returns a numeric value between 0 and 100. Payload: number ExamplespeakSection
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. PayloadspeakStart
Triggered when the avatar begins speech playback. PayloadspeakEnd
Triggered when the avatar completes speech playback. Useful for synchronizing UI transitions or logic after speech completion. PayloadasrData
Triggered during active speech recognition (ASR). Each ASR cycle starts with asrStart and ends with asrStop. Use this event to display incremental transcription results. Payloadreport
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. PayloadcameraChange
Payloadduix.start().