Skip to content

feat(captions): whisper transcription and SRT/VTT import#58

Merged
LeadcodeDev merged 1 commit into
mainfrom
feat/whisper-captions
Jul 18, 2026
Merged

feat(captions): whisper transcription and SRT/VTT import#58
LeadcodeDev merged 1 commit into
mainfrom
feat/whisper-captions

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

Closes #45.

Goal: word-level captions from speech — the caption component existed but words were 100% manual.

  • rustmotion captions: transcription through a detected whisper.cpp binary (whisper-cliwhisper-cppmain, help-probed; subprocess-first like ffmpeg — zero build deps), with actionable errors for missing binary (brew hint + --from-srt suggestion) and missing model (full huggingface curl command). Word splitting via -ml 1 -sow -oj; punctuation-only segments merged into the previous word. Flags coded against the documented JSON format (no binary on this machine — noted in the module doc).
  • Offline importers: hand-rolled SRT/VTT parsers (BOM, CRLF, multiline cues, <i>/<b> stripping, ,/./short timestamps, VTT NOTE/STYLE/REGION blocks). Word timing spread uniformly per cue — documented approximation.
  • Output {"words": [...]} plugs straight into the feat(cli): props injection and batch rendering over the variables system #56 props system (--props words.json + "words": "$words") — verified end-to-end SRT → validate → still.
  • TikTok presets: word_pop (active word only, ease-out-back pop, rounded pill) and karaoke_pop (line layout, active word 1.15× + pill), pill_color with 70%-black default; the 3 existing modes untouched.
  • captions-workflow skill rule documents the pipeline.

Tests: 20 new — 15 CLI (parsers, timing spread, JSON shape, hints, whisper-JSON parse) + 5 pixel tests on the presets through the real pipeline. 292 total, all green.

Verify: cargo test --workspace → 292 passed ✓ · cargo fmt --check ✓ · clippy 0 warnings (--all-targets) ✓ · manual SRT→JSON smoke ✓

- new captions command: transcription via a detected whisper.cpp
  binary (whisper-cli/whisper-cpp/main, subprocess like the ffmpeg
  philosophy; actionable install/model hints), or fully-offline
  --from-srt/--from-vtt with hand-rolled parsers (BOM, CRLF,
  multiline, styling tags, both timestamp forms); word timing spread
  uniformly across each cue (documented approximation)
- output {words: [{text, start, end}]} plugs straight into --props
  with "words": "$words" (verified end-to-end srt -> render)
- CaptionStyle gains word_pop (active word only, ease-out-back pop,
  rounded pill background) and karaoke_pop (line layout, active word
  1.15x + pill); pill_color on Caption, default 70% black; existing
  modes untouched
- captions-workflow skill rule documents the two-step pipeline
@LeadcodeDev
LeadcodeDev merged commit 039ec0c into main Jul 18, 2026
@LeadcodeDev
LeadcodeDev deleted the feat/whisper-captions branch July 18, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(captions): whisper transcription and SRT/VTT import

1 participant