Discussions

Ask a Question
Back to all

Questions about LiveAvatar FULL mode and WebSocket endpoint

I have a few technical questions about LiveAvatar.

Previously, when I created a session, I received a WebSocket URL in the response (for example, as data.realtime_endpoint). However, when I start LiveAvatar in FULL mode, I no longer receive a ws_url, and because of that, part of my existing implementation no longer works.

The part that is not working now is a “repeat audio” feature. Until now, I was able to make the avatar speak by sending a base64-encoded audio file via WebSocket, like this:

webSocket.send(JSON.stringify({
type: "agent.speak",
event_id: eventId,
audio: base64,
}));

I also checked this GitHub repository:

https://github.com/heygen-com/liveavatar-web-sdk

From what I can see, it seems that a WebSocket connection is required in order to make the avatar speak.

So my questions are:

In LiveAvatar FULL mode, is there a way to obtain a WebSocket endpoint (like ws_url or data.realtime_endpoint)?

If not, what is the recommended way in FULL mode to implement a similar behavior, where I can send an audio file (base64) and have the avatar speak it, similar to agent.speak?

Is there any updated sample code or documentation for achieving this in FULL mode?

I’m sorry for the detailed technical questions, but I would really appreciate it if you could confirm and advise.