Training Multiple Iterations Along Labels

This kind of training is the kind that was most often used with the Janus recognizer. Training along labels is much faster than a training that computes forced alignments.

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 
} 
exit

As 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 
} 

Test Again

You can use the same test script as you have used for the test after the k-means job. Just replace the names of the weights files to use the newly trained weights (codebookWeights and distribWeigths!). See if training did help a bit.