Language Models in ASR
You'll learn how language models use word sequence probabilities to dramatically improve speech recognition accuracy.
Why Language Models Matter
When you speak naturally, you don't say random words—you follow patterns. "I ate breakfast" makes sense; "breakfast I ate" is unusual; "breakfast ate I" is nonsense. A language model (LM) captures these patterns by assigning probabilities to word sequences, helping the ASR system choose the most plausible transcription when the acoustic signal is ambiguous.
How Language Models Constrain Recognition
Think of an ASR system receiving unclear audio. The acoustic model (using HMMs and GMMs) might suggest several candidate words that sound similar: "recognize speech" vs. "wreck a nice beach." Without context, both are acoustically plausible!
The language model steps in as a linguistic filter. It knows that:
- "recognize speech" is a common, grammatically sensible phrase
- "wreck a nice beach" is grammatically valid but far less probable in typical contexts
By multiplying acoustic probabilities with language model probabilities, the system boosts likely sequences and demotes improbable ones.
N-Gram Language Models
Traditional ASR uses n-gram models that estimate the probability of a word based on the previous (n-1) words:
- Unigram: P("speech") — word frequency alone
- Bigram: P("speech" | "recognize") — considers one prior word
- Trigram: P("speech" | "recognize the") — considers two prior words
These probabilities are learned from massive text corpora. During recognition, the system scores each candidate transcription path by combining acoustic likelihood with n-gram probability, steering toward fluent, natural language.
Key Takeaway: Language models in ASR use n-gram statistics from text data to constrain word sequences, dramatically improving recognition by favoring grammatically probable phrases over acoustically similar but linguistically unlikely alternatives.