The term hidden semi-Markov model (HSMM) refers to a large class of stochastic models developed to address some of the shortcomings of hidden Markov models (HMMs). As with HMMs, the underlying sequence of states of a process is modelled as a discrete Markov chain. Unlike HMMs, each state in an HSMM can emit a variable length sequence of observations, with many ways to model duration and observation densities. Parameter estimation in HSMMs is typically done using EM or Viterbi (dynamic programming) algorithms. These algorithms require batch processing of large amounts of data, and so are not useful for online learning. To address this issue, we present here a recursive maximum-likelihood estimation (RMLE) algorithm for online estimation of HSMM parameters, based on a similar method developed for HMMs.