voice-commander
v0.0.5
Published
Base version, fixed import and readme.
Downloads
5
Maintainers
Readme
Voice-Commander
ECMA6
Install
npm i voice-commander --save
Usage
import { VoiceCommander, colorNamesGrammars } from 'voice-commander'
const options = {
grammarData: colorNamesGrammars,
callback: (r) => {
if (r == "test") {
alert("Test what ;) ?")
}
console.log(r);
}
}
const VoiceCommanderInstance = new VoiceCommander(options)
console.log(VoiceCommanderInstance)
// If you want make it global
window.vc = VoiceCommanderInstance;
// Activate listen operation
VoiceCommanderInstance.run()