In case anyone else finds this, Turing has a nice tutorial on this:
https://turing.ml/dev/tutorials/4-bayeshmm/