A Dynamic HMM for On-line Segmentation of Sequential Data