faster-whisper decodes audio with beam search: it keeps several candidate transcripts and picks the best. The beam_size setting, 5 by default, controls how many candidates it keeps. A larger beam can catch the right words in noisy audio but takes longer. This guide tests two beam sizes on the same clip and compares the transcripts.
Before you start
- Python with faster-whisper installed.
- A short audio clip of clear speech, about one minute, with a known transcript you can check.
- A terminal and a text editor.
Prepare the clip and the reference
Save the clip as clip.wav and write down what was actually said, including any unusual words or names. That reference is what you will compare both transcripts against.
Transcribe with the default beam
Run a small script with the default beam_size of 5:
from faster_whisper import WhisperModel
model = WhisperModel("base", device="cpu", compute_type="int8")
segments, info = model.transcribe("clip.wav", beam_size=5)
for s in segments:
print(s.text)
Save the output as the default transcript.
Try a larger beam and compare
Run the same script with beam_size=10 and save that output. Compare both transcripts with your reference word by word. The larger beam should fix some words on noisy or fast speech, and it will take longer to finish.
Worked example
Worked example: a 60-second clip in which the speaker says the name “Katarzyna Nowak” twice. With beam_size=5 the name may come out as “Catherine Novak”; with beam_size=10 it may come out right. Count the wrong words in each transcript: if the larger beam fixes two words and adds three seconds, decide whether the trade is worth it for your use.
Expected result
UNTESTED in this guide: no transcription was run while writing it. The expected result is that both beam sizes produce a transcript, and the larger beam is slower but may fix words the smaller beam got wrong.
Limitations
A larger beam helps most on noisy or accented speech and least on clean studio audio. It also uses more memory, and a very large beam can be slower than a bigger model with the default beam.
