Applied AI
What did Whisper actually hear?
Running Whisper locally and checking its transcripts word by word.
I built SpeechLab as part of AI Playground to see which words a speech recognition model gets wrong. I wanted to be able to replay a clip, read the transcript and find the exact words I needed to listen to again.
I can upload a clip or record one in the browser. SpeechLab decodes the audio with FFmpeg and runs MLX Whisper locally on my Mac. I set multilingual Whisper Small as the default and added multilingual Whisper Tiny as a second option.
Counting the differences
I use JiWER to align the two transcripts. Word error rate adds up the words that were swapped, dropped or added, then divides by the number of words in the reference. SpeechLab ignores case and repeated whitespace but keeps punctuation and accents. The test for hello! versus hello comes back at 100% because the exclamation mark makes the only word count as a substitution.
I use this text-only scoring fixture to test the word alignment.
| Difference | Reference | Comparison |
|---|---|---|
| Match | peppered, | peppered, |
| Different word | floor-fattened. | flour-fattened |
| Extra word | — | sauce. |
100% word error rate · 1 substitution · 0 deletions · 1 insertion
That’s two edits against a two-word reference. Swap the strings round and sauce. becomes a deletion. There are still two edits, but the three-word reference brings the score to 66.7%.
Editing the reference
SpeechLab starts by copying Whisper’s output into the reference box, so the first comparison of a non-empty transcript is always 0%. I can replay the clip and edit that copy. The scores and word differences update as I type, using the same Whisper output from the last run.
That also means a typo I leave in the reference can make a correctly heard word show up as an error.
I tried a short clip generated using the macOS Daniel voice. Whisper Small processed 14.47 seconds of audio in 0.67 seconds. The word error rate was 24.1%, although some of the errors were down to phonetic spellings, hyphenation and words being split differently.
I used the original text I gave the speech synthesiser as the reference. I haven’t independently checked how it pronounced every word.

I'd like to experiment with different ways of scoring transcripts next. Some of Whisper's spellings were phonetically quite close. I'd like to see how much difference that makes to the scores.