This function allows the user to stop the voice recognition at any time. It implements promises in the same way the initialize method does and only stops the Speech Recognition, not the queue of speech synthesis (to stop speaking use the shutUp
method).
Example
var artyom = new Artyom();
artyom.initialize({
lang:"en-GB",
debug:true, //Show what recognizes in the Console
listen:true, //Start listening after this
speed:0.8, // Talk a little bit slow
});
/**
* After of 5 seconds, stop artyom.
*/
setTimeout(function(){
artyom.fatality().then(() => {
console.log("Artyom succesfully stopped !");
});
}, 5000);