Hi! this article is aimed to guide reader on how to perform speech recognition using EasyVR Shield and Arduino Uno. The guidance is organized into two sections. There are components that are used and their functions, and how to integrate all of the components.
Components and Function
EasyVr Shield is speech recognition module for Arduino Board. As explained by SparkFun, the shield is versatile, robust and cost effective speech and voice recognition capabilities to virtually any application. Cool! Technically, the shield has selection of 26 built-in Speaker Independent (SI) commands (available in US English, Italian, Japanese, German, Spanish, and French) for ready to run basic controls. It supports up to 32 user-defined Speaker Dependent (SD) triggers or commands (any language) as well as Voice Passwords. It is also easy-to-use and simple Graphical User Interface to program Voice Commands. In simple way, it adds capability of hearing and responding to Arduino Uno.
Arduino Uno is brain of the embedded system. It is where we put the code that recognizes the speech and how to response it. It is also where the shield is attached. Through the Arduino Uno, we can record command and load the recorded command to EasyVR Shield.
In Indonesia, these components are relatively easy to obtain. Some e-commerce sites provide seller of EasyVR Shield and Arduino Uno. EasyVR Shield costs around Rp. 1.145.000 while Arduino Uno costs around Rp. 375.000.
One of brief videos that teaches how to configure and use EasyVr Shield and Arduino Uno as speech recognition system can be seen over here. However, some of the steps are not well explained. Therefore, this article is aimed to make it more comprehensive. Lets start.
1. Attach EasyVR Shield to Arduino Uno.
2. Connect USB port from the Arduino Uno to USB port in PC.
4. Open EasyVR Commander application. EasyVR Commander is software to suport the speech recognition. It can record speech and command to the EasyVR Shield. The software also can generate coding based on the recorded speech and command.
5. Click Connect Button in the EasyVR Commander software. Make sure to select correct COM port that connects to the EasyVR Shield.
6. The connection process will reload existing command that already exists in EasyVR Shield. By default, the shield already has some word sets. Up to 17 group of command can be loaded to the shield. The last group (index number 16) is specifically to record password that can be used as authentication purpose.
7. To add new command, click Add Command button in one of the groups. Then, give name to the command.
8. After that, click Train Command button to record speech for the command. There are two phases to train the command. Click Phase 1 button in the pop up window and say the speech. Then, another pop up window will show up. Click Phase 2 button and repeat the speech. Make sure the two recorded command in Phase 1 and Phase 2 is similar, especially for the intonation.
9. The EasyVR commander will compare the two recorded commands. If the two commands are very different, the processes need to be repeated.
10. After all of the commands are recorded and trained. Click Generate Code button to create line of Arduino Uno coding based on the recorded commands.
11. Save the generated coding and open it using Arduino IDE. Line of coding from the EasyVR Commander is shown and ready to be modified.
12. Find lines that define index for the recorded command (enum Group 1). These lines represents specific index for command that has been recorded previously.
13. For a simple logic test, we will turn on LED based on the recorded command. Go through the coding and find switch case logic (void action).
14. Inside the switch case logic, add simple digitalWrite code to turn on yellow LED that has been connected to one of IO pin in the Arduino Uno.
15. Set the Mode Jumper in EasyVR Shield to SW and click Upload button in Arduino IDE.
16. Speak the command when small Green LED in EasyVR Shield is turned on. If the command is confirmed, the yellow LED will be turned on.
17. The switch case logic in the generated coding can be modified further. For example, it can be replaced by coding to control buzzer or LCD display. Futhermore, it also can modified using PWM logic to control servo motor.
18. The generated coding also can be modified to make the EasyVR Shield sounds Beep for each of recognized command. It can be done by including code of:
#define SND_BEEP 0
19. EasyVR Shield also can speak some word such as Hello, Access Denied, and Access Granted based on recorded sound in the sound table.
20. In addition, QuickSynthesis application can be used to add more recorded sound that can be said by the EasyVR Shield. Detail on how to use this application will be provided in other article about speech recognition.
21. Feel free to ask any question regarding this speech recognition article.
*This article is byproduct of research in title “Pemanfaatkan Kontrol Suara pada Manajemen Kunci berbasis Arduino dan EasyVR Shield” funded by Politeknik Caltex Riau