To entertain my kids, I built a fully-automated roast loop with a computer and camera: pose detection to catch someone entering the frame, a vision LLM to analyze them, and TTS to deliver the line out loud.
Heckler watches a camera feed and delivers spoken commentary on anyone who steps into frame. It triggers once a person is close enough to fill a set portion of the view. After a 3-2-1 countdown with beeps, it captures a photo, has an AI describe and roast the person, then reads the line out loud. The AI service is configurable.
Features
- Notices when someone steps into frame and gets close enough, then starts the show on its own
- Counts down 3-2-1 with beeps before the photo, so the target gets a moment to pose (or flee)
- Roasts out loud in a natural voice, with several voices to choose from
- Three personalities included: playful comedian, brutal roast-demon, Gen Z group chat
- One key skips the current line and rearms the countdown for the next victim
- Live preview window shows what the camera sees
Under the hood
6Files
1,183Lines of code
2Commits
Jan 2026Dev window
StackPython 3.x · OpenCV · MediaPipe · Gemini API · OpenAI API · Anthropic API · ElevenLabs API · pygame
InfraLocal Mac; camera input via OpenCV; audio playback via pygame; no server
Notable
- —Person detection uses MediaPipe pose landmarks, with the landmark bounding-box area as the trigger signal; the threshold reads as "fraction of frame filled" (default 15 percent), so tuning it maps directly to physical distance
- —Vision and voice are pluggable providers behind one interface (Gemini 2.0 Flash, GPT-4o, Claude Sonnet, Grok 2 Vision; OpenAI TTS and ElevenLabs), swappable per run from CLI flags with no code edits
- —Skip is handled with session tokens: a keypress starts a newer session, and the in-flight pipeline checks its token before TTS generation and again before playback, so stale roasts are abandoned mid-flight instead of playing late
- —pygame handles both countdown beeps and TTS playback, keeping audio on one dependency that was already present
- —API keys load from .env only; nothing is hardcoded, so the repo is safe to share as-is
