icefall icon indicating copy to clipboard operation
icefall copied to clipboard

Timestamp

Open fightingtang opened this issue 2 years ago • 2 comments

Is there any way to get timestamp,not only the start time of word,but also duration

fightingtang avatar Dec 14 '22 05:12 fightingtang

For CTC, yes, it is possible to get the start time and end time of a token (You have to infer the start and end time for a word from the corresponding tokens).

For transducer-based models, we can only get the start time, not the end time (so it is not possible to get the duration).

csukuangfj avatar Dec 14 '22 06:12 csukuangfj

thank you,I will try in CTC

fightingtang avatar Dec 14 '22 06:12 fightingtang

We have already some recipes that supports getting timestamps (only the start time of word currently). E.g.,

  • For conformer-ctc model, please refer to https://github.com/k2-fsa/icefall/blob/master/egs/librispeech/ASR/conformer_ctc3/decode.py.
  • For conformer-transducer model, please refer to https://github.com/k2-fsa/icefall/blob/master/egs/librispeech/ASR/pruned_transducer_stateless4/decode.py

yaozengwei avatar Dec 17 '22 14:12 yaozengwei