SDK Messages
While your digital human is being used, there are a number of messages that may be emitted via UneeqOptions => messageHandler. The following document describes these messages in detail.
The avatar's answer to a question (HTML Content). uneeqMessageType: "AvatarAnswerContent"
content: string If hasDisplayHtml = true, this content will contain the HTML provided by the displayHTML instruction. If hasDisplayHtml = false, this content will contain the answer value.
hasDisplayHtml: boolean
transcriptId: string
The avatar's answer to a question.
uneeqMessageType: "AvatarAnswer"
answer: string
answerAvatar: string
answerSpeech: string
transcriptId: string
An avatar is available.
uneeqMessageType: "AvatarAvailable"
The question the user asked.
uneeqMessageType: "AvatarQuestion"
question: any
transcriptId: any
The Avatar has completed processing a text or instruction request.
uneeqMessageType: "AvatarRequestCompleted"
reason: string
The Avatar has ignored a request to speak.
uneeqMessageType: "AvatarRequestIgnored"
reason: string
[Deprecated] Avatar has finished speaking the message. Deprecated, use FinishedSpeaking
uneeqMessageType: "AvatarTextInputFinished"
There are no avatars currently available.
uneeqMessageType: "AvatarUnavailable"
Provides streaming status updates for both client and server side.
uneeqMessageType: "ClientMediaStreamUpdate"
clientStreamingAudio: boolean
clientStreamingVideo: boolean
serverStreamingVideo: boolean
serverStreamingAudio: boolean
These WebRTC statistics help identify if session quality is being impacted by client-side conditions. Messages are sent every 5 seconds, and are visible in the console if enableClientPerformanceMessage = true.
uneeqMessageType: "ClientPerformanceMessage"
clientPerformance: ClientPerformanceStats
Connection has been lost.
uneeqMessageType: "ConnectionLost"
connectionState: PublishSubscribeState
An error has occurred with the users device.
uneeqMessageType: "DeviceError"
error: Error
The device list has been changed or retrieved for the first time.
uneeqMessageType: "DeviceListUpdated"
devices: Devices
Selected device is not found.
uneeqMessageType: "DeviceNotFoundError"
deviceId: string
msg: string
User has given permission to use devices.
uneeqMessageType: "DevicePermissionAllowed"
The digital human has been unmuted. You will also receive this message at the start of a session if the digital human starts unmuted.
uneeqMessageType: "DigitalHumanUnmuted"
Digital human has finished speaking the message.
uneeqMessageType: "FinishedSpeaking"
Instructions payload has been sent from NLP. Instructions may be set within your NLP as JSON.
uneeqMessageType: "Instructions"
instructions: JSON stringified object containing the content set within your NLP JSON field.
An error occurred with mic activity messages.
uneeqMessageType: "MicActivityError"
Message is sent upon activity of the user microphone.
uneeqMessageType: "MicActivity"
level: integer
Mic activity messages are not supported by the users browser.
uneeqMessageType: "MicActivityNotSupported"
Clients network status has changed.
uneeqMessageType: "OnlineStatusUpdate"
online: boolean
Service is ready to be used.
uneeqMessageType: "Ready"
User has started a recording successfully.
uneeqMessageType: "RecordingStarted"
User has stopped recording successfully.
uneeqMessageType: "RecordingStopped"
Service is unavailable.
uneeqMessageType: "ServiceUnavailable"
error: any
Session has been ended successfully.
uneeqMessageType: "SessionEnded"
A session error has occurred.
uneeqMessageType: "SessionError"
error: string
Session info message used for testing.
uneeqMessageType: "SessionInfo"
info: string
Session is Live, avatar video is active.
uneeqMessageType: "SessionLive"
Session has been paused successfully.
uneeqMessageType: "SessionPaused"
Session has been resumed successfully.
uneeqMessageType: "SessionResumed"
Users camera has been set successfully.
uneeqMessageType: "SetCameraSuccess"
deviceId: string
Users microphone has been set successfully.
uneeqMessageType: "SetMicSuccess"
deviceId: string
Users speaker has been set successfully.
uneeqMessageType: "SetSpeakerSuccess"
deviceId: string
Digital human has started speaking a message.
uneeqMessageType: "StartedSpeaking"
General warning message.
uneeqMessageType: "Warning"
msg: string
WebRTC data channel message.
uneeqMessageType: "WebRtcData"
data: any
WebRTC stats message (diagnostics).
uneeqMessageType: "WebRtcStats"
stats: any