SpeechKITT.vroom();
annyang.addCommands(commands);
// Start listening. You can call this here, or attach this call to an event, button, etc.
annyang.start();
annyang.debug(true);`
Am I adding commands incorrectly? Not sure why the function pointer isn't working.
Your Environment
Version used: 75
Browser name and version: Chrome
Operating system and version (desktop or mobile): Desktop
I am using the splat functionality for multi word pickup but it doesn't work when pointing to a function var.
Issue
`//This doesn't work var commands = { 'Hey Computer tell *req': Joker }; var Joker = function (req) { alert("I work") $.ajax({ //ajax call }) }
//This works var commands = { 'Hey Computer tell *req': function (req) { alert("I work") $.ajax({ //ajax call }) } };
// Add our commands to annyang SpeechKITT.annyang(); SpeechKITT.setStylesheet('https://cdnjs.cloudflare.com/ajax/libs/SpeechKITT/1.0.0/themes/flat.css'); SpeechKITT.setInstructionsText("Say 'Hey Computer' and a command")
Am I adding commands incorrectly? Not sure why the function pointer isn't working.
Your Environment