KrakenSubtitle: word-by-word karaoke captions from one command
A command line tool that burns word-by-word highlighted subtitles into any video, with a free local mode and support for English, Hindi, Urdu and Hebrew.
The problem
Creators who want the fast, word-by-word caption style had to time subtitles by hand or pay an editor. I wanted one command that takes a video and returns it captioned, with no SRT editing and no frame timing.
How I built it
The tool transcribes with Deepgram Nova-3 in the cloud or Whisper large-v3 locally, takes the millisecond word timings and groups them into three-word phrases with the active word highlighted. It writes an ASS subtitle file, sets the subtitle canvas to the video's own size and burns it in with FFmpeg. The local Whisper path needs no API key.
What got hard
- Speech-to-text sometimes gives several words the same timestamp, which makes captions flash and stack.
A post-pass spreads stacked words across the gap that is actually free, enforces a minimum readable duration and stops phrases from overlapping. Gaps up to 1.2 seconds are bridged so a caption does not blink out between phrases.
- Right-to-left languages need different handling from Latin text.
Hebrew and Urdu are detected automatically, switch to a font that renders them properly and skip the upper-casing used for Latin captions.
- FFmpeg's subtitle filter fails on Windows paths that contain colons, apostrophes or spaces.
The subtitle file is copied to a safe temporary path and escaped for libass before burning, which fixed files with special characters in their names.
The result
A 37 second 720p demo clip shows three-word phrases at the bottom with the active word in cyan, and the original clip without them. The tool is MIT licensed.
The ← and → keys turn the page too.