Skip to content

Glossary

Language model (in speech recognition)

In speech recognition, a language model (LM) scores how probable a word sequence is in a language. The recognizer combines that score with the acoustic evidence to choose between words that sound alike, such as homophones.

Updated October 17, 20265 cited facts, each traced to its source

Also called LM, n-gram language model.

In speech recognition, a language model (LM) gives a probability to a sequence of words. It answers the question: how likely is this phrase in this language? The recognizer combines that score with the acoustic model, which scores how well the audio matches. When two transcripts sound almost the same, the language model usually decides which one is written.

Older systems used n-gram counts

The classic form is the n-gram language model, which estimates the probability of each word from the few words before it. A trigram model, for example, looks at the previous two words. It is built by counting word sequences in a large body of text. The method is simple and fast, which is why it ran on early hardware, and it is still used in some systems and as a rescoring step. Neural language models have since replaced most n-gram models in research, because they handle longer context.

A concrete example: homophones

Consider the audio for "recognize speech" and "wreck a nice beach". The sounds are close enough that the acoustic evidence alone may not separate them. A language model strongly prefers "recognize speech" in ordinary English, so the recognizer chooses it. Without that prior, the same audio could produce a plausible but wrong sentence. The same effect fixes many homophones such as "their", "there" and "they're" in dictation.

How much it helps

The gain can be large. In a 2015 simulation of touchscreen typing, combining a spatial model with a language model reduced the word error rate from a 38.4 percent baseline to 5.7 percent 1. That is a typing study rather than a dictation study, but it shows how much the choice of likely words can matter.

A language model is not always required. In a 2015 Google study on voice search, the LAS model reached a word error rate of 14.1 percent on a subset of the task without a dictionary or a language model 2. End-to-end neural systems learn an implicit language model from their training transcripts 3. An external language model is then mainly useful where the training text is limited.

Domain text is one reason to add one. In a 2022 study of UK Supreme Court hearings, adding an in-domain language model and common legal phrases improved word error rate on the court audio 4.

Why it matters for dictation

Language models affect how sensible your text looks, and some dictation products expose them as a separate stage. Superwhisper's documentation says a dictation can skip its language model stage, and that its Voice to Text mode outputs raw transcribed text with no language model involved 5. Raw output is faithful to what the recognizer heard, but it may keep odd word choices. Stages that rewrite text can fix those choices but may also change what you said. Our guide to speech recognition models explains where the language model sits in each design.

Related terms

Guides that cover it

Evidence

Every number on this page, with where it comes from. Open a fact to see the exact words in its source.

  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.

Related terms

Pages that use this term