maxpetrusenko

AI Math Tutor — AI skill for Claude Code

AI community

Open source realtime voice tutor stack with pluggable STT, LLM, TTS, and avatars.

How to install AI Math Tutor

This entry records only its repository, not the path inside it, so there is no exact command to give. Open maxpetrusenko/ai-math-tutor and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What AI Math Tutor does

Open source realtime voice tutor stack with pluggable STT, LLM, TTS, and avatars.

Alternatives in AI

  • WeKnora — Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, an 26.9k ★
  • Qwen Audio Agent — A realtime voice runtime that keeps Agents talking, working, and present 2.3k ★
  • Llmwiki — Open Source Implementation of Karpathy's LLM Wiki 1.5k ★

README

AI Math Tutor

Open source realtime voice tutoring with a visible avatar, interruption-safe playback, and swappable STT, LLM, TTS, and avatar providers.

Live app:

![AI Math Tutor live lesson UI](docs/assets/readme-card.png)

Internal package and some deploy labels still use the original codename, `nerdy`.

Why This Repo Exists

Most AI tutor demos stop at chat. This repo proves the harder loop:

student speech or text
  -> FastAPI WebSocket session
  -> streaming STT
  -> tutor LLM policy
  -> streamed TTS
  -> browser playback
  -> self-hosted TalkingHead tutor

The session contract stays stable while providers change underneath it. That makes the repo useful as a realtime tutoring spine, not just a one-provider demo.

Current Proof

Surface Evidence
Live URL https://aitutor.maxpetrusenko.com
Realtime path browser mic or text into FastAPI WebSocket session
Speech input audio.chunk.bytes_b64 browser chunks, Deepgram provider path
Tutor brain runtime provider switch for Gemini, MiniMax, OpenAI, Anthropic
Speech output Cartesia and MiniMax TTS behind one streamed context contract
Avatar self-hosted TalkingHead 3D tutor with timed phoneme visemes and audio-energy fallback
Interruption Escape cancels active playback and returns the tutor to the next turn
Lesson memory active and archived thread state, history drawer, new lesson flow
Evals math, science, and English fixtures score 4+ / 5 across tutoring dimensions
Benchmarks runtime hard latency gate passes on the shipped fast path

Runtime benchmark snapshot from [`docs/planning/benchmark-report-v1.md`](docs/planning/benchmark-report-v1.md):

Stage p50 p95 Gate
speech_end -> stt_final 114.1 ms 185.18 ms pass under 350 ms p95
speech_end -> tts_first_audio 404.6 ms 558.72 ms pass under 500 ms p50 and 900 ms