Example integrations with AvatarTalk.ai’s REST API for generating talking avatar videos from text. This repo includes Node.js and Python examples for regular (JSON), streaming (binary MP4), and LiveKit.
A live demo of the examples is available at https://demo.avatartalk.ai/.
Full documentation of AvatarTalk.ai API is available in API.md.
python/simple-webchat– Full web chat (FastAPI + Jinja2) with text chat, push‑to‑talk transcription, and optional streaming playback via a server proxy.python/livekit-webchat– LiveKit webchat where the assistant speaks into a LiveKit room via/ws/infer.python/livekit-agents- LiveKit Agents integration.python/expressive-webchat– Natural voice conversations with automatic turn-taking (Deepgram Flux) and LLM-controlled emotional expressions via/ws/continuous. Ultra-low latency streaming.python/youtube-rtmp-streamer– Generates short language‑learning segments (17+ languages supported) with OpenAI and streams them to a YouTube Live RTMP endpoint via AvatarTalk; can read live chat and adapt topics.python/knowledge-base– Knowledge-grounded chat that builds an OpenAI vector store from local files and usesfile_searchto ground answers before rendering an avatar video.
nodejs/expressive-webchat– Natural voice conversations with automatic turn-taking (Deepgram Nova 2) and LLM-controlled emotional expressions via/ws/continuous. Ultra-low latency streaming.
cd python/simple-webchat- Ensure Python 3.10+ and install
uv - Create
.envwithOPENAI_API_KEYandAVATARTALK_API_KEY uv run simple-webchat- Open
http://127.0.0.1:8000
- Env vars and behavior mirror the Node.js version for parity.
cd python/livekit-webchat- Ensure Python 3.10+ and install
uv - Create
.envwith at least:OPENAI_API_KEY,AVATARTALK_API_KEY,LIVEKIT_URL,LIVEKIT_API_KEY,LIVEKIT_API_SECRET uv run livekit-webchat- Open
http://127.0.0.1:8000
cd python/youtube-rtmp-streamer- Ensure Python 3.13 and install
uv - Create
.envwith at least:OPENAI_API_KEY,AVATARTALK_API_KEY,AVATARTALK_AVATAR,YOUTUBE_RTMP_URL,YOUTUBE_STREAM_KEY,YOUTUBE_API_KEY(optional:YOUTUBE_LIVE_ID) uv sync- Run with CLI arg:
uv run python main.py <VIDEO_ID>or setYOUTUBE_LIVE_IDand runuv run python main.py
cd python/knowledge-base- Ensure Python 3.10+ and install
uv - Create
.envwithOPENAI_API_KEYandAVATARTALK_API_KEY - Place files in
data/(or setKNOWLEDGE_BASE_DIRECTORY_PATH) uv run knowledge-base- Open
http://127.0.0.1:8000
cd python/expressive-webchat- Ensure Python 3.10+ and install
uv - Create
.envwithOPENAI_API_KEY,DEEPGRAM_API_KEY, andAVATARTALK_API_KEY ./run.shoruv run uvicorn src.app:app --reload --port 8080- Open
http://localhost:8080 - Click "Start Session", allow microphone, and speak naturally
cd nodejs/expressive-webchat- Ensure Node.js 18+
- Create
.envwithOPENAI_API_KEY,DEEPGRAM_API_KEY, andAVATARTALK_API_KEY npm install && npm start- Open
http://localhost:8080 - Click "Start Session", allow microphone, and speak naturally