k2-fsa / k2

FSA/FST algorithms, differentiable, with PyTorch compatibility.
https://k2-fsa.github.io/k2
Apache License 2.0
1.11k stars 213 forks source link

fix lattice length #1134

Open glynpu opened 1 year ago

glynpu commented 1 year ago

A faster version of https://github.com/k2-fsa/k2/pull/1089

Also fix issue of results different with allow_partial=True/False with yfyeung's blank skipping model. Results with yfyeung's model epoch-30-avg-14:

 fast_beam_search | allow_partial | test-clean | test-other -- | -- | -- | -- Master code | False | 15.68 | 26.13 Master code |True | 7.65 | 17.34 Master code |True(with one extra dummy frame) | 5.65 | 15.15 This pr | False | 5.65 | 15.08 This pr |True | 5.65 | 15.08
csukuangfj commented 1 year ago

@pkufool Could you help review this PR?

pkufool commented 1 year ago

@pkufool Could you help review this PR?

I remember this fix can not handle streaming decoding efficiently, I already discussed this with liyong, will try adding some commits to this PR in the following week.