Skip to content

Commit 664b461

Browse files
vsd-vectorAskars Salimbajevs
andauthored
Disable strict hotword matching mode for offline transducer (#1837)
* Disable strict hotword matching mode for offline transducer. Also introduces new variable, so that later this mode can be switched on in the runtime. * remove strict mode variable --------- Co-authored-by: Askars Salimbajevs <[email protected]>
1 parent 31ced58 commit 664b461

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sherpa-onnx/csrc/offline-transducer-modified-beam-search-decoder.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ OfflineTransducerModifiedBeamSearchDecoder::Decode(
138138
new_hyp.timestamps.push_back(t);
139139
if (context_graphs[i] != nullptr) {
140140
auto context_res =
141-
context_graphs[i]->ForwardOneStep(context_state, new_token);
141+
context_graphs[i]->ForwardOneStep(context_state,
142+
new_token,
143+
false /* non-strict mode */);
142144
context_score = std::get<0>(context_res);
143145
new_hyp.context_state = std::get<1>(context_res);
144146
}

0 commit comments

Comments
 (0)