EasyVR Voice Recognition Board


The EasyVR (About Modules) module interfaces with EasyVR voice recognition board/shield. Presently, this support is very basic, and the module may change substantially. However, this is good enough to get started with EasyVR and the Espruino.


Connect Vcc and GND, Connect RX and TX of EasyVR to TX and RX of Espruino. Set jumper to PC.


Programming/training must be done using PC and the included software - support for that is not provided in this module.


Use EasyVR.setRecognize(list,timeout) to start listening for SD commands from the specified option group, with the specified timeout option.

You must supply three callbacks: onCom is called with two arguments, the option group, and the command returned, when a command is recognized.
onTimeout is called with one argument, the option group, when the command times out. onErr is called with one argument, the option group, when a speach recognition error occurs (usually that the command was close, but not close enough).


var ocm=function(menu,option) {
  console.log("menu:"+menu+" option: "+option);
  if (menu==0) { //handle top-level menu.
    if (option==0) {
      console.log("LIGHTS ON");
      //do lights on calls
    } else if (option==1) {
      console.log("LIGHTS OFF");
      //do lights off calls
    } else if (option==2) {
      console.log("SWITCH :");
      return {type:2,timeout:15};
    } else if (option==3) {
      console.log("DESK :");
      return {type:3,timeout:15};
    } else if (option==4) {
      console.log("NIXIE :");
      return {type:4,timeout:15};
  } else {
    if (menu==2) { // toggle a fargo or RF controlled device
      console.log("toggle device "+option);
      if (option < 8) {
        //do the turn device on/off thing. 
    } else if (menu==3) { // control desk lamp
      //do stuff based on the option number. 
    } else if (menu==4) { // control nixie clock
      //do stuff based on the option number. 
    return {type:1,timeout:0};


var otm=function(){


var evr=require("easyvr").connect(Serial4,ocm,otm,otm);

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.