Okay I gotta admit, I cheated... I did not develop a super awesome speech recognition algorithm for the Pinoccio... No, no, that would have taken too much effort and... I'm lazy.
I've watched few demo videos of speech recognition on Arduino but nothing seemed to be very convenient and easy to get started.
That's why I have to give all the kudos to a very nice hardware add-on: the SpeakUp click!
There is a lot to say about the SpeakUp so I will try to share a bit of my experience.
First thing I could say is that it does a pretty good job listening and understanding people (like a true friend).
The day I discovered it, I found the underlying principle so simple that I had to give it a shot and I bought it immediately.
MikroElectronica claims it is very easy to get started with: connect it to computer, record a word, speak it and it approves. They also have a very clear manual.
What about in real world? Uh? My first attempts were kinda disappointing...
Overcoming that initial disappointment, I dug deeper into their software.
Mikro got the (very) good idea of adding few parameters that you can tweak:
And these are the two parameters you really want to get familiar with:
For voice recognition (default = 15)
Basically a level of confidence or correlation between a spoken word and a recorded command. The higher this number is, the more likely the SpeakUp will match the audio input to one of the commands. I found 15 to be a bit high as with multiple commands, it would often match the wrong one. I had to be speak very intelligibly to get the command I wanted. I would recommend starting with 12 or 10.
Minimal sound volume level that can trigger a voice command recognition (default = Auto)
You want the SpeakUp to listen to you? Change that setting for sure!
One thing to know is that the "Auto" setting will calibrate during power-up or when you record a command, it listens to ambient noise to define the trigger level for audio command. It might be only just me but once I started playing with this parameter, it was immediately easier to trigger the voice recognition. Once you decide to go for a "Custom..." value, it switches to 50. I'm not sure what's the link to the decibel scale but the lower this value is, the more likely the SpeakUp enters the voice recognition mode. From my personal experience, 50 was a bit high, I had to speak louder than normal. Start with lower value: 40 or maybe even down to 30 if you want to speak from 5-10 feet away (works great by the way).
There is also another parameter that you need to consider, what they call the
The SpeakUp has two ways to communicate a command has been received:
- Play with GPIO: set them high/low, toggle or send a pulse (PWM). Customizable for each GPIO, this is great to get started!
- The SpeakUp module can record up to 200 commands, so if you're up to something that requires tons of voice commands, don't bother with GPIO anymore and switch to UART! Every command is mapped to a number and, if
Notify Master parameter has been switched to UART, the SpeakUp will send that number over the UART TX line. Bingo!
At this point, you should be ready to have the Pinoccio's UART overflowing with voice commands!
Not yet? Oups, I forgot an important part: connecting the two.
You might think "Yuck, the headers are not compatible...".
It's true that, initially, connecting SpeakUp and Pinoccio scout required a bit of cabling and it wasn't looking very neat with two similar size boards sitting side by side... and not convenient either. That's why I'd like to save you the trouble and I've made a quick adapter board
If you are interested and want to order it, follow this link to OSH Park website.
I just received mine and here how it looks, few headers later:
You think you're ready yet? Nah.
Don't forget to communicate your voice commands to the rest of your gang! (else you're in trouble)
I wrote a quick sketch to communicate those to my other Pinoccio (remember, the one with the NeoPixel): go take a look!
Alright, that's all I've got so far. You might wonder what was my original idea behind this quick project.
It still left to test, but my voice controlled scout would ultimately sit on my bike's handlebar.
Its brother is planned to go on the back of my seat and signal my turns.
The big challenge is the road ambient noise + wind and I have to say that I'm pretty pessimistic that it will work at the end, but who knows, maybe it will!