Fix keyword spotting. (#1689)
Reset the stream right after detecting a keyword
This commit is contained in:
@@ -27,6 +27,10 @@ public class KeywordSpotter {
|
||||
decode(ptr, s.getPtr());
|
||||
}
|
||||
|
||||
public void reset(OnlineStream s) {
|
||||
reset(ptr, s.getPtr());
|
||||
}
|
||||
|
||||
public boolean isReady(OnlineStream s) {
|
||||
return isReady(ptr, s.getPtr());
|
||||
}
|
||||
@@ -60,6 +64,8 @@ public class KeywordSpotter {
|
||||
|
||||
private native void decode(long ptr, long streamPtr);
|
||||
|
||||
private native void reset(long ptr, long streamPtr);
|
||||
|
||||
private native boolean isReady(long ptr, long streamPtr);
|
||||
|
||||
private native Object[] getResult(long ptr, long streamPtr);
|
||||
|
||||
Reference in New Issue
Block a user