Skip to content

About

Examples of integration with AvatarTalk.ai in Python and nodeJS

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AvatarTalk Examples

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 Examples

  • 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 uses file_search to ground answers before rendering an avatar video.

Node.js Examples

  • 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.

Quick start (simple-webchat)

  • cd python/simple-webchat
  • Ensure Python 3.10+ and install uv
  • Create .env with OPENAI_API_KEY and AVATARTALK_API_KEY
  • uv run simple-webchat
  • Open http://127.0.0.1:8000

Notes

  • Env vars and behavior mirror the Node.js version for parity.

Quick start (livekit-webchat)

  • cd python/livekit-webchat
  • Ensure Python 3.10+ and install uv
  • Create .env with 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

Quick start (youtube-rtmp-streamer)

  • cd python/youtube-rtmp-streamer
  • Ensure Python 3.13 and install uv
  • Create .env with 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 set YOUTUBE_LIVE_ID and run uv run python main.py

Quick start (knowledge-base)

  • cd python/knowledge-base
  • Ensure Python 3.10+ and install uv
  • Create .env with OPENAI_API_KEY and AVATARTALK_API_KEY
  • Place files in data/ (or set KNOWLEDGE_BASE_DIRECTORY_PATH)
  • uv run knowledge-base
  • Open http://127.0.0.1:8000

Quick start (expressive-webchat – Python)

  • cd python/expressive-webchat
  • Ensure Python 3.10+ and install uv
  • Create .env with OPENAI_API_KEY, DEEPGRAM_API_KEY, and AVATARTALK_API_KEY
  • ./run.sh or uv run uvicorn src.app:app --reload --port 8080
  • Open http://localhost:8080
  • Click "Start Session", allow microphone, and speak naturally

Quick start (expressive-webchat – Node.js)

  • cd nodejs/expressive-webchat
  • Ensure Node.js 18+
  • Create .env with OPENAI_API_KEY, DEEPGRAM_API_KEY, and AVATARTALK_API_KEY
  • npm install && npm start
  • Open http://localhost:8080
  • Click "Start Session", allow microphone, and speak naturally

About

Examples of integration with AvatarTalk.ai in Python and nodeJS

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages