bitHuman SDK enables you to build interactive agents that respond realistically to audio input. This guide covers installation instructions, a hands-on example, and an overview of the core API features.
Run a visual agent using bitHuman for visual rendering, OpenAI Realtime API for voice-to-voice and LiveKit for orchestration.Make sure to add OPENAI_API_KEY for voice response, and to run a LiveKit room with webrtc, add LIVEKIT_API_KEY to your .env file.
Copy
# Run locallypython livekit_agent/agent_local.py# Run in a LiveKit roompython livekit_agent/agent_webrtc.py dev
Stream a bitHuman avatar to a LiveKit room using WebRTC, while controlling the avatar’s speech through a WebSocket interface.
Copy
# Start the serverpython livekit_webrtc/bithuman_server.py --room test# Send audio to the avatarpython livekit_webrtc/websocket_client.py stream /path/audio.wav