Prerequisites
- A Fish Audio account with an API key
- An Anam API key
- A LiveKit Cloud project with Inference and billing enabled for the LLM
- Python 3.11
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: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
Createagent.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:
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..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.
Troubleshooting
If the worker reportsws_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.

