Implementation of stochastic variational inference for Bayesian hidden Markov models.