AnyControl is a small JavaScript SpeechRecognition library that lets your users control your site with voice commands. It is build on top of Webkit Speech API.
AnyControl has no dependencies, just 3 KB small, and is free to use and modify under the MIT license.
Google Chrome 31+
<script src="https://unpkg.com/anycontrol/dist/index.umd.min.js"></script>
<script>
var ctrl = new anycontrol()
ctrl.addCommand("previous page", function() {
console.log('Go to previous page')
});
ctrl.addCommand("next page", function () {
console.log('Go to next page')
});
ctrl.start();
</script>
Add command
ctrl.addCommand("home", function() {
// Navigate to home
});
ctrl.addCommand("search", function(param) {
console.log("Search for:", param);
});
Remove command
ctrl.removeCommand("search");
Start listening (continuously)
ctrl.start();
Stop listening
ctrl.stop();
Get single command
ctrl.getCommand();
Turn debug mode on/off
ctrl.debug(true|false);
MIT