From e9e8d755d9235a48c4a74ad48033db051c63f4e3 Mon Sep 17 00:00:00 2001 From: Wei Kang Date: Fri, 8 Mar 2024 10:04:33 +0800 Subject: [PATCH] Fix detetion at the tail when using hotwords in streaming model (#638) --- .../csrc/online-transducer-modified-beam-search-decoder.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sherpa-onnx/csrc/online-transducer-modified-beam-search-decoder.cc b/sherpa-onnx/csrc/online-transducer-modified-beam-search-decoder.cc index e37ba63d4..5357974df 100644 --- a/sherpa-onnx/csrc/online-transducer-modified-beam-search-decoder.cc +++ b/sherpa-onnx/csrc/online-transducer-modified-beam-search-decoder.cc @@ -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); }