Fix keyword spotting. (#1689)
Reset the stream right after detecting a keyword
This commit is contained in:
@@ -70,6 +70,9 @@ func run() {
|
||||
spotter.decode()
|
||||
let keyword = spotter.getResult().keyword
|
||||
if keyword != "" {
|
||||
// Remember to call reset() right after detecting a keyword
|
||||
spotter.reset()
|
||||
|
||||
print("Detected: \(keyword)")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user