0.1.0 • Published 9 years ago

voice-cmdr v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

voiceCmdr

voiceCmdr is a library for adding voice commands to your website. It is build on top of Webkit Speach API.

Browser support

  • Google Chrome 31+

Getting started

Check examples directory. You need to access your website through http or https protocol. Thus, you need to host your website on some server (can be localhost).

API

  • Add command:

    		voiceCmdr.addCommand("command", callbackFunction);
    
    	Example:
    
    		voiceCmdr.addCommand("home", function () {
    			// navigate to home page
    		});
    	
    		voiceCmdr.addCommand("search", function (param) {
    			console.log("Searching for:", param);
    		});	
  • Remove command:

    		voiceCmdr.removeCommand("command");
  • Start listening (continuously):

    		voiceCmdr.start();
  • Stop listening:

    		voiceCmdr.stop();
  • Get single command:

    		voiceCmdr.getCommand();
  • Turn debug mode on/off:

    		voiceCmdr.debug(true|false);

LICENSE

MIT