simulateInstruction
通过字符串的方式模拟语音命令的执行。
例子
let artyom = new Artyom();
/**
* Add a command that reacts to "Hello"
*/
artyom.addCommands([
{
indexes:["Hello"],
action:function(){
alert("Hey, how are you");
}
}
]);
artyom.simulateInstruction("Hello"); //Simulate a voice command with voice "hello".Last updated
Was this helpful?