Requires Python 3.10 or higher.
Features
- Real-time audio/video streaming — receive synchronized audio (PCM) and video (RGB) frames as PyAV objects via WebRTC
- Two-way communication — send text messages as the user and receive generated responses
- Real-time transcriptions — receive incremental message stream events for user and persona text as it generates
- Message history — automatic conversation history with incremental updates
- Audio passthrough — send TTS-generated audio directly for face rendering (BYO TTS)
- Direct text-to-speech — send text straight to TTS via
session.talk(), bypassing the LLM - User audio input — send raw microphone audio to Anam for processing (STT, LLM, TTS, avatar)
- Async iterator API —
async for frame in session.video_frames() - Event-driven API — decorator-based handlers via
@client.on(AnamEvent.CONNECTION_ESTABLISHED) - Fully typed — complete type hints for IDE support
- Server-side ready — designed for server-side Python applications and backend pipelines

