New Tool Radar

Local AI

How to Set the Word Threshold for whisper.cpp Transcription Accuracy

Tune whisper.cpp --word-thold so short, uncertain words are handled the way you want.

Schematic illustration with three step boxes: Prepare a clip with short words; Run with the default; Raise the threshold and compare.

whisper.cpp can output word-level timestamps, and the –word-thold setting controls the probability below which a word is treated as uncertain. The default is around 0.01. Raising it makes the output stricter about short words, which can clean up a transcript full of half-heard filler. This guide tests two values on the same clip.

Before you start

  • whisper.cpp built, with whisper-cli on your PATH, and a model file such as ggml-base.en.bin.
  • An audio clip with short words and filler, for example a meeting with “um” and “yeah”.
  • A terminal.

Prepare the clip

Save the clip as clip.wav in 16 kHz mono WAV format, which whisper.cpp expects. Write down the short words you want to check, such as “yeah”, “okay” and “um”.

Run with the default threshold

Run the transcription with the default:

./build/bin/whisper-cli -m models/ggml-base.en.bin -f clip.wav --word-thold 0.01

Save the output. Count how many of your short words appear, and how many look like guesses.

Raise the threshold and compare

Run the same clip with a higher threshold:

./build/bin/whisper-cli -m models/ggml-base.en.bin -f clip.wav --word-thold 0.1

Compare the two transcripts word by word. The higher threshold should drop some of the uncertain short words, at the risk of dropping a real word that was spoken quietly.

Worked example

Worked example: a 2-minute clip with the word “yeah” spoken six times. With –word-thold 0.01, all six may appear, plus two invented “yeah” lines in pauses; with –word-thold 0.1, the invented ones should disappear while the real ones mostly stay. Count the real and invented words in each run.

Expected result

UNTESTED in this guide: no transcription was run while writing it. The expected result is that both runs produce a transcript, and the higher threshold removes some uncertain short words.

Limitations

The threshold only affects word-level output, so it does nothing if you are not asking for word timestamps. A very high threshold can drop real words that were spoken quietly or quickly.

Sources

See all