sonus
sonus copied to clipboard
Can we use mutil hotword with different callback?
I see that Snowboy can use mutil model and each model have their callback. Does Sonus can do the same?
In a round-about way, yes. Sonus doesn't surface the last hotword with final results of an utterance, but you could do something like:
let lastKeyword = null
sonus.on('hotword', (index, keyword) => {
lastKeyword = keyword
})
sonus.on('final-result', result => {
if(lastKeyword == 'something'){
//do something
} else {
//some other logic
}
})