Hidden Markov Models, Statistics, Data Science, Machine Learning, Editors Pick.
Viterbi Algorithm, gives you a hand with that. When the sequence of hidden states in the HMM is traversed, at each step, the probability vt(j) is the probability that the HMM is in the hidden state j after seeing the observation and is being traversed through the most probable state that lead to j.