Discover: how offline speech recognition actually works
Acoustic model, language model, and why small local models mishear the words they mishear.
Two separate problems, one pipeline
An automatic speech recognition (ASR) engine solves two different problems in sequence, and mixing them up is the single most common source of confusion about what these systems can and cannot do.
The first is acoustic, the second is linguistic. They are trained on different data, and they fail in different ways.
The acoustic model
Answers: what phonemes does this waveform most resemble? It has never read a sentence in its life.
It was trained on pairs of (audio, phoneme sequence) and learned a purely acoustic mapping — the raw sound of a “t” versus a “d”, independent of any meaning.
The language model
Answers a completely different question: given these candidate phoneme or word sequences, which one is an actual sentence of the language?
It was trained on text, not audio. It knows that “two points” is far more likely to follow “add” than “de points” is, in a context about punctuation — even if the two sound almost identical.
Vosk is built on Kaldi, a toolkit that couples exactly these two components: a neural acoustic model and a statistical language model.
They are joined through a weighted decoding graph that searches for the overall most likely word sequence given both the sound and the grammar.
Why the small model mishears “deux points”
The acoustic part of a small model is not meaningfully worse at recognising phonemes — the bottleneck is the language model bundled with it.
vosk-cli-dictation uses Vosk’s small models by default (about 50 MB per language) and offers the large ones (over a gigabyte). That bundled language model is a much smaller, much less contextual statistical model of the language:
- A large language model has seen enough real sentences to strongly prefer “deux points” over “de points” in a sentence about formatting, because it has effectively seen that pattern before.
- A small one has seen far less, so when two candidate word sequences sound almost identical — a true homophone, or a near-homophone under casual pronunciation — it has much less signal to break the tie correctly.
That is why vosk-cli-dictation’s config.yaml has a recognition_aliases table: a small model’s confusion between near-homophones is structural, so each one that keeps coming back is corrected by an alias.
You correct the specific homophones your own voice and vocabulary actually trigger, once, and the tool stops making that particular mistake for you.
What a bigger model buys you, concretely
Better contextual disambiguation is paid for in compute, on every single utterance, for as long as the process runs.
Small model — the default
About 50 MB per language. Keeps the acoustic principle, and runs comfortably in the background on ordinary hardware.
Large model
The full model of each language, vosk-model-fr-0.22 for French, is 1.3 to 1.9 GB instead of ~50 MB, and one option (--model-size big) or one menu choice away. Far more context for the language model — at the direct cost of more CPU and RAM at runtime, since a larger graph is being searched at every partial result: 10.1 % word errors in French on the project’s test set instead of 15.4 %, for about 3.3 GB of memory instead of about 170–210 MB.
A second reading by a different kind of network
Vosk decides each word while the audio arrives, with little of what follows; Whisper reads a whole utterance at once.
That is the difference between a streaming model and a model that takes a whole utterance as input. The streaming one shows text while you speak, and cannot wait to see how the sentence ends. The other waits for the end of the utterance, which gives it the context to place capitals and punctuation and to settle some homophones, at the price of a delay.
vosk-cli-dictation can run both: Vosk cuts and shows the utterances, then Whisper rereads each one before it is typed, within a deadline after which Vosk’s text is typed instead. On the project’s test set it helps the light model (15.4 % word errors in French become 12.0 %) and hardly changes the full one, apart from capitals and punctuation. How to install and choose it →
The trade-off this project makes
vosk-cli-dictation defaults to the small models specifically so it runs comfortably in the background on ordinary hardware.
It treats the inevitable homophone errors as a configuration problem — solved once per recurring mistake, in a YAML file you can read and edit — rather than a model problem to be thrown more compute at.
Whether that trade-off suits you depends entirely on your machine and your vocabulary. It is not fixed: the full model and the Whisper refinement are chosen from the menu of the notification-area icon, without restarting.