Fix lm fusion (#157)
* share GetHypsRowSplits interface and fix getting Topk not taking logprob * fix lm score of lm fusion and make padding len same with 'icefall/egs/librispeech/ASR/pruned_transducer_stateless7_streaming/decode.py'
This commit is contained in:
@@ -152,7 +152,9 @@ void OnlineTransducerModifiedBeamSearchDecoder::Decode(
|
||||
} else {
|
||||
++new_hyp.num_trailing_blanks;
|
||||
}
|
||||
new_hyp.log_prob = p_logprob[k] - prev_lm_log_prob;
|
||||
new_hyp.log_prob =
|
||||
p_logprob[k] - prev_lm_log_prob; // log_prob only includes the
|
||||
// score of the transducer
|
||||
hyps.Add(std::move(new_hyp));
|
||||
} // for (auto k : topk)
|
||||
cur.push_back(std::move(hyps));
|
||||
|
||||
Reference in New Issue
Block a user