Skip to main content
Anam is a real-time AI avatar platform that lets you add a face to your voice agents. Its Cara-4.1 Express model turns speech into expressive avatar video with natural facial movement and lip sync. This guide shows you how to connect Fish Audio and Anam through LiveKit to build an interactive video agent. Fish Audio handles speech recognition and speech generation, Anam renders the avatar, and LiveKit streams synchronized audio and video to your app.

Prerequisites

Installation

Install LiveKit Agents with Fish Audio and Anam support in your Python environment:

Configuration

Set your API keys and LiveKit credentials as environment variables:
The example defaults to Mia (stock Anam avatar) and Sarah (female American English voice). To choose a different Fish Audio voice or Anam avatar, optionally set these overrides:
Leave these variables unset or empty to use the defaults.
Keep API keys and secrets on the server, and use a publicly reachable LiveKit URL so Anam can join the room. These exports apply only to the current terminal and its child processes. Run the worker in that same terminal, or export the values again in a new terminal. A .env file is not loaded by this example.

Basic usage

Create agent.py with Fish Audio for speech recognition and text-to-speech, GPT-5.4 mini through LiveKit Inference for replies, and Anam for the avatar:
Start avatar.start() before session.start() so speech is routed through Anam from the first greeting. The visitor’s identity binds microphone input to the user, and the session closes when that visitor disconnects.

Key parameters

Running the example

Download the model assets and start the worker from the terminal where you set the environment variables:

Connect the React starter

Keep the Python worker running. In a second terminal, clone the LiveKit React starter to talk to your agent and see its avatar. You’ll need Node.js 24, which includes npm.
Edit the starter’s .env.local with the same LiveKit project credentials used by your Python worker. Set AGENT_NAME to dispatch your agent. These credentials let the starter generate tokens through its included token endpoint; LIVEKIT_TOKEN_SERVER_ID is not required and can remain unset.
Start the frontend:
Open http://localhost:3000, start a session, and allow microphone access. You should hear Sarah’s voice and see Mia speaking in sync, unless you set voice or avatar overrides.

Troubleshooting

If the worker reports ws_url is required, or set LIVEKIT_URL environment variable, check that LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET are exported in the terminal running the worker. Use your actual LiveKit Cloud project credentials, then restart the worker. The Python example does not load .env files automatically.

Resources