Talk into a mic, get a Manim video synced to your words. Learns as you use it.
139
Talk into a microphone. Get back an animated video whose visuals land exactly when you say them.
One button. No slides. And it gets better every time you use it.
Real output. The caption shows what was said; every bar grows on its number.
You record a short talk in the browser (or upload audio). A few minutes later you have a Manim video, the animation engine behind 3Blue1Brown, made for your words:
docker run -d --name sleepy -p 5050:5050 \
-e SLEEPY_AUTH=api_key -e ANTHROPIC_API_KEY=sk-ant-... \
-v sleepy-data:/app/data \
-v sleepy-library:/app/knowledge_library \
-v sleepy-models:/home/app/.cache/huggingface \
sleepyboy/sleepy-presentations
Open http://localhost:5050, press the button, and talk. Try a script from
test_monologues/ for your first run. The first recording downloads the
speech model (~150 MB, kept in the sleepy-models volume).
Or, from a clone of this repo:
cp .env.example .env # pick how to connect to Claude (below)
docker compose up -d # builds the image, keeps data, library and models in volumes
The volumes matter: /app/knowledge_library is the part that learns. Keep it in a volume
and it carries over between upgrades; without one, it resets with the container.
Recording needs microphone access, which browsers only grant on
localhostor HTTPS. On a remote server, put it behind HTTPS, or use upload audio instead.
The AI stages use the Claude Agent SDK. There are three ways to connect it:
| Use | Set | Notes |
|---|---|---|
| API key | SLEEPY_AUTH=api_key · ANTHROPIC_API_KEY=sk-ant-… | Pay per use (console.anthropic.com). The right choice for anything other people use. |
| Your Claude subscription, in Docker | CLAUDE_CODE_OAUTH_TOKEN=… | Run claude setup-token on your own machine and paste the token. Personal use. |
| Your Claude subscription, running locally | nothing (default SLEEPY_AUTH=login) | Uses whatever account claude login signed into, e.g. your company's Claude login at work. |
The home page shows which account is connected, or exactly what's missing. In login mode, a
stray ANTHROPIC_API_KEY in your shell is ignored rather than silently winning.
brew install ffmpeg pango pkg-config cairo librsvg # Manim's native deps (+ SVG logos in footers)
brew install --cask font-inter # the default video font
python3 -m venv .venv && source .venv/bin/activate # Python 3.10+
pip install -r requirements.txt
cp .env.example .env
claude login # if you use your Claude login
python app.py # → http://localhost:5050
Using it: record, or upload audio (anything ffmpeg reads: m4a, mp3, wav, even a .mov), or drag a file onto the page. A silent visual metronome helps you pace yourself. Finished videos play in sync with your audio in the page; stitch makes a single downloadable .mp4.
| Stage | What happens |
|---|---|
| Transcribe | faster-whisper runs locally and gives every word a start and end time. |
| Direct | A Claude agent reads the transcript and the knowledge library, writes a beat plan and a Manim scene, renders preview frames, looks at them, and fixes what's wrong. |
| Render | Manim renders the scene, timed to your words. Failures go back to the director for repair. |
| Learn | A second agent compares the scene to the library: new techniques become components, variants generalize existing ones. The pipeline renders every change itself and quarantines or reverts anything broken. |
The audio is the clock. Scenes never hard-code seconds; they anchor to words:
class Presentation(SyncedScene):
def construct(self):
chart = bar_chart(["By hand", "Template", "Sleepy"], [240, 120, 5],
value_texts=["4 hrs", "2 hrs", "5 min"])
show_chart_frame(self, chart, self.t("how long"))
reveal_bar(self, chart, 0, self.t("four hours")) # grows as you say it
reveal_bar(self, chart, 1, self.t("two hours"))
reveal_bar(self, chart, 2, self.t("five minutes"), emphasize=True)
self.finish() # hold until the audio ends
The knowledge library (knowledge_library/) is plain files: one folder per technique,
with a description the director reads, the code, and a standalone Example that must render.
It starts with a handful of seeds (titles, bullet reveals, bar charts, counters, flows, wipes)
and grows from there. Maintenance tools:
python -m tools.library stats # coverage, usage, never-used items
python -m tools.library test # render every component (catches rot after upgrades)
python -m tools.library dupes # near-duplicate detection
python -m tools.library review # Claude writes a merge / generalize / gaps report
A brand is one folder: brand.json plus a logo and fonts. It sets the app's name, logo,
favicon, fonts and colour theme, light or dark, and the rendered videos: their colours,
font, and an optional footer with a logo, title and date, like a company slide deck.
SLEEPY_BRAND=acme # brands/acme/, or a path. In Docker, mount it: -v ./acme:/app/brands/acme:ro
Start from brands/_example/. Full reference: docs/branding.md.
Environment variables, or a .env file (.env.example).
| Variable | Default | |
|---|---|---|
SLEEPY_AUTH | login | login or api_key, see Connecting to Claude |
ANTHROPIC_API_KEY | used when SLEEPY_AUTH=api_key | |
CLAUDE_CODE_OAUTH_TOKEN | subscription token from claude setup-token (Docker) | |
SLEEPY_BRAND | default | brand folder name or path |
SLEEPY_WHISPER_MODEL | base.en | small.en is more accurate, slower |
SLEEPY_RENDER_QUALITY | m | l 480p15 · m 720p30 · h 1080p60 · k 4K |
SLEEPY_CLAUDE_MODEL | account default | a specific Claude model id |
SLEEPY_DIRECT_MAX_TURNS / SLEEPY_LEARN_MAX_TURNS | 60 / 40 | agent budgets |
HOST / PORT | 127.0.0.1 / 5050 | 0.0.0.0 in Docker |
How every mechanism works, written for humans: docs/: the pipeline, sync, the knowledge library, agents & auth, branding, operations, and running without AI.
SLEEPY_AUTH=api_key). A Claude subscription is for your own use.docker pull sleepyboy/sleepy-presentations:latest