Simulates the execution of a voice command with a string.

This method simulates the execution of a command, zhere are many purposes for this function as testing ,no microphone for test etc. The function expects as first parameter a string that identifies "the spoken text" that should be compared with the commands of artyom.

Parameters type
instruction String
Returns type
if the instruction exists or matches with an existing comand, will return true otherwise false. Includes messages in the console boolean

If the instruction exists or matches with an existing comand, will return true otherwise false. Includes messages in the console boolean This function allows the user to simulate a voice command with only text.

Example

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".