Q1 code completed: HMM speech recognizer