CUSTOM Mode Life Cycle
1. Starting a Session and connecting to the LiveKit Room
In CUSTOM mode, you are able to configure and specify
- the avatar (via avatar_id)
- [optional] your LiveKit configuration
- If sent, we will send the LiveAvatar into your LiveKit room
- If not sent, we will instead spin up a LiveKit room instance, along with the LiveKit configuration details needed to perform everything.
See here for more details - https://docs.liveavatar.com/docs/configuring-custom-mode
Connecting and starting the session is otherwise the same process.
2. Managing the Session
In CUSTOM mode, we will emit events on solely the state of the avatar. To that end, you will have access to:
- control over avatar behaviors such as:
- interrupting
- changing between idle and listening state
- control on what you want the avatar to say and knowledge on when it is speaking
See CUSTOM mode's event list to see the up to date supported events
Instead of sending these events through LiveKit, we instead expose a websocket connection you can send events through.
3. Ending the Session
When the session is closed, we will do the following.
- Our Avatar will leave the current LiveKit room.
- If we spun up a LiveKit room, we will also tear down said room.
- Close the websocket connection.
We recommend tearing down any resources that are currently publish/subscribe to events from the websocket. In addition, you'll need to manage cleaning up any personal LiveKit data and managing the user's room experience.
Updated 4 days ago