AI pipeline that turns lectures and books into educational videos: Manim animations for STEM, illustrated documentaries for the humanities.
Python
4
38 commits
updated Oct 18, 2026
An AI pipeline that turns lectures and books into narrated educational videos, driven end to end from Claude Code.
| Mode | For | Visuals |
|---|---|---|
--math / --technical | calculus, linear algebra, physics, finance, CS | Manim animation per frame; every calculation checked with SymPy |
--folio | history, philosophy, literature | ~20-min documentary episodes as an illustrated book of engravings |
Narration comes from ElevenLabs, Cartesia, HeyGen or Drama 3 (open weights, on your own Modal GPU). Animations and subtitles sync to it word by word.
Source → Transcribe → Clean → Segment → per video: Script → Review → TTS → Visuals → Compile → Subtitles
scripts/pipeline.py, resumable from disk.You need a Claude subscription (Pro or Max) and one TTS provider.
Install Claude Code: curl -fsSL https://claude.ai/install.sh | bash, then claude and sign in.
Install the project: run claude and paste
Set up https://github.com/Augustinus12835/ludium_video for me: clone it and install its dependencies.
Add your keys: in ludium_video, cp .env.example .env, set TTS_PROVIDER and that
provider's key and voice (any voice works, including a clone of your own):
TTS_PROVIDER | Key | Voice |
|---|---|---|
elevenlabs | ELEVENLABS_API_KEY (Text to Speech enabled) | ELEVENLABS_VOICE_ID |
cartesia | CARTESIA_API_KEY | CARTESIA_VOICE_ID |
heygen | HEYGEN_API_KEY | HEYGEN_VOICE_ID |
drama3 | a Modal account (see below) | 1–3 clips in inputs/voice/drama3_refs/ |
Make a video: inside the folder, run claude and type
/run-pipeline https://www.youtube.com/watch?v=... --math # pure math
/run-pipeline inputs/my_recording.mp4 --technical # science, finance, CS, engineering
/run-pipeline https://www.youtube.com/watch?v=... --folio # humanities
Sources: a YouTube URL, a video or audio file, a PDF or Markdown book chapter, or a PPTX deck
(.claude/skills/run-pipeline/references/sources.md). Output:
pipeline/<source>/Video-N/final_video.mp4 with subtitles beside it.
Transcription (only for audio/video files or YouTube videos without captions): add
ELEVENLABS_API_KEY with Speech to Text enabled for Scribe (~US$0.22/hour, pay as you go);
without it, local files fall back to Whisper (pip install openai-whisper).
Fish Audio Drama 3 clones a voice zero-shot from a few
clips. scripts/drama3_modal.py runs it on a Modal H100 and force-aligns the words on the same GPU,
so you get word timestamps as from a hosted provider. Modal's free US$30/month credit covers
~500 ten-minute videos when batched (/run-pipeline voices a whole lecture per session):
| Cost (Oct 2026) | |
|---|---|
| Session start-up (~3–4 min) | ~US$0.25 per batch |
| Narration | ~US$0.02 per 10 min |
| 10-min video, alone / in a batch of ~8 | ~US$0.27 / ~US$0.05 |
| Hosted provider, for comparison | ~US$0.35 |
Setup, once:
pip install modal && modal setuppython scripts/drama3_modal.py download (weights, ~40 GB, to a Modal Volume)inputs/voice/drama3_refs/: ref_1.wav + ref_1.txt (exact transcript),
≤ 60 s of clean speech each. Say any rare names in a clip, or they may vary.TTS_PROVIDER=drama3 in .env. Optional: DRAMA3_TAGS=1 lets a subagent add inline stress
(<emphasis>, <slow>, [pause]) without changing the words.Licence: Fish Audio Community License. Free for commercial use under US$500k annual revenue, with a "Built with Fish Audio" credit. Clone only voices you have consent to use. Check current prices at modal.com/pricing.
A lip-synced presenter from one photo (you, a consenting colleague, or a drawn character): large beside the visuals in the opening hook, then in a bottom-right window. A subagent directs it, giving sentences an expression with a teaching job, and frames keep its zones clear. Example: Single Variable Calculus 1.1 in Japanese, presented by the anime tutor ルミ.
Runs on Modal: the hook on LongCat-Video-Avatar 1.5
(MIT), the corner window on SoulX-FlashTalk-14B
(Apache-2.0) — about US$5 per 10-minute video. Off unless you pass --presenter.
pip install modal 'rembg[cpu]' && modal setup, then
python scripts/longcat_avatar_modal.py download (~57 GB) and
python scripts/flashtalk_modal.py download (~54 GB).python scripts/presenter.py setup my_photo.jpg writes inputs/presenter/default/. Use a sharp,
well-lit, front-facing photo, waist up. Describe the person in one sentence
in presenter.json → "look".| Cost per 10-min video (Oct 2026) | |
|---|---|
| Hook + window | ~US$16 (the free credit covers about two) |
Hook only (--presenter-hook-only) | ~US$2.40 |
Clips regenerate only when their narration or direction changes.
| Need | For |
|---|---|
OPENAI_API_KEY | plates, portraits, objects (gpt-image-2.5-sunburst, no fallback) |
GOOGLE_CLOUD_API_KEY | grounded maps (Gemini); optional motion plates (Gemini Omni Flash) |
Node.js 18+, cd remotion && npm ci | rendering with Remotion |
Images cost ~US$10–12 per 20-minute episode. Motion plates (scripts/folio_motion.py) are off by
default (~US$1.10 per 10 s). To split a book into episodes, write a manifest like
docs/examples/plato_republic_episodes.json.
CLAUDE.md: modes, everyday fixes (a frame, a sentence, subtitles), script reference..claude/skills/run-pipeline/: the playbooks the supervisor skill follows.MIT, see LICENSE. Bundled fonts: SIL Open Font License / Apache 2.0
(remotion/public/fonts/licenses/).
AI pipeline that turns lectures and books into educational videos: Manim animations for STEM, illustrated documentaries for the humanities.
Python
4
38 commits
updated Oct 18, 2026
An AI pipeline that turns lectures and books into narrated educational videos, driven end to end from Claude Code.
| Mode | For | Visuals |
|---|---|---|
--math / --technical | calculus, linear algebra, physics, finance, CS | Manim animation per frame; every calculation checked with SymPy |
--folio | history, philosophy, literature | ~20-min documentary episodes as an illustrated book of engravings |
Narration comes from ElevenLabs, Cartesia, HeyGen or Drama 3 (open weights, on your own Modal GPU). Animations and subtitles sync to it word by word.
Source → Transcribe → Clean → Segment → per video: Script → Review → TTS → Visuals → Compile → Subtitles
scripts/pipeline.py, resumable from disk.You need a Claude subscription (Pro or Max) and one TTS provider.
Install Claude Code: curl -fsSL https://claude.ai/install.sh | bash, then claude and sign in.
Install the project: run claude and paste
Set up https://github.com/Augustinus12835/ludium_video for me: clone it and install its dependencies.
Add your keys: in ludium_video, cp .env.example .env, set TTS_PROVIDER and that
provider's key and voice (any voice works, including a clone of your own):
TTS_PROVIDER | Key | Voice |
|---|---|---|
elevenlabs | ELEVENLABS_API_KEY (Text to Speech enabled) | ELEVENLABS_VOICE_ID |
cartesia | CARTESIA_API_KEY | CARTESIA_VOICE_ID |
heygen | HEYGEN_API_KEY | HEYGEN_VOICE_ID |
drama3 | a Modal account (see below) | 1–3 clips in inputs/voice/drama3_refs/ |
Make a video: inside the folder, run claude and type
/run-pipeline https://www.youtube.com/watch?v=... --math # pure math
/run-pipeline inputs/my_recording.mp4 --technical # science, finance, CS, engineering
/run-pipeline https://www.youtube.com/watch?v=... --folio # humanities
Sources: a YouTube URL, a video or audio file, a PDF or Markdown book chapter, or a PPTX deck
(.claude/skills/run-pipeline/references/sources.md). Output:
pipeline/<source>/Video-N/final_video.mp4 with subtitles beside it.
Transcription (only for audio/video files or YouTube videos without captions): add
ELEVENLABS_API_KEY with Speech to Text enabled for Scribe (~US$0.22/hour, pay as you go);
without it, local files fall back to Whisper (pip install openai-whisper).
Fish Audio Drama 3 clones a voice zero-shot from a few
clips. scripts/drama3_modal.py runs it on a Modal H100 and force-aligns the words on the same GPU,
so you get word timestamps as from a hosted provider. Modal's free US$30/month credit covers
~500 ten-minute videos when batched (/run-pipeline voices a whole lecture per session):
| Cost (Oct 2026) | |
|---|---|
| Session start-up (~3–4 min) | ~US$0.25 per batch |
| Narration | ~US$0.02 per 10 min |
| 10-min video, alone / in a batch of ~8 | ~US$0.27 / ~US$0.05 |
| Hosted provider, for comparison | ~US$0.35 |
Setup, once:
pip install modal && modal setuppython scripts/drama3_modal.py download (weights, ~40 GB, to a Modal Volume)inputs/voice/drama3_refs/: ref_1.wav + ref_1.txt (exact transcript),
≤ 60 s of clean speech each. Say any rare names in a clip, or they may vary.TTS_PROVIDER=drama3 in .env. Optional: DRAMA3_TAGS=1 lets a subagent add inline stress
(<emphasis>, <slow>, [pause]) without changing the words.Licence: Fish Audio Community License. Free for commercial use under US$500k annual revenue, with a "Built with Fish Audio" credit. Clone only voices you have consent to use. Check current prices at modal.com/pricing.
A lip-synced presenter from one photo (you, a consenting colleague, or a drawn character): large beside the visuals in the opening hook, then in a bottom-right window. A subagent directs it, giving sentences an expression with a teaching job, and frames keep its zones clear. Example: Single Variable Calculus 1.1 in Japanese, presented by the anime tutor ルミ.
Runs on Modal: the hook on LongCat-Video-Avatar 1.5
(MIT), the corner window on SoulX-FlashTalk-14B
(Apache-2.0) — about US$5 per 10-minute video. Off unless you pass --presenter.
pip install modal 'rembg[cpu]' && modal setup, then
python scripts/longcat_avatar_modal.py download (~57 GB) and
python scripts/flashtalk_modal.py download (~54 GB).python scripts/presenter.py setup my_photo.jpg writes inputs/presenter/default/. Use a sharp,
well-lit, front-facing photo, waist up. Describe the person in one sentence
in presenter.json → "look".| Cost per 10-min video (Oct 2026) | |
|---|---|
| Hook + window | ~US$16 (the free credit covers about two) |
Hook only (--presenter-hook-only) | ~US$2.40 |
Clips regenerate only when their narration or direction changes.
| Need | For |
|---|---|
OPENAI_API_KEY | plates, portraits, objects (gpt-image-2.5-sunburst, no fallback) |
GOOGLE_CLOUD_API_KEY | grounded maps (Gemini); optional motion plates (Gemini Omni Flash) |
Node.js 18+, cd remotion && npm ci | rendering with Remotion |
Images cost ~US$10–12 per 20-minute episode. Motion plates (scripts/folio_motion.py) are off by
default (~US$1.10 per 10 s). To split a book into episodes, write a manifest like
docs/examples/plato_republic_episodes.json.
CLAUDE.md: modes, everyday fixes (a frame, a sentence, subtitles), script reference..claude/skills/run-pipeline/: the playbooks the supervisor skill follows.MIT, see LICENSE. Bundled fonts: SIL Open Font License / Apache 2.0
(remotion/public/fonts/licenses/).