Real-time Avatar Teacher
A proof of concept of a live AI teacher: a talking avatar that runs a lesson by voice, with its behaviour set by prompts.
- Type
- Prototype / MVP
- Year
- 2026
- Status
- Completed
- Source
- Public on GitHub
How data moves through it
- Student’s voice
- LiveKit (WebRTC)
- OpenAI Realtime
- Teacher prompt
- LiveAvatar
- Video reply
The problem
Text chatbots feel distant for learning. The goal was to test whether a speaking avatar that reacts in real time makes practice feel closer to a lesson with a person.
What I built
- A Fastify API with PostgreSQL, a separate agent service and a React and Vite demo page.
- LiveAvatar session control over LiveKit with start and cleanup endpoints.
- An OpenAI Realtime connection with tuned voice activity detection.
- Teacher behaviour and lesson content kept in prompts and content files, apart from the code.
- Docker Compose for the app and the database.
Architecture
The web page talks to the API, the API starts an avatar session in LiveKit, and the agent service joins it with an OpenAI Realtime connection. Voice goes in, the model answers as the teacher, and the avatar speaks the reply.
Result
Proof of concept. The avatar, the Realtime back end, the teacher prompt and voice detection work; front-end integration was the remaining step. The source is public.