Sub topic 11
Limitations: Hallucinations, Silence, Accents, and No Built-in Speaker Labels
Assume you know basic Python, can install packages, and understand the earlier Whisper workflow. This chapter focuses on cases where a transcription looks fluent but is wrong.
Hallucinations on silence
A hallucination is text generated without matching speech in the audio. Whisper can produce repeated phrases, subtitles, or plausible sentences during silence, very quiet audio, music, or heavy noise. The model learned from web videos, where silence may be followed by recurring captions or other text patterns.
Do not treat an empty or quiet region as guaranteed evidence that no text will be produced. Inspect the segment confidence and compare the transcript with the waveform.
Useful mitigations include:
- Remove leading and trailing silence before transcription.
- Use voice activity detection (VAD), which identifies regions likely to contain speech.
- Set
no_speech_thresholdso likely-silent segments are skipped. - Set
condition_on_previous_text=Falsewhen repeated text or looping occurs. - Review segments with unusually low
avg_logprobor high compression ratio. - Keep the original audio and timestamps so a reviewer can check every claim.
import whisper
model = whisper.load_model("small")
result = model.transcribe(
"meeting.wav",
language="en",
fp16=False,
no_speech_threshold=0.6,
condition_on_previous_text=False,
)
for segment in result["segments"]:
print(
f"{segment['start']:.1f}-{segment['end']:.1f}: "
f"{segment['text']} "
f"(logprob={segment['avg_logprob']:.2f})"
)These settings reduce some errors. They do not prove that the remaining text is correct.
Accents, noise, and specialized words
Whisper handles many accents and languages, but accuracy varies with the training data and recording conditions. Errors become more common with:
- Strong regional accents or code-switching between languages.
- Crosstalk, background music, echo, or distant microphones.
- Children’s voices or unusually fast speech.
- Names, product codes, medical terms, and other rare words.
- Overlapping speakers.
An initial_prompt can supply likely vocabulary, such as names or technical terms. It guides decoding but cannot force correct spelling. Explicitly setting language also avoids some language-detection mistakes, especially in short clips.
Speaker labels are a separate problem
Whisper produces text and timing. It does not identify who said each sentence. Speaker diarization is the separate task of dividing audio into speaker-labeled regions. A diarization system may label regions as SPEAKER_00 and SPEAKER_01, after which you associate each region with Whisper segments.
Diarization can also fail when people speak at the same time, microphones are shared, or only one speaker is present. Treat speaker labels as estimates and review important records manually.
Choosing a review strategy
| Risk | Helpful check |
|---|---|
| Silence hallucination | Listen to low-confidence segments |
| Accent or noise errors | Sample audio from each speaker |
| Technical vocabulary | Compare terms with a known word list |
| Speaker attribution | Verify diarization boundaries |
| High-stakes transcript | Require human review against the audio |
Word error rate measures text differences, but it does not measure whether the correct person was assigned to a sentence. For legal, medical, or safety-critical use, evaluate both transcription accuracy and speaker attribution.
Exercise
Why can a Whisper transcript contain words during silence, and name two mitigations.
Show answer
The decoder can generate plausible text from learned patterns even without speech. Trimming silence, using VAD, setting nospeechthreshold, or disabling previous-text conditioning can reduce the problem.