hainan-xv / kaldi

This is now the official location of the Kaldi project.
http://kaldi-asr.org
Other
5 stars 0 forks source link

Point of using max_ngram_order in rnnlm lattice rescoring #13

Closed francoishernandez closed 7 years ago

francoishernandez commented 7 years ago

Hi there,

While trying to catch up with your implementation of TF RNNLM I came upon the max_ngram_order parameter in TfRnnlmDeterministicFst functions (tensorflow-rnnlm-lib.cc).

What is the point of restricting the context to 4-grams (as in your example AMI run) while rescoring with RNNLM? Is it just a question of optimization or maybe you empirically found it was the best bet for AMI?

Thanks F

hainan-xv commented 7 years ago

Although you can set it to have infinite context, we usually limit the max-ngram-order, because the running time of lattice-rescoring is exponential to the ngram-order used, and the WER performance follows the law of diminishing return. When I ran it, I found that 4-gram has much better WER than 3-gram (though it runs slower); 5-gram is just a tiny little bit better than 4-gram, so to me, 4 looks like a good balance between accuracy and runtime.

francoishernandez commented 7 years ago

Thanks a lot for your quick and thorough response! :)