Fix keyword spotting. (#1689)
Reset the stream right after detecting a keyword
This commit is contained in:
@@ -168,6 +168,10 @@ class KeywordSpotter {
|
||||
SherpaOnnxBindings.decodeKeywordStream?.call(ptr, stream.ptr);
|
||||
}
|
||||
|
||||
void reset(OnlineStream stream) {
|
||||
SherpaOnnxBindings.resetKeywordStream?.call(ptr, stream.ptr);
|
||||
}
|
||||
|
||||
Pointer<SherpaOnnxKeywordSpotter> ptr;
|
||||
KeywordSpotterConfig config;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user