Training Error: Recognition Failed in EasyVR
Hello friends, hope you all are fine and enjoying life. Today's post is about removing a small error named as Recognition Failed in EasyVR, which I encountered while working with EasyVR shield with Arduino UNO. I have posted a complete project on EasyVR shield around a year ago in which I haven't mentioned this error because at that time I didn't encountered it. But today while working with EasyVR shield, I encountered this problem so I thought to share it with you guys.
EasyVR shield is a voice recognition module which is used for recognizing voices and operating accordingly. Using this module, one ca quite easily control anything using voice. In the previous project, I have controlled a robot using voice commands like when I say Forward then it starts moving forward, when I say REVERSE then it start moving backward and so on. So, its quite a cool feature to be added in projects but its not the perfect one as the efficiency of this module is not even 50%, if you are operating in a noise environment then it won't work as you want it to work.So ,let's get started with How to solve Training Error: Recognition Failed in EasyVR.
Training Error: Recognition Failed in EasyVR
- First of all, I connected my EasyVR with Arduino UNO and run the EasyVR Commander.
- I selected the Com Port of my Arduino UNO and hit Connect.
- After that, I added a new command in EasyVR Commander and hit Train Command and it asked for Phase 1.
- Everything was working perfect but when I train my command i.e. said the word which I wanted to save in the command, I got the error written as "Training Error: Recognition Failed", shown in below figure:
- I tried again and again to train the command but the error keeps on continuing, which creates quite a problem for me.
- So, below are the steps, which I have taken in order to remove this error, its kind of a troubleshooting which is quite important to learn for an engineer.
How to solve Training Error: Recognition Failed in easyvr
- First of all, what you need to check is whether your EasyVR shield is working or not, which I did exactly. So, I remove the EasyVR shield from the Arduino UNO and upload a sketch in Arduino UNO. The sketch I uploaded in Arduino UNO is the test EasyVR sketch comes with the EasyVR library.
- After uploading the sketch, I connected my EasyVR shield with Arduino UNO and check its output and I got a sigh of relief that my EasyVR shield is working fine, so there's no problem with EasyVR.
- Now I again opened the EasyVR commander and this time I placed the J12 jumper no SW instead of PC, and start the training procedure and I was like surprised, it worked great.
- I think the new versions of EasyVR shield doesn't need the jumper to be on PC for training mode.
- In the project, I have mentioned it that place the Jumper J12 on PC while working with EasyVR Commander and place it on SW while working with Arduino UNO, which is now not applicable for the new version of EasyVR.
- So, simply, place your jumper J12 on SW position and it will work smoothly.
Note:
- EasyVR shield doesn't give the 100% result, it got impressed by the noise in the surroundings very quickly so whenever you are using EasyVR shield, make sure that you use it in a calm place. I even turn off my fan in order to make it work properly.
Finally, after resolving this issue, I trained five commands into it for moving a robot, which are shown below:
- That's all for today, hope it will help you guys in some way. Thanks !!!
Interfacing of EasyVR with Arduino
Hello friends, I hope you all are fine and having fun with your lives. In today's post we are gonna see Interfacing of EasyVR with Arduino UNO. In the previous post, we have seen Getting Started with EasyVR Commander. It was quite simple and if you follow the steps carefully you wont stuck anywhere but still if you into some trouble i am here.
Now this tutorial is quite a quick and important one as it contains the real code using which we will control our robot. After adding the voice commands, now close the EasyVR Commander and open the Arduino Software. Connect the arduino board with computer and double check that your jumper J12 in on position SW. You should also read
Training Error: Recognition Failed in EasyVR, if you got such error while working on EasyVR. So, let's get started with
Interfacing of EasyVR with Arduino UNO.
Interfacing of EasyVR with Arduino UNO
- First of all, download the Arduino Libraries for EasyVR Shield, you can easily find them from the official website of EasyVR.
- Simply connect your Arduino UNO with computer.
- Open the Arduino Software and copy paste the below code into it.
- Burn your code in the Arduino Board.
- Now open your Serial Monitor of ARduino UNO, and you will first see the message saying EasyVR Detected.
- Now speak any of the command you saved in the board on mic and you will see when the command match the serial terminal will send a specific character.
- You can change this character if you want to by make a simple change in the code.
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#include "SoftwareSerial.h"
SoftwareSerial port(12,13);
#else // Arduino 0022 - use modified NewSoftSerial
#include "WProgram.h"
#include "NewSoftSerial.h"
NewSoftSerial port(12,13);
#endif
#include "EasyVR.h"
EasyVR easyvr(port);
//Groups and Commands
enum Groups
{
//GROUP_0 = 0,
GROUP_1 = 1,
};
enum Group0
{
G0_ARDUINO = 0,
};
enum Group1
{
G1_FORWARD = 0,
G1_REVERSE = 1,
G1_LEFT = 2,
G1_RIGHT = 3,
G1_STOP = 4,
};
EasyVRBridge bridge;
int8_t group, idx;
void setup()
{
// bridge mode?
if (bridge.check())
{
cli();
bridge.loop(0, 1, 12, 13);
}
// run normally
Serial.begin(9600);
port.begin(9600);
if (!easyvr.detect())
{
Serial.println("EasyVR not detected!");
for (;;);
}
easyvr.setPinOutput(EasyVR::IO1, LOW);
Serial.println("EasyVR detected!");
easyvr.setTimeout(5);
easyvr.setLanguage(EasyVR::ENGLISH);
group = EasyVR::TRIGGER; //<-- start group (customize)
pinMode(2, OUTPUT);
digitalWrite(2, LOW); // set the LED off
pinMode(3, OUTPUT);
digitalWrite(3, LOW);
pinMode(4, OUTPUT);
digitalWrite(4, LOW);
pinMode(5, OUTPUT);
digitalWrite(5, LOW);
pinMode(6, OUTPUT);
digitalWrite(6, LOW);
}
void action();
void loop()
{
easyvr.setPinOutput(EasyVR::IO1, HIGH); // LED on (listening)
Serial.print("Say a command in Group");
Serial.println(group);
easyvr.recognizeCommand(group);
do
{
// can do some processing while waiting for a spoken command
}
while (!easyvr.hasFinished());
easyvr.setPinOutput(EasyVR::IO1, LOW); // LED off
idx = easyvr.getWord();
if (idx >= 0)
{
// built-in trigger (ROBOT)
// group = GROUP_X; <-- jump to another group X
return;
}
idx = easyvr.getCommand();
if (idx >= 0)
{
// print debug message
uint8_t train = 0;
char name[32];
Serial.print("Command: ");
Serial.print(idx);
if (easyvr.dumpCommand(group, idx, name, train))
{
Serial.print(" = ");
Serial.println(name);
}
else
Serial.println();
easyvr.playSound(0, EasyVR::VOL_FULL);
// perform some action
action();
}
else // errors or timeout
{
if (easyvr.isTimeout())
Serial.println("Timed out, try again...");
int16_t err = easyvr.getError();
if (err >= 0)
{
Serial.print("Error ");
Serial.println(err, HEX);
}
group = GROUP_1;
}
}
void action()
{
switch (group)
{
// case GROUP_0:
// switch (idx)
// {
// case G0_ARDUINO:
// write your action code here
// group = GROUP_1; //<-- or jump to another group X for composite commands
// break;
// }
// break;
case GROUP_1:
switch (idx)
{
case G1_FORWARD:
Serial.print("9");
digitalWrite(2, HIGH);
break;
case G1_REVERSE:
Serial.print("Q");
digitalWrite(3,HIGH);
break;
case G1_LEFT:
Serial.print("X");
digitalWrite(4,HIGH);
break;
case G1_RIGHT:
Serial.print("Y");
digitalWrite(5,HIGH);
break;
case G1_STOP:
Serial.print("Z");
digitalWrite(6,HIGH);
break;
}
break;
}
}
So, that's all for today. I hope now you can easily Interface
EasyVR with Arduino UNO. Have fun and take care !!! :)
Getting Started with EasyVR Commander
In the previous post we have seen the project description of Voice Recognition Project using EasyVR shield. Today we will have a look at Getting started with EasyVR commander. EasyVR shield is a module which is used for voice recognition. First of all, we save our commands in the EasyVR shield and then we use these commands to control anything. In this project, I need to control the robot with voice commands like when someone says FORWARD then the robot start moving in forward direction.
Now first of all what I need to do is to save this FORWARD voice in the shield, which we will see today how to save the command in the shield and after that I will show you the
Interfacing of EasyVR shield with Arduino UNO. So that when I say Forward the motor start to move in forward direction, which we will see in the next post. When I was working on EasyVR Shield then I got into a problem which was
How to solve Training Error: Recognition Failed in EasyVR and I solved it so you should also have a look at this tutorial if you got such error.
What is EasyVR Commander?
- EasyVR Commander is a software using which we save the voice commands in the EasyVR Shield. You guys can easily find it using google and its totally free.
- Download this software and install it.
How to use EasyVR Commander?
- First of all connect your EasyVR shield with the Arduino UNO Shield as shown in below figure.
- Now be careful in this step as it took the most of my time, on EasyVR shield you will find a jumper J12. Put this jumper on position PC.
Note: When you are adding commands in EasyVR shield using EasyVR Commander, then this jumper J12 must be on position PC and when you are using this shield in the circuit with arduino then this jumper J12 must be on position SW.
- Connect your Arduino UNO shield with the computer and run the software EasyVR commander. The software will open up as shown in the figure below.
- Now select the COM Port on which Arduino UNO is attached, which in my case was at COM20.
- After selecting the COM Port, click the Connect icon as shown in below figure.
- When you hit on Connect icon, the software will connect to the COM Port and will open up as shown below:
- If you check the left pane, there are many groups and wordset.
- In wordset, there are pre defined words, which are already saved in the EasyVR shield.
- The words which I want to save in the shield, will be saved in the Groups.
- Now to save these words click on any group where you want to save.
- In the below figure, I have selected Group 2 and then click on the Add Command button (Click # 1) shown in the figure.
- It will add the command in the group as you can see I have saved the command OK.
- Now I have saved the command OK but I have to give it some voice to this command.
- In order to do so, click on the Train Command icon ( Click # 2 ).
- Now when you click on the Train Command icon, a message box will pop up as shown in below figure.
- Click on the button which says Phase 1.
- Now as you click on this button, a box appears which say "speak now", now its the time to say your command in the mic like I said OK.
- After listening the command this pop up will again show up and this time the button will be Phase 2.
- Again click on the button and it will ask for "speak now" and you again speak the same command in the mic.
- After that the software verifies the two words and if they are same it will confirm the command.
- You should also have a look at these Arduino Projects for Beginners.
- In my case, I have saved total 5 commands in my software as shown in the below figure.
- These were my five commands to control my robot.
- Now after adding the commands, simply close the software as the voice commands are now saved in the EasyVR shield.
- Place the jumper J12 back to position SW.
Note:
- You can also test your added commands,to do so click on Test Command icon on the software and speak up any of the commands from the selected group.
- If the command matches, then the software will indicate it. Test it and you will see.
In the next post we will check the
arduino side of controlling this shield. I will post the code as well so that you can easily test it. If someone's having any problem in using this shield post in comments and I will surely help you out and subscribe us via email to get such exciting tutorials rite in your mailbox. Take care !!!
Voice Recognition using EasyVR Shield
Hello friends, today's post is, as the name suggests, about the Voice Recognition using EasyVR Shield. Voice recognition is quite a difficult task and usually done on software like MATLAB, but what if someone needs a stand alone project, a kind of autonomous voice recognition project, which doesn't use computer.
EasyVR is the solution for such projects. I recently did one project on this module named as Voice Recognition using EasyVR Shield and it worked really cool so I thought to share this new technology with you guys. I couldn't write the next part of Proteus tutorial, actually firstly I was busy in this project and then I thought to share this one as its quite exciting one. After completing this project, I will come back to Proteus tutorial.
This is the first tutorial in this EasyVR shield series. In the next tutorial, I have shared Getting Started with EasyVR Commander and once you got familiar with the EasyVR Commander then you must read Interfacing of EasyVR Commander with Arduino. When I was working on this awesome shield, I got Training Error: Recognition Failed in EasyVR so if you got such error this read this tutorial.
Project Description - Voice Recognition using EasyVR Shield
- The complete project was quite messy, it involves a lot of sensors as well as dtmf control, so I am not explaining that part in this tutorial. In this project I will explain that section of the project where we used this module.
- The functioning of this module is to control the robot movement using voice.
- So, when someone says FORWARD in the mic of this module, the robot moves forward. Someone says RIGHT and the robot moves right and so on.
- I have divided this project in parts so that you can easily understand the basic concept behind this project.
- If you are working on such project and are unable to make the code work then you can also get our services by Contacting Us.
- I have plans on designing this same project on PIC Microcontroller as well as 8051 Microcontroller and I will share their links once I uploaded them.
So, that was all about the Project Description of Voice Recognition using EasyVR Project. In the next posts, we will first see how to add these voice commands in the EasyVR shield and after that we will have a look at the code, I used in Arduino.