Speech recognition is a technology field that captures, interprets, and computes a voice to transform it into text (TTS). Once the voice has been transformed into text, it can be applied to different applications, from speech dictation, to command-voice controllers, health monitoring, robotics and artificial intelligence or accessibility, among many others.
The Arduino Speech Recognition Engine, which is powered by Cyberon, is one of the best platforms available on the market to perform speech recognition on embedded microcontrollers. The full compatibility with multiple Arduino boards and with the Arduino IDE makes it very flexible, efficient, and easy to use, both in hobby projects and in professional products.
The Arduino Speech Recognition Engine can be further customized based on the license type, check the Licensing section of this tutorial to learn more.
This tutorial shows how to use the Arduino Speech Recognition Engine to configure multiple voice commands and perform custom tasks based on the recognized commands. To do that, it is necessary to perform a series of steps to register your board and activate your trial and free-of-charge license. Afterward, you will test the demo sketch and learn how to create your own custom voice commands.
In case you are interested in unlocking the full potential of the tool, the tutorial will teach you how to acquire a paid license to unblock the free license limitations.
To use the Arduino Speech Recognition Engine, you will need one of the following boards:
In the case of the Portenta H7, remember that is always possible to add an external microphone as additional hardware, instead of using the Portenta Vision Shield.
Additionally, you will need the following hardware and software:
The Arduino Speech Recognition Engine is a solution powered by Cyberon that requires a series of additional steps to unleash its potential. This tutorial will explain how to:
In case you would like to extend the engine functionalities, you will have to purchase a voucher on the Arduino Store and follow the next steps:
There are three libraries, you will need to install one or another depending on which board you are using:
Inside each of the libraries and under the folder "extra", you will find additional documentation made by Cyberon. Check them out in case you need more information
Go to the Library Manager, search for the library that you need for your board and install it.
In case you need more instructions about how to install libraries, visit: https://docs.arduino.cc/hacking/software/Libraries
To use the Arduino Speech Recognition Engine, you will need a free trial license or paid license. In any of the cases, the serial number of the board that you are using is necessary to activate the license.
To get your board's serial number, and once you have the library downloaded, navigate to File > Examples > Cyberon_DSpotterSDK > GetSerialNumber.
Connect your board to the computer, upload the sketch to it and, once is done, open the Serial Monitor to see your device's Serial Number.
On the Arduino IDE 1.6.x or previous versions, you can also find the serial number as follow: select the board's serial port and click on
, you will see the "SN" number, save it for later.tools > Get Board Info
Once you have the Serial number, open: https://tool.cyberon.com.tw/ArduinoDSpotterAuth/FDMain.php
Once everything is ready, click on the submit button to get your license, it will print an array of numbers for the license. Save it in a safe place, it will be used in the next step.
Open the sketch File > Example > Cyberon_DSpotterSDK > VoiceRecognition
Navigate to the
CybLicense.h
tab.Paste your license between the brackets, like in the following example:
1#include <stdint.h>2
3const uint32_t g_lpdwLicense[] = {4 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,5 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,6 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,7 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,8 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,9 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000010 };
Remember to replace the g_lpdwLicense values with your license ones.
Now switch back to the
VoiceRecognition
tab and upload the sketch.You can now open the Serial Monitor where you can see the available commands that the CyberonSDK recognizes.
Now it is time to test the engine. Feel free to say out loud the commands and see how it recognizes your voice!
Please note that the sketch and license that you are using are a "demo" version with the following limitations:
To expand the features and human interaction of your projects, you can create your own voice commands with the Arduino Speech Recognition Engine. In this section, you will learn about how to use the Cyberon Model Configuration webpage to create a new project with custom voice commands.
These steps are compatible with the trial license, used in this tutorial, and the paid license
Go to Cyberon Model Configuration and fill in the required fields:
Click next, you will see a new page to:
Warning: each project is bound to a single Arduino board with the declared Serial Number. If you would like to use the Arduino Speech Recognition Engine on another Arduino board, you need to create a new project from scratch and assign it to the new Serial Number.
To create a new project first you need to select the desired language for the speech recognition. Once is set, click create.
Now you need to configure the following steps to create a new trigger:
On the next page you will see all the configurations already set. Check it out to confirm that everything is correct. In case something is wrong, click on Back to fix it.
Once everything is checked, click Confirm and you will get the model header file (
model.h
). This header is part of your new project and you need to copy it onto your sketch folder to use it. Warning: when a project is created and confirmed, it cannot be further modified.
You will now get some files in your e-mail inbox. Download them to your computer.
On the IDE, open the example File > Examples > Cyberon_DSpotterSDK > VoiceRecognition and click File > Save As... and type a name for your sketch.
Once it is saved, open your File Explorer, and navigate to your sketch path.
On your sketch directory, paste the files you have got in your e-mail inbox before:
CybLicense_<id>.h
Model_<id>.h
Now to implement the Input Trigger Command and the Command List open the sketch and change the following
#include
1...2
3#include "CybLicense.h" -> #include "CybLicense_<id>.h"4
5...6
7#include "Model_L1.h" -> #include "Model_<id>.h"8
9...10
11#include "Model_L0.h" -> #include "Model_<id>.h"
At this point, the project is set to be used. Upload the sketch and open the Serial Monitor. Now you can test your new Input Trigger Word and the Command list that you have created. Pronounce the new trigger words out loud, you will see the recognized words on the Serial Monitor.
In case you want to further customize your model or add additional commands or trigger words, we have the right licenses for you:
There are different licensing options to fit the needs of your project. Read more in the Licensing section (Voucher codes). Note that you need to have an already existing project to use a paid license. Check the previous section to know more.
Browse to Cyberon's Licensed Project Configuration.
Fill in the required fields:
.dsproj
file that you received in your e-mail inbox during the creation of the project.
Click next, review your project options and press continue.
You will get a new e-mail with the new License and Model headers.
Warning: in case you are using a Speech Recognition License (not Pro), please note that deployed models are not customizable. You can always purchase an additional voucher on Arduino Store to generate a new model for the same hardware.
Open the sketch you have duplicated in the Create New Project section.
Repeat the replacement of
#include
files, with the latest ones (they have a different ID):1...2
3#include "CybLicense_<id>.h" -> #include "CybLicense_<newId>.h"4
5...6
7#include "Model_<id>.h" -> #include "Model_<newId>.h"8
9...10
11#include "CybLicense_<id>.h" -> #include "CybLicense_<newId>.h"
Upload the sketch to your board, and you will have unlocked the limitations of the trial version.
Here you can know more about the different licenses and limitations of each device. Remember that the code that you get for your license is also called a voucher code.
Once the number of recognition is reached the model will stop working and you will need to manually reboot the target.
[1] Please note that the delay in Trigger mode means a 20 seconds delay between entering the trigger mode and the recognition of the wake-up word.
After getting the demo sketch working, we encourage you to start implementing this on your own project to unleash the full potential of the Arduino Speech Recognition Engine.
In case you are looking for more information, you can check out Cyberon's documentation:
Readme.md
file that contains the requirements and the steps shown in this tutorialIn this tutorial, you have learned what is the Arduino Speech Recognition Engine, the different licenses and limitations, and how to acquire one. Once you have your license, you learned how to test it with the free demo sketch and how to create a project with your own custom voice triggers. Eventually, you learned how to upgrade a free already-made project to be used with a more advanced license.