OfflineRecognizer supports create stream with hotwords (#1833)

Co-authored-by: Wangkai <kell.wang@huawei.com>
This commit is contained in:
Kell
2025-02-10 16:26:56 +08:00
committed by GitHub
parent 9559a10bd3
commit 2ac41d3d85
4 changed files with 26 additions and 2 deletions

View File

@@ -533,6 +533,13 @@ const SherpaOnnxOfflineStream *SherpaOnnxCreateOfflineStream(
return stream;
}
const SherpaOnnxOfflineStream *SherpaOnnxCreateOfflineStreamWithHotwords(
const SherpaOnnxOfflineRecognizer *recognizer, const char *hotwords) {
SherpaOnnxOfflineStream *stream =
new SherpaOnnxOfflineStream(recognizer->impl->CreateStream(hotwords));
return stream;
}
void SherpaOnnxDestroyOfflineStream(const SherpaOnnxOfflineStream *stream) {
delete stream;
}