Skip to main content

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 both CascadingPipeline and RealTimePipeline.

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.plugins.anam 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 both RealTimePipeline and CascadingPipeline.

This example shows how to add the Anam AI Avatar to a RealTimePipeline.

import os
from videosdk.agents import RealTimePipeline
from videosdk.plugins.anam 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 = RealTimePipeline(
avatar=anam_avatar
)

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

Configuration Options

AnamAvatar

  • api_key: (str, required) Your Anam API key.
  • avatar_id: (str, optional) The ID of the avatar to use. Defaults to "d9ebe82e-2f34-4ff6-9632-16cb73e7de08".

Additional Resources

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

Got a Question? Ask us on discord