Speech template recognition for dtw dynamic time planning