Driver - EasyVR speech recognition shield driver

[title]EasyVR speech recognition shield driver[/title]
http://code.tinyclr.com/project/408/easyvr-speech-recognition-shield-driver/
[line]
This is a driver and an extensive example for the EasyVR speech recognition module from VEEAR ( http://veear.eu/Products/EasyVRShield.aspx )

The EasyVR allows to simply add basic speech recognition to any hardware by using simple serial UART protocol. The EasyVR shield basicaly encapsulate the EasyVR module on an arduino shield. The shield is not adding any really usefull electronics, at least for the Fez, which can work natively with 3v3 TTL outputs. It just adds a few leds, nice connectors, and easy to switch “jumpers”. However its electronic for the “reset” pin does get along very well with 3v3 TTL from the Fez, you will need to make a little hardware (very simple) modification (see below).

Capabilities:

  • Built in 4 groups of “Speaker Independant” words (SI), for several languages (English, Italian, Japanese, German, Spanish, French). Words : (Group0:robot), (Group1:action,move,turn,run,look,attack,stop,hello), (Group2:left,right,up,down,forward,backward), (Group3: numbers from 0 to 10)
  • You can add (train) up to 32 different other “Speaker Dependant” words (SD) organised in up to 16 groups, in any language (you basicaly “record” them)
  • Special “trigger” (wake up) word (SI:robot or SD:whatever you like). You can consider it like the name of the robot
  • Special “password” word group (16) which allows not only to recognize a word, but recognize its speaker
  • Ability to playback up to 9 minutes of recorded sounds or voices.
  • Direct 8 ohms speaker or line out connection
  • 3 GPIO lines (input or output) you can directly address. IO1 is connected to the onboard green led.

The driver provided here has full API support, and can also play as a “bridge” between your PC (USB CDC virtual com port) and the module itself : you will then be able to use the “EasyVR commander” software to test and play with your board, records SD words, check what it in memory, etc.

However, if you want to record sounds for later “playback” directly from the module, you will need an extra FTDI cable with a speed at least of 115200 bit/s (could not make it work from the bridge at those speeds).

To know :

  • The actual shield does not behave correctly with a RESET PIN from the FEZ at 3.3V TTL logic. The best would be, on the shield, to cut the small stripe going out of the “arduino” RESET pin.
  • Don’t exceed 19200 bit/s or most likely you won’t be able to talk anymore to the board, and will need a FTDI cable with a terminal to reduce the speed…
  • The only supported mode, for the 4 position “jumpers” is “HW” (hardware UART to FEZ COM1). SW (software UART from pins DI12 and DI13) is not supported. PC is usefull only on an arduino to select the bridge mode (the bridge mode on the FEZ is software). You will need to use the UP position only when connecting a FTDI cable to the EasyVR shield (disconnect the shield from the board) and connect it to your PC using an FTDI cable.
  • To work with EasyVR commander, you shall not be in V C# debug mode. Deploy your software. Stop the debugging mode. Reset the board. A new COM port should be installed/available. Then only now start the EasyVR commander. Be carefull to close EasyVR commander before reseting the board or deploying another software, because it may lock the “virtual” com port on the PC and will have problems to use it the next time. Even in bridge mode, you should always keep the jumper in “HW” position (SW has another function).
  • The board / module is provided with an “electret” microphone. This is a good/cheap choice for a start, but definitly not optimal. Electrets microphones have a very high dynamic range. It is extermely sensitive for an example to background noises / and environnement. You may notice with you tests that some SD words trained (and working well) in a lab environnement (quite) will not work properly anymore in a typical environnement (other room with background noise). Maybe inserting it into some “boxing” might help !

The example provided below has 5 different modes, you can select by connecting either:

  • AN0 to GND : Bridge mode (to use with the EasyVR commander software for an example)
  • AN1 to GND : Various API tests
  • AN2 to GND : Sound Playback test mode
  • AN3 to GND : Training a new SD word
  • None of the previous : Test of speach recognition (see comments in example to see pre-requisites)

Please ask any question or report any bug to this forum : http://www.tinyclr.com/forum/21/5005/#/1/msg49851

For more information, please read the attached documentation.
Last but not least, all the code is Licensed under the Apache License, Version 2.0

Have FUN :slight_smile:

Hi Nicolas, any chance you could attach the VR driver to this thread? the link to tinyclr is broken…
Thanks

Hi,

is this also useable with “EasyVR Shield version 2.0”?
What I have seen inside the doc:

[quote]Warning: Do not connect the EasyVR Shield to systems with 3.3V I/O levels![/quote] http://download.tigal.com/veear/EasyVR_2/EasyVR_User_Manual_3.6.6.pdf

I have tried this one - but still getting an unhandled exception on read:


byte CMD_BREAK = (byte)'b';
byte STS_SUCCESS = (byte)'o';
byte[] ANSWER = new byte[1];

var UART = new SerialPort(COM1, 9600, Parity.None, 8, StopBits.One);
UART.ReadTimeout = 1100;
UART.Open();
            
UART.DiscardInBuffer();
UART.DiscardOutBuffer();

UART.Write(new byte[] { CMD_BREAK }, 0, 1);
UART.Flush();

// Unhandled System.Exception
UART.Read(ANSWER, 0, 1);

var test = (ANSWER[0] == STS_SUCCESS);

I would like to ask anyone help me, i have a problem about the sensitivity of the microphone in the use of VR easy, my voice can not be recognized if the condition of the room making noises about 45-55 db, how the solution to my microphone