py-kaldi-asr icon indicating copy to clipboard operation
py-kaldi-asr copied to clipboard

Frame Shift

Open sberryman opened this issue 5 years ago • 1 comments

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?

sberryman avatar May 30 '19 20:05 sberryman

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.

gooofy avatar Jun 22 '19 09:06 gooofy