Askars Salimbajevs
Committed by GitHub

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 <askars.salimbajevs@tilde.lv>
@@ -138,7 +138,9 @@ OfflineTransducerModifiedBeamSearchDecoder::Decode( @@ -138,7 +138,9 @@ OfflineTransducerModifiedBeamSearchDecoder::Decode(
138 new_hyp.timestamps.push_back(t); 138 new_hyp.timestamps.push_back(t);
139 if (context_graphs[i] != nullptr) { 139 if (context_graphs[i] != nullptr) {
140 auto context_res = 140 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 */);
142 context_score = std::get<0>(context_res); 144 context_score = std::get<0>(context_res);
143 new_hyp.context_state = std::get<1>(context_res); 145 new_hyp.context_state = std::get<1>(context_res);
144 } 146 }