add HMMsegment into demo but with bug unsolved.
fix bugs