To do the training, start up a Janus with the same startup procedure as for the test after the k-means in the last step. Don't forget to create the HMM and path objects, and the accumulators for the codebooks and distributions. You can find the complete script in the scripts thread.
After the startup we can run the following loop:
foreach epoch {1 2 3} { cbs clearAccus dss clearAccus foreach utt [db] { puts "$epoch:$utt [forcedAlignment $utt labels]" sns accu path } sns update cbs save codebookWeights.$epoch dss save distribWeights.$epoch } exitAs you can see this is basically the same as we used in the previous training job, only this time we are using the forced alignment method "labels" instead of "viterbi" or "fwdBwd". The Tcl procedure "forcedAlignment" that we had written for the last training thus needs some modification. It now looks like this:
proc forcedAlignment {utt {method viterbi}} { set uttInfo [db get $utt] makeArray arr $uttInfo hmm make $arr(text) -optWord SIL if { $method != "labels" } { set score [path $method hmm -eval $uttInfo] } else { set score [path bload ../step4/labels/$utt -hmm hmm] ; fs eval $uttInfo } return score }