Fix keyword spotting. (#1689)
Reset the stream right after detecting a keyword
This commit is contained in:
@@ -43,6 +43,8 @@ func main() {
|
||||
spotter.Decode(stream)
|
||||
result := spotter.GetResult(stream)
|
||||
if result.Keyword != "" {
|
||||
// You have to reset the stream right after detecting a keyword
|
||||
spotter.Reset(stream)
|
||||
log.Printf("Detected %v\n", result.Keyword)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user