NameDescription
errorTriggered when there is an uncaught error.
byeTriggered when the session ends.
initialSuccessDigital human initialization successful. You can call the start method in the callback of this event
showDigital human has been displayed.
progressDigital human loading progress.
speakSectionCurrent audio and text segment of the digital human speaking (the answer method will get results in streaming mode, if calling speak separately, this event is consistent with speakStart)
speakStartThere is a slight delay between driving the digital human to speak and the actual speaking, this event indicates that the digital human has actually started speaking
speakEndDigital human has finished speaking
asrStartSingle sentence speech recognition started
asrDataSingle sentence real-time speech recognition results
asrStopSingle sentence speech recognition ended
reportReports RTC network/picture quality and other information every second

error

{
  code: '', // error code 
  message: '', // error message 
  data: {} // error data
}

error code

NameDescriptiondata
3001RIC connection failed
4001Failed to start session
4005Authentication failed
4007Server session abnormally endedcode: 100305 Model file not found
4008Failed to get microphone stream
4009Browser cannot autoplay based on playback policyPlease consider muted playback or user operation to call the start method

progress

Progress of type number, 0-100

speakSection


{
  audio: '', // audio src
  content: '', // audio content
}

speakStart


{
  audio: '',
  content: '',
}

speakEnd


{
  audio: '',
  content: '',
}

asrData

The recognition of each text segment starts with an asrStart and ends with an asrStop, with one or more asrData (incremental push) in between. You can get speech recognition results in the asrData event for display.


{
  content: '',
}

report

{
    "video": { // Video related information
        "download": {
            "frameWidth": 1920, // width
            "frameHeight": 1080,// height
            "framesPerSecond": 24,// frame rate
            "packetsLost": 0, // Total number of lost packets
            "packetsLostPerSecond": 0 // Total loss rate
        }
    },
    "connection": { // connection information
        "bytesSent": 206482, // Total number of bytes sent
        "bytesReceived": 79179770, // Total bytes received
        "currentRoundTripTime": 3, // Packet round trip time (milliseconds), the larger the time, the more delayed the screen
        "timestamp": 1688043940523,
        "receivedBitsPerSecond": 2978472, // Receive bit rate (number of bits received per second, 1Mb = 1024^2 bits)
        "sentBitsPerSecond": 7920 // Send bit rate (number of bits sent per second, 1Mb = 1024^2 bits)
    }
}

Note: Event parameters not listed in detail above are empty