Skip to content

Commit

Permalink
fixed word level timing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pskrunner14 committed Jan 18, 2020
1 parent 75ecd75 commit eb9b27d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/decoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,9 @@ void Decoder::_find_alternatives(const kaldi::CompactLattice &clat,
KALDI_ASSERT(best_words[i] != 0 || mbr_opts.print_silence); // Should not have epsilons.

Word word;
word.start_time = frame_shift * times[i].first;
word.end_time = frame_shift * times[i].second;
kaldi::BaseFloat time_unit = frame_shift * decodable_opts_.frame_subsampling_factor;
word.start_time = times[i].first * time_unit;
word.end_time = times[i].second * time_unit;
word.word = word_syms_->Find(best_words[i]); // lookup word in SymbolTable
word.confidence = conf[i];

Expand Down

1 comment on commit eb9b27d

@pskrunner14
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference (frame-subsampling-factor): https://kaldi-asr.org/doc/dnn3_scripts_context.html

Please sign in to comment.