Skip to main content
Version: 1.0.x

Anam AI Avatar

The Anam AI Avatar plugin allows you to integrate a real-time, lip-synced AI avatar into your VideoSDK agent. It provides a visual representation of the agent with expressive facial movements synchronized to speech output, and works with Pipeline in both cascading and realtime modes.

Installation​

Install the Anam-enabled VideoSDK Agents package:

pip install "videosdk-plugins-anam"

Authentication​

The Anam AI plugin requires an Anam API key.

Importing​

from videosdk.agents.plugins import AnamAvatar

Setup Credentials​

To use Anam AI, you need an API key and an avatar ID. You can get them from the Anam AI Dashboard.

ANAM_API_KEY="YOUR_ANAM_API_KEY"
ANAM_AVATAR_ID="YOUR_ANAM_AVATAR_ID"

Example Usage​

Here's how you can integrate the Anam AI Avatar with Pipeline in both realtime and cascading modes.

This example shows how to add the Anam AI Avatar to a Pipeline (realtime mode).

import os
from videosdk.agents import Pipeline
from videosdk.agents.plugins import AnamAvatar

# 1. Create an AnamAvatar instance
anam_avatar = AnamAvatar(
api_key=os.getenv("ANAM_API_KEY"),
avatar_id=os.getenv("ANAM_AVATAR_ID"),
)

# 2. Add the avatar to the pipeline
pipeline = Pipeline(
avatar=anam_avatar
)

For a full working example, see the Anam Realtime Example on GitHub.

Configuration Options​

AnamAvatar​

  • api_key: (str, optional) Your Anam API key. Falls back to the ANAM_API_KEY environment variable if not provided.
  • avatar_id: (str, optional) The ID of the avatar to use. Defaults to "d9ebe82e-2f34-4ff6-9632-16cb73e7de08".
  • persona_config: (PersonaConfig, optional) A full persona configuration object (must include an avatar_id). When provided, it is used instead of building one from avatar_id.

Additional Resources​

The following resources provide more information about using Anam AI with VideoSDK Agents SDK.

Got a Question? Ask us on discord