Clip Learner is a SvelteKit app for learning English from real video clips. The current version is built around YouTube clips and transcript-driven study: you paste a clip URL, the app downloads the audio, transcribes it with Whisper, breaks the transcript into study chunks, asks an LLM to explain jokes/slang/cultural references, and lets you save vocabulary to a notebook.
The product started from learning English through British comedy, especially Taskmaster, but the codebase is already aimed at a more general "learn from clips" workflow.
- Paste a YouTube URL and create a study item
- Download YouTube audio with
yt-dlp - Transcribe audio with a Whisper API or local
whisperCLI - Parse SRT output into transcript segments
- Analyze transcript lines for humor, slang, idioms, and cultural references
- Show scene breakdowns and vocabulary suggestions
- Hover or select words in the transcript to get instant definitions
- Save vocabulary into a notebook
- Download clips for offline playback
- Generate a simple quiz from annotations and saved vocabulary
- SvelteKit + Svelte 5
- TypeScript
- SQLite via Node's built-in
node:sqlite - OpenAI-compatible chat API client for transcript analysis and word explanation
yt-dlpfor YouTube metadata, audio download, and offline video downloadffmpeg/ffprobefor audio conversion and duration detection
src/routes/
+page.svelte Home page and clip list
episode/[id]/+page.svelte Study view
episode/[id]/quiz/+page.svelte
notebook/+page.svelte Saved vocabulary
api/process/+server.ts Clip ingest + transcription/analysis
api/explain/+server.ts Segment explanation + word lookup
api/download/+server.ts Offline video download
api/notebook/+server.ts Vocabulary notebook API
src/lib/server/
db.ts SQLite schema
whisper.ts Audio download + Whisper transcription
ytdlp.ts YouTube metadata helpers
subtitles.ts SRT parsing and segment merging
analysis.ts Transcript processing pipeline
claude.ts LLM prompts and response parsing
- Node.js 22.5+ (required for
node:sqlite) - npm
yt-dlpavailable onPATHffmpegandffprobeavailable onPATH- Whisper transcription, either:
WHISPER_API_KEYconfigured for an OpenAI-compatible Whisper endpoint, or- local
whisperCLI available onPATH
- LLM analysis, either configured per user in Settings or via
.envfallback
Example .env:
# LLM analysis fallback
ANTHROPIC_API_KEY=your-api-key
ANTHROPIC_BASE_URL=
# Whisper transcription fallback
WHISPER_API_KEY=
WHISPER_BASE_URL=https://api.openai.com/v1
WHISPER_MODEL=whisper-1
WHISPER_LOCAL_MODEL=tiny.enInstall dependencies:
npm installStart the app:
npm run devQuality checks:
npm run check
npm run build- SQLite database:
data/app.db - Downloaded media:
media/<episode_id>/
The database schema is created automatically on startup.
- The app is tightly coupled to YouTube URLs today
- Transcript quality depends on Whisper and source audio quality
- Vocabulary suggestions from analysis are shown to the user, but users save notebook words manually
- The app now uses local user accounts and per-user settings, but there is no third-party auth or email recovery flow yet
- The UI and naming still mix "Taskmaster" history with the broader "Clip Learner" direction
This repo is already close to becoming a reusable language-learning platform for:
- comedy clips
- interviews
- talk shows
- anime or drama clips with subtitles
- English news/articles with word lookup, phrase detection, and vocabulary saving
- any video workflow where the learner wants instant explanation without leaving the player