Fix detetion at the tail when using hotwords in streaming model (#638)

This commit is contained in:
Wei Kang
2024-03-08 10:04:33 +08:00
committed by GitHub
parent f70fdd156c
commit e9e8d755d9

View File

@@ -173,7 +173,7 @@ void OnlineTransducerModifiedBeamSearchDecoder::Decode(
new_hyp.num_trailing_blanks = 0;
if (ss != nullptr && ss[b]->GetContextGraph() != nullptr) {
auto context_res = ss[b]->GetContextGraph()->ForwardOneStep(
context_state, new_token);
context_state, new_token, false /*strict mode*/);
context_score = std::get<0>(context_res);
new_hyp.context_state = std::get<1>(context_res);
}