Wei Kang
Committed by GitHub

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

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