alumae / gst-kaldi-nnet2-online

GStreamer plugin around Kaldi's online neural network decoder
Apache License 2.0
185 stars 100 forks source link

With Threaded decoder, sometimes word alignment is not created #22

Open ngoel17 opened 9 years ago

ngoel17 commented 9 years ago

Sometimes (not always) when using threaded decoder, and creating both word and phone alignments, word alignment is not created although phone alignment is created. The plugin does not crash or create a warning in the logs for this issue.

ngoel17 commented 9 years ago

If unthreaded is used, this issue does not happen.

rohithkodali commented 9 years ago

yes i'm also getting the same, but it throw some warnings

WARNING (LatticeWordAligner():word-align-lattice.cc:263) [Lattice has input epsilons and/or is not input-deterministic (in Mohri sense)]-- i.e. lattice is not deterministic. Word-alignment may be slow and-or blow up in memory. WARNING (OutputArcForce():word-align-lattice.cc:567) Invalid word at end of lattice [partial lattice, forced out?]

maxhawkins commented 8 years ago

I came across a possible solution for this issue.

The old socket-based recognition server in the Kaldi trunk runs DeterminizeLatticePruned before getting a word alignment:

https://github.com/kaldi-asr/kaldi/blob/master/src/onlinebin/online-audio-server-decode-faster.cc#L257

Adding that to my fork of this repository got rid of the warning.

andandio commented 8 years ago

@maxhawkins Can you recommend where to add DeterminizeLatticePruned to this repo? Thanks in advance.

maxhawkins commented 8 years ago

I think it should go here, right before WordAlignLattice

https://github.com/alumae/gst-kaldi-nnet2-online/blob/8222681d9aacac5cfbadc509253d18510fd9a938/src/gstkaldinnet2onlinedecoder.cc#L928

andandio commented 8 years ago

Thanks!