py-kaldi-asr
py-kaldi-asr copied to clipboard
Frame Shift
https://github.com/gooofy/py-kaldi-asr/blob/a4e5b1ed2fc193e957938755b19810cdebe766e3/kaldiasr/nnet3_wrappers.cpp#L199
When using kaldi directly I've been able to pass --frame-shift=0.03
for a chained model to get the correct timestamps for word alignment. Right now it looks like calling get_word_alignment
returns arrays of integers which can just be divided by 100 to get the same value as I would get from calling nbest-to-ctm
directly. I'm not seeing how I can pass in frame shift value though.
Any thoughts?
yes, that's correct, a frame_shift argument could be added here. for the implementation, take a look at kaldi's
latbin/nbest-to-ctm.cc
for reference.