Skip to content

Commit f24b998

Browse files
committed
minor fixes
1 parent 65f81d2 commit f24b998

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sherpa-onnx/csrc/online-recognizer-transducer-impl.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ class OnlineRecognizerTransducerImpl : public OnlineRecognizerImpl {
176176
auto hws = std::regex_replace(hotwords, std::regex("/"), "\n");
177177
std::istringstream is(hws);
178178
std::vector<std::vector<int32_t>> current;
179-
if (!EncodeHotwords(is, "", sym_, nullptr, &current)) {
179+
if (!EncodeHotwords(is, config_.model_config.modeling_unit, sym_,
180+
bpe_encoder_.get(), &current)) {
180181
SHERPA_ONNX_LOGE("Encode hotwords failed, skipping, hotwords are : %s",
181182
hotwords.c_str());
182183
}
@@ -365,7 +366,8 @@ class OnlineRecognizerTransducerImpl : public OnlineRecognizerImpl {
365366
exit(-1);
366367
}
367368

368-
if (!EncodeHotwords(is, "", sym_, nullptr, &hotwords_)) {
369+
if (!EncodeHotwords(is, config_.model_config.modeling_unit, sym_,
370+
bpe_encoder_.get(), &hotwords_)) {
369371
SHERPA_ONNX_LOGE("Encode hotwords failed.");
370372
exit(-1);
371373
}

0 commit comments

Comments
 (0)