A simple first example that works reliably.Documentation Index
Fetch the complete documentation index at: https://docs.bithuman.ai/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
Install
The SDK includes
opencv-python-headless automatically. Do not install opencv-python (full) separately — it conflicts with PyAV.What It Does
- Loads your audio file (WAV, MP3, M4A supported)
- Creates synchronized avatar animation
- Shows real-time video in OpenCV window
- Plays audio through speakers with sounddevice
- Smooth audio playback with buffering
- Real-time video display at 25 FPS
- Keyboard controls for interaction
- Supports multiple audio formats
Command Line Options
| Option | Description |
|---|---|
--model | Path to .imx model file |
--audio-file | Path to audio file (WAV, MP3, M4A) |
--api-secret | Your bitHuman API secret |
Common Issues
| Problem | Solution |
|---|---|
| No audio playing | Install sounddevice: pip install sounddevice. Try WAV format. |
| Avatar not loading | Verify BITHUMAN_API_SECRET and BITHUMAN_MODEL_PATH. |
| Video choppy | Close other applications using GPU/CPU. |
| Controls not working | Click on the OpenCV window to focus it. |
Technical Details
| Component | Specification |
|---|---|
| Audio sample rate | 16kHz (auto-converted) |
| Audio channels | Mono (stereo auto-converted) |
| Video resolution | 512x512 pixels |
| Frame rate | 25 FPS |
| Audio formats | WAV, MP3, M4A, FLAC |
Next Steps
Live Microphone
Real-time interaction with your voice
AI Conversation
Full OpenAI voice chat with avatar
