State and connectivity
Provides a
TransportState string representing the connectivity state of the local client.One of: idle | initializing | initialized | authenticating | connecting | connected | ready | disconnected | errorSee transports for state explanation.Local user disconnected from the transport, either intentionally by calling
voiceClient.disconnect() or due to an error.Bot connected to the transport and is configuring.Note: bot connectivity does not infer that its pipeline is yet ready to run. Please use
onBotReady instead.The bot has been instantiated, its pipeline is configured, and it is receiving user media and interactions.This method is passed a
BotReadyData object, which contains a config VoiceClientConfigOption[] array and the RTVI version number.It is recommended to hydrate your client with the passed config in case the bot alters any configuration based on its implementation.Since the bot is remote and may be using a different version of RTVI than the client, you can use the passed version string to check for compatibility.Bot disconnected from the transport.This may occur due to session expiry, a pipeline error or because the local participant left the session.
Messages and errors
If the client receives an unknown message type from the transport (see
messages and events), it can be handled here.
Response error when an action fails or an unknown message type is sent from
the client.
Error signalled by the bot. This could be due to a malformed config update or
an unknown action dispatch or the ability to complete the requested action.
Configuration
Sent when the bots configuration changes. This is most likely in response to a user
updateConfig action, but can occur within a bots pipeline.It’s recommended to hydate the client config with the passed config.A list of available configuration options for each service. Sent in response to a user
describeConfig() call.Media and devices
Lists available local media microphone devices. Triggered when a new device
becomes available or in response to
voiceClient.initDevices().Lists available local media camera devices. Triggered when a new device
becomes available or in response to
voiceClient.initDevices().Audio and Voice Activity
Media track from a local or remote participant was started and playable. Can
be either an audio or video track.
Media track from a local or remote participant was stopped and no longer
playable.
Remote audio gain level (0 to 1).Note: if more than one participant is connected to the transport, the
participant property details the associated peer.The local user started speaking.This method is more reliable than using audio gain and is the result of the bot’s VAD (voice activity detection) model. This provides a more accurate result in noisy environments.
Transcription
Other
Pipeline data provided by Pipecat. Please see Pipecat
documentation for more information.