Back to getSRT
getSRT Blog/ Accessibility and Subtitles: Why Captions Are More Than a Nice-to-Have

Accessibility and Subtitles: Why Captions Are More Than a Nice-to-Have

How accurate, well-timed captions generated by whisper.cpp make video content accessible and legally compliant.

2 min read
  • accessibility
  • subtitles
  • fundamentals

Who captions actually serve

Captions aren't a niche accommodation — most video views on social platforms happen with sound off, and search engines can't index spoken words at all without a text transcript alongside the video.

The legal/standards angle

Accessibility guidelines (WCAG 2.1, Section 508 in the US) require synchronized captions for video content in many public-facing and enterprise contexts. Automatic captions from whisper.cpp are a strong starting point, but "auto-generated, unreviewed" captions generally do not satisfy strict compliance requirements — accuracy expectations for legal compliance are higher than for casual viewing.

Generating a first-pass caption file

./whisper-cli -m models/ggml-base.en.bin -f video-audio.wav -osrt --output-file captions

This produces captions.srt — a standard subtitle format with timestamps, ready to attach to a video file or upload to YouTube/Vimeo.

What "good enough" captions require beyond raw output

  • Correct punctuation and capitalization (raw ASR output is often missing or inconsistent)
  • Reasonable line length (WCAG recommends max ~32-42 characters per line for readability)
  • Accurate speaker changes noted, if multiple speakers are present
  • A human review pass before publishing anything used for compliance purposes

Error handling

if [ ! -f video-audio.wav ]; then
  echo "Error: extracted audio not found — did the ffmpeg extraction step run?" >&2
  exit 1
fi
 
./whisper-cli -m models/ggml-base.en.bin -f video-audio.wav -osrt --output-file captions \
  || { echo "Error: caption generation failed" >&2; exit 1; }

Up next

The next article covers a practical workflow: extracting audio from video, generating SRT/VTT captions, and formatting them to meet accessibility line-length and timing guidelines.