HMM-based speech recognition: how state paths explain audio over time
Hidden Markov model (HMM) speech recognition represents speech features as a sequence of hidden acoustic states. Learn how observation likelihoods, Viterbi search, and Baum-Welch training contribute—and why an HMM is not the same as its emission model.
HMM-based speech recognition: how state paths explain audio over time
Hidden Markov model (HMM) speech recognition explains speech-frame features as a time path through hidden states associated with pronunciation units. It combines acoustic observations and state-transition scores to search for a likely word sequence. The HMM's central role is temporal state progression; a separate emission model scores how well each frame fits a state.
Observations and hidden states
Speech is divided into short frames, and a spectral feature vector (O_t) is computed for each frame. The state (q_t) at each time is hidden. Given a state, the probability of observing a frame is its emission probability (b_{q_t}(O_t)); the probability of moving from state i to state j is a transition probability (a_{ij}). In a simple HMM, the joint score of a state path (Q) and observations (O) is:
(P(O,Q|lambda)=pi_{q_1}b_{q_1}(O_1)prod_{t=2}^{T}a_{q_{t-1}q_t}b_{q_t}(O_t))
Here (pi) is the initial-state probability and (lambda) denotes model parameters. Implementations usually use log probabilities to avoid numerical underflow. This is the standard explanatory form; assumptions such as conditional independence of frames and the chosen state definitions constrain the model approximation.
Three problems: scoring, paths, and learning
**Score an observation sequence:** Sum the probabilities of all state paths that could explain it. The forward algorithm computes this efficiently with dynamic programming.
**Find the best state path:** The Viterbi algorithm finds the single highest-scoring path instead of summing over paths. It is useful for decoding and alignment, but its score is not the same as the full observation-sequence probability.
**Estimate parameters:** With transcripts or limited alignment information, Baum-Welch (an expectation-maximization, or EM, procedure) repeatedly estimates transition and emission parameters using the contribution of possible hidden paths. Better training likelihood does not guarantee fewer recognition errors, so evaluate separately.
HMMs in a speech recognizer
For continuous speech, systems commonly connect HMMs for phones or smaller pronunciation states, then combine pronunciations with a lexicon and language model to define candidate word sequences. A decoder searches plausible paths while accumulating frame-level acoustic scores, state transitions, and word or language constraints. In a conventional HMM-GMM, the GMM supplies state-conditional feature likelihoods and the HMM supplies temporal transitions. An HMM is therefore not synonymous with a GMM.
Kaldi's implementation documentation describes emitting states and self-loops in a phone-HMM example, and separates the transition model from feature distributions. State topology, tying, and transition details vary across tools and systems.
What should you check?
Check that input feature settings match the model's training conditions, alignments are consistent with the pronunciation lexicon, and acoustic and language-model scores are balanced. Alongside word error rate (WER), inspect insertion, deletion, and substitution errors and performance across noise, speakers, and utterance lengths. The HMM's compact sequential structure is useful for explanation and decoding, but standard assumptions may not capture complex long-range dependencies or real duration distributions well. GMM-HMM and neural-HMM systems use different emission models and training objectives; the label “HMM” alone does not establish a recognizer's architecture or performance.
References
[Rabiner, A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition (1989)](https://cs.brown.edu/courses/csci1810/fall-2023/resources/ch4_readings/A%20tutorial%20on%20hidden%20markov%20models.pdf)
[Kaldi, HMM topology and transition modeling](https://kaldi-asr.org/doc/hmm.html)
[Kaldi, Tutorial prerequisites](https://kaldi-asr.org/doc/tutorial_prereqs.html)