In this algorithm, first, a score is calculated for summing each score of a state. Next, the optimal state sequence is assigned for the best score of each frame. This decoding algorithm is given as follows.
: optimal state sequence at time ;
: score at time and state ;
: number of states for Ergodic HMM ;
; transition probability at state to ;
; output probability at state
when the observation vector is
;
Finally, if the optimal state sequence is the last state of any word,
it is assumed that this word is recognized.
This decoding algorithm is similar to the forward-backward algorithm[5]. However, it can recognize the word for each frame, and therefore, can be regarded as a kind of word spotting algorithm.