Skip to main content

AvatarTalk Realtime Avatar integration guide

How to use the AvatarTalk virtual avatar plugin for LiveKit Agents.

Available in
Python

Overview

AvatarTalk's Realtime Avatars let you create your own avatar that can participate in live, interactive conversations. You can use the open-source AvatarTalk integration for LiveKit Agents in your voice AI app.

Quick reference

This section includes a basic usage example and some reference material. For links to more detailed documentation, see Additional resources.

Installation

Install the plugin from PyPI:

uv add "livekit-plugins-avatartalk~=1.4"

Authentication

The AvatarTalk plugin requires a AvatarTalk API key.

Set AVATARTALK_API_KEY in your .env file.

Avatar setup

The AvatarTalk plugin accepts an avatar ID, which can either be set as the AVATARTALK_AVATAR environment variable or as the avatar argument in the avatar session. You can choose an avatar on the AvatarTalk dashboard.

You may also set the avatar's emotion, which can be set either as the AVATARTALK_EMOTION environment variable or as the emotion argument passed to the AvatarSession.

Usage

Use the plugin in an AgentSession. For example, you can use this avatar in the Voice AI quickstart.

from livekit import agents
from livekit.agents import AgentServer, AgentSession
from livekit.plugins import avatartalk
server = AgentServer()
@server.rtc_session(agent_name="my-agent")
async def my_agent(ctx: agents.JobContext):
session = AgentSession(
# ... stt, llm, tts, etc.
)
avatar = avatartalkAvatarSession(
avatar="...", # ID of the AvatarTalk avatar to use. See "Avatar setup" for details.
)
# Start the avatar and wait for it to join
await avatar.start(session, room=ctx.room)
# Start your agent session with the user
await session.start(
# ... room, agent, room_options, etc....
)

Preview the avatar in the Agents Playground or your own frontend starter app.

Parameters

This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.

avatarstringOptionalDefault: japanese_man

ID of the AvatarTalk avatar to use. See Avatar setup for details.

emotionstringOptionalDefault: expressive

The avatar's emotion for the session. See Avatar setup for details.

avatar_participant_namestringOptionalDefault: avatartalk-agent

The name of the participant to use for the avatar.

Additional resources

The following resources provide more information about using AvatarTalk with LiveKit Agents.