In the following session we are talking about objects needed for doing the decoding step. Since decoding is a process of picking the best hypothesis among a large number of possible hypotheses, we call this process search.
Look at the script secondTest-0.tcl which you can download from here to make your changes on your local copy. This scripts performs three search passes explained below and calculates the word accuray of the recognized hypotheses (cumulative). |
The core procedure of the script is testOne which calls:
Task 21: Run a test on your test set using the script secondTest-0.tcl. To do so create a subdirectory test in your directory steps. You may change some of the files to be loaded in the testscript (i.e. convertedDict). Redirect the recognizer output in order to look at the results without ruffle and to compare it to other test runs:
time janusS secondTest-0.tcl >& logTest-0 & |
Possible values for the word transition penalty are positive numbers or negative numbers, therefore we start with set baseLp 0 . |
Possible values for the language model weight are positive numbers. The language model penalty should be of the same order as the acoustic score for a word, therefore we start with set baseLz 32 . |
If the command time precedes a program, it will output the run-time of this program when finished. Have a look at the man-pages man time during running the test. |
Question 11:
Task 22: The lz,lp parameter found with the lattice pass often fit better than the original used baseLz,baseLp ones. For our data it might be something like lz = 16 and lp = -4. It is likely to get a better lattice if we use those better parameters for the actual decoding pass. In order to do so chose the lz,lp pair that gave the highest accuracy as parameters for baseLz,baseLp. Make a copy of the script secondTest-0.tcl into secondTest-1.tcl and change baseLz and baseLp accordingly.
Also change the lzList and lpList in order to rebalance the matrix. Reasonable values for lzList are now {2 4 8 16 32 64 128} and for lpList {-16 -8 -4 0 4} Start the next test run: time janusS secondTest-1.tcl >& logTest-1 & |
In real life the next step would be to get better lz,lp parameter by testing lz,lpLists of finer granularity. However, this only makes sense if your test set is large enough. If the distance between baseLz and the best lz is very large, you should prefer not to substitute baseLz by lz but choosing a value somewhere in between. The same is true for baseLp and lp. |
If you perform the test on a too small test set the lz,lp matrix is not very smooth. For this reason it is not very reasonable to transfer the results to new (unseen) data. |
In general, tuning of the lz,lp parameter would be performed on a cross-validation set not on the test set. The reason we are doing it on the test set in this speech lab is that we are working on a very small data set in which test and train are overlapping anyway. |
The lattice should contain a large variety of hypotheses, otherwise the parameter tuning would not be sucessful. To see how large your lattice gets, look for the recognizer output. INFO lattice.c (0708) Lattice 103 nodes 191 linksThis line tells you that the lattice contains 103 nodes (with words attached to it) and 191 links between those nodes, which is large enough for the parameter tuning in our case. |
The cross-validation set you are choosing for the parameter tuning should be as close as possible to the true test conditions, i.e. that the subset should not overlap with the training set, since recognition of utterances seen in the training is much easier and requires different lzlp parameter. |
Question 12:
Task 23: Make another copy of the script secondTest-0.tcl into secondTest-2.tcl and change the values for all beams to half of the former size (500 -> 250). Don't change the topN parameter. Do a third copy secondTest-3.tcl and set all beams to quarter of the former size (500 -> 125), again don't change topN.
Start the next test run and log your results:
time janusS secondTest-2.tcl >& logTest-2 & time janusS secondTest-3.tcl >& logTest-3 & |
The beam parameter should be as large as possible (reasonable run-time). A good starting point is a beam size which corresponds to an average score of two phonems (12 frames). If your test sentence got a score of 3856 for 244 frames than the score for 12 frames is about 180. In order to pick a beam size which is not too small we start with 500. |
The parameter topN gives the maximal number of word ends to be active at the same time. It depends on the size of the vocabulary, an upper bound for topN is about 10% of the size of the vocabulary. Reasonable values lie between 10 and 30 (fast demo system) and 50 to 200 for evaluation systems (offline high performant systems). |
If the score of a sentence does not change after reducing the beam and topN parameter by 20-50%, the former values were too large. |
If the score of a sentence does change or the hypothesis changes after increasing the beam and topN parameter by about 50%, the former values were too small. |
Last modified: Thu Apr 19 22:29:55 EDT 2001
Maintainer: tanja@cs.cmu.edu.