Skip to main content
AvatarController exposes two independent state enums that you can observe through callbacks.

ConversationState

The current playback state of the digital human.
StateMeaning
idlePlays idle animation, the breathing state, with no active response.
playingPlays audio and speaking animation.
pausedAudio and visuals are paused, with state and buffers kept.
Subscribe to state changes through AvatarController.onConversationState.
Android also has an intermediate Active state. It means avatar speech audio has been received, but playable motion data is not ready yet.
Detailed definitions for each platform: Web ConversationState | iOS ConversationState | Android ConversationState | Flutter ConversationState

ConnectionState

Only available in Direct Mode. In Platform Integrations and Backend Mode integrations, the connection is managed by the agent worker, TEN graph, or developer backend, and is not exposed through AvatarController.ConnectionState.
The WebSocket connection state from AvatarKit to Motion Server in Direct Mode integrations.
StateMeaning
disconnectedNo active connection.
connectingHandshake in progress.
connectedConnection is active and can receive avatar speech audio.
failedConnection failed. On iOS, Android, and Flutter SDKs, it carries additional error detail.
Subscribe to state changes through AvatarController.onConnectionState. Detailed definitions for each platform: Web ConnectionState | iOS ConnectionState | Android ConnectionState | Flutter ConnectionState

Errors (onError)

Subscribe through AvatarController.onError. Errors are grouped by category:
CategoryRepresentative errorsMode availability
AuthenticationsessionTokenExpired, sessionTokenInvalid, appIDUnrecognized, insufficientBalance, concurrentLimitExceededDirect Mode only. Other integrations handle these on the backend or plugin side.
Resource loadingavatarIDUnrecognized, avatarAssetsMissing, failedToFetchAvatarMetadataAll integrations.
ConnectionwebsocketError, websocketClosedAbnormally, sessionTimeoutDirect Mode only.
ServerserverErrorAll integrations.
Complete error enum, including WebSocket close codes: Resources -> Error Codes.