Closed csukuangfj closed 3 years ago
Thanks! you can merge when you think it's ready. Then Desh can have another look at position-dependent phones with this in place.
BTW, in graph.py, when we do
HLG.lm_scores = HLG.scores.clone()
.. this might not be 100% correct because these also contain the silence probability at this point; we should perhaps be doing this at the G.fst level. Of course, this depends on our precise rescoring method; but if we are subtracting the old lm_scores and composing with an n-gram FST, this would wrongly remove the silence probs.
Thank you so much, I will try to use it with position-dependent phones.
we should perhaps be doing this at the G.fst level
Using G.lm_scores can indeed achieve a lower WER than that of HLG.lm_scores.
The following screenshots are the results applying lm_scale
during rescoring.
(The model was trained using only a subset of the training data, i.e., only 100 hours of training data)
It uses HLG.lm_scores. You can see that lm_scale helps to obtain a better WER 5.63 than the baseline 5.73 (for test-clean).
G.lm_scores can further improve WER (5.63 --> 5.56, test-clean)
The test commands are
./mmi_att_transformer_decode.py \
--use-lm-rescoring=1 \
--max-duration=200 \
--is-espnet-structure=0 \
--vgg-frontend=0
./mmi_att_transformer_decode.py \
--use-lm-rescoring=1 \
--num-paths=100 \
--max-duration=200 \
--is-espnet-structure=0 \
--vgg-frontend=0
./mmi_att_transformer_decode.py \
--use-lm-rescoring=1 \
--num-paths=500 \
--max-duration=200 \
--is-espnet-structure=0 \
--vgg-frontend=0
Great!! You can merge when you think it's ready.
Closes #211
@danpovey Please try this pull-request.
It requires a pull request I just created in k2 to clear the cache of an FAS if its scores are reassigned.