New Tool Radar

Local AI

How to Export a whisper.cpp Transcript as VTT Captions

Run whisper.cpp with the VTT output flag and confirm a timestamped captions file is written.

Schematic with three steps: Convert the audio if needed; Run with the VTT output flag; Confirm the captions line up.

A plain transcript has no timing, so it cannot drive captions. The -ovtt flag writes the same transcript as a WebVTT file with timestamps, which video players and editors can use directly as captions.

What you need

  • whisper.cpp built, with whisper-cli available
  • A Whisper model, for example ggml-base.en.bin
  • An audio file converted to 16 kHz mono 16-bit WAV

Step 1: Convert the audio if needed

Convert the recording to 16-bit WAV with ffmpeg, for example ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav, if it is not already in that format.

Step 2: Run with the VTT output flag

Run whisper-cli -m models/ggml-base.en.bin -f output.wav -ovtt. The -ovtt flag writes a .vtt captions file next to the audio.

Step 3: Confirm the captions line up

Open the .vtt file and check the timestamps against the audio: each caption should appear while the words are spoken. If a caption is far off, re-check with a larger model.

Worked example: synthetic VTT export

The table below is a synthetic example. It shows the expected result of exporting VTT captions; no audio was transcribed.

Check Expected Result
Command runs Completes Pass
VTT file written output.wav.vtt Pass
Timestamps Match the spoken words Pass
Captions load Player shows them Pass

Expected result (UNTESTED). the command completes, a VTT file is written, the timestamps match the spoken words, and a player shows the captions. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • VTT captions carry the same recognition errors as the transcript, so spot-check them before publishing.
  • A plain text transcript from -otxt has no timestamps; use -ovtt or -osrt when timing matters.
  • Long words can split across caption lines; use the -ml flag to cap segment length if needed.

Sources

See all