MikroElektronika Learn

Click Boards

SpeakUp Click – Control the world with your voice!

5 Aug , 2016   Video

Handsfree technology has always been the helping of people with much to do. Sometimes you just can’t reach that switch, or you have your hands full with groceries and just can’t press that button. Either way, you need an alternative to pressing a button.
One of those beautiful alternatives was the human voice – it has always been easier to speak than to communicate by any other means. That’s why the developers at mikroElektronika have created the ingenious SpeakUp click back in 2014. The click came with a speech recognition firmware on it, and a PC application which lets you record commands and set the different responses to those commands. Now, we introduce the all new and improved – SpeakUp2 click, and we will show you just how to use it!

SpeakUp2 click

The SpeakUp2 carries FTDI’s FT900 microcontroller. The click also contains a brand new microphone, much smaller than the previous one. Similar to the last time, the SpeakUp2 connects to the PC with a USB mini connector. It can also connect to an external MCU through UART pins.

The SpeakUp hardware

Other than the new MCU and microphone, the new SpeakUp2 hardware doesn’t differ much from the previous one. There are the standard mikroBus pins. Three LEDs, and 12 GPIO pins which can be configured to react differently for each voice command. There are also the two buttons as before.

speakup-2-click-banner-news

The firmware doesn’t differ much, and we went with the similar idea so that our users won’t get confused: The left (yellow) LED signalizes when the SpeakUp is ready to listen for commands, the right (red) LED signalizes when the SpeakUp is processing a command, and the central (green) LED signalizes if the click has power.

The PC software

Despite adding the new SpeakUp2 click, the functionality didn’t change much:
Once you start the app,  the project you were last working on will be loaded, and you can keep that project, open a different project, create a new project.

speak_up_app

In the far right corner is the settings button (the little wheel icon). Once you click it, it will take you to the General Settings page.
Under the General Settings, you can set the acceptance threshold for voice recognition. You can also set the recording timeout, set as 5s as default, this means that the device will listen 5 seconds for a recording, if you don’t manage to record anything in 5 seconds, you will have to try again. You can set the word length in seconds, the default is one second. The noise level can also be adjusted, if set to “Auto“, the device will auto-calibrate to the ambient noise and try to block it out when listening for a sound, if set to “Custom“, you can set the noise level to the desired value. Under “Notify master” you can set the communication protocol used for the SpeakUp2 to notify the master device if a command is recognized. If set to “UART“, the SpeakUp will issue data from the UART pins, if set to “USB“, then the SpeakUp will issue data through the USB port.

Pin Aliases and Initial Pin States

speak_up_general

Under General Settings you can also set the Pin aliases for each of the 12 GPIO pins. Any name can be chosen as an alias for a pin, so that you don’t confuse the pins when working with them.

pin_aliases
Initial pin states are how the pins are configured when the SpeakUp is first powered on. You can configure each pin to be HIGH or LOW when the SpeakUp click wakes up.

pin_states

Setting up a command

In the first window, a new command can be added with the “+” button in the upper left corner. When pressed, the app and the click will be ready to record a command. Click the record button and make a voice command. If recognized, the application will play your voice command. If you like it, you can give it a name and save it. If not, you can record again.
Each command has it’s index, the indexes increment/decrement for each command added/removed.
You can also edit a command or remove it with the two buttons on the right (the pen and the trash bin).

recording_speakup

Uploading a project

Once you are done setting everything up, you can upload a project to the click with the upload button (the arrow icon next to the folder icon). The hex will be uploaded to the click with through the USB bootloader.

speakup_upload

Recognizing a command

Once the code is on the click, if the click has the yellow LED on, it means it is ready to listen to commands. Once the click “hears” a sound, it will try to recognize a command, this is signalized by the red LED being on and the yellow off. If a command is recognized, both LEDs will blink for a second. If not, the red LED will go off and the yellow will go back on.

When a command is recognized, the click will send a byte which has the value of the commands index to the master. The byte is sent through UART or USB depending on the settings.

The Standalone mode

In Standalone mode, the click can record commands without the PC application. Recording is done using the two buttons. When the left button is held, the click will be ready for recording a command. When the right button is held, the click will erase all previously stored commands. If both buttons are held, the click will reset.

After the reset, or when the click is first powered on, the click runs a setup routine which takes around ten seconds. After the routine is done, the click sends a “READY” string to the master through UART or USB.

There it is! A full tutorial on using our SpeakUp solution. Record your commands, and make the best of the voice recognition software which we made, let your hands be free to do whatever tasks they need to do!

Products mentioned

, , , , , , ,

By
Firmware developer at MikroElektronika and STEM enthusiast. From DNA to DMA, I want to know it all!



Leave a Reply

Your email address will not be published. Required fields are marked *