MediaWiki:Wumbo

var recognition = new webkitSpeechRecognition; recognition.continuous = true; recognition.lang = "en-US"; recognition.start; recognition.onresult = function (e) { // loop through the results for (var i = e.resultIndex; i < e.results.length; ++i) { // only get the final results if (e.results[i].isFinal) { // trim any whitespace from result and pass to our command handler // note: I am using jQuery here to trim the string because my e-learning demo already had jQuery included runCommand($.trim((e.results[i][0].transcript).toLowerCase)); }   } }; function runCommand(command){

switch (command) { case "alert" : alert("Hello"); break; case "prompt" : prompt("Enter some text"); break; case "confirm" : confirm("Confirm?"); break; } }