Fix keyword spotting. (#1689)
Reset the stream right after detecting a keyword
This commit is contained in:
@@ -1076,6 +1076,10 @@ class SherpaOnnxKeywordSpotterWrapper {
|
||||
SherpaOnnxDecodeKeywordStream(spotter, stream)
|
||||
}
|
||||
|
||||
func reset() {
|
||||
SherpaOnnxResetKeywordStream(spotter, stream)
|
||||
}
|
||||
|
||||
func getResult() -> SherpaOnnxKeywordResultWrapper {
|
||||
let result: UnsafePointer<SherpaOnnxKeywordResult>? = SherpaOnnxGetKeywordResult(
|
||||
spotter, stream)
|
||||
|
||||
Reference in New Issue
Block a user