This example demonstrates how to integrate the BitHuman SDK with LiveKit Agents to create an interactive visual agent on local CPU device.
- BitHuman API Secret
- BitHuman Avatar Model (.imx file)
- Get API Secret from bitHuman website
- Download Avatar Model (.imx file). You can use a sample model as below
or create new models on the platform
wget https://repo.one.bithuman.io/resources/rt_models/samples/albert_einstein.imx
- Install Dependencies
pip install bithuman
Create a .env file in the root directory with the following:
BITHUMAN_API_SECRET=your_api_secret_here
BITHUMAN_MODEL_PATH=/path/to/model.imx
To run the agent with a BitHuman avatar (the first time loading on MacOS may take a while for warmup):
python examples/avatar_agents/bithuman/agent_worker.py devThis example integrates BitHuman directly within the agent worker process:
- Audio from the agent is routed to the BitHuman runtime
- The BitHuman SDK processes the audio to generate realistic animations
- Synchronized audio and video are published to the LiveKit room
For more information about BitHuman SDK, refer to the official documentation.