Home » Flowstone Workshop » Flowstone Workshop 18

Flowstone Workshop 18

Flowstone-HeaderVOICE RECOGNITION Command Your Robot!

FLOWSTONE WORKSHOP 18-6FLOWSTONE WORKSHOP 18-7It wasn’t that long ago that voice recognition was a pipe dream. But now that advances in processing power have made this technology almost commonplace with most smart phones incorporating some form of voice recognition built in, how can we use this to command our robots?

FLOWSTONE WORKSHOP 18-9

One option is to determine a way to attach an Android smart phone to the robot and then write an Android application to transmit the instruction signals from the phone to the robot hardware. Another way would be to use dedicated hardware which is surprisingly accessible and lost cost.

The benefit of being able to use a phone system is that the voice recognition applications in phones are pre-programmed to recognize words spoken in English from any- one… provided they speak clearly. The hard- ware systems that are available today, generally, are limited to recognizing a single voice and need to be trained to recognize the need- ed word and phrase commands. Hardware solutions can also be less robust given that another person will have difficulty initiating verbal commands effectively and variances in background noise can reduce the chances of recognition dramatically. An advantage to using hardware is that you can use any language or even make up your own words!

THE HARDWARE

We opted for the hardware solution and decided to use a Voice Recognition Click board from Mikroelektronika connected to our own FlowPaw hardware. The VR Click board comes with a nice PC application which records your own voice and assigns an ID to each command. When the board recognizes a command it sends a serial ID to the FlowPaw board which in-turn sends it back to the PC via FlowStone so you can make decisions on what to do with it. The VR Click board can process up to 200 voice commands which should be enough for most applications.

PLUG & PLAY

The MikroElektronika system is quite easy to use, the board is connected to the PC via USB, the recording application lets you hit “record” to say your sentence and it automatically assigns the sentence an ID. Set the serial mode plug into your FlowPaw board and you’re ready to start working in FlowStone. From here you connect the soft- ware equivalent of the Voice Recognition board to the FlowPaw module and you’re off. Each time you say a pre-programmed word the board detects it and outputs its unique ID (phrase, 1,2,3,4 etc.). Now the fun starts – what can you command?

FLOWSTONE WORKSHOP 18-8

YOUR WISH IS MY COMMAND

Once in the FlowStone environment the VR IDs can be used to trigger just about any- thing, one of the first things we did was us the IDs to turn on some LEDs on a screen, Red, Yellow, Green, etc. but then we started to get creative. One fun project was to pro- gram the names of music tracks and command Spotify using their unique track URLs, but before long we had it mounted on our FlowPaw rover with the idea to drive it around using voice commands!

FLOWSTONE WORKSHOP 18-10COME ON ROVER!

One of the special things about the FlowPaw/FlowStone combination is that if you use the Bluetooth wireless Claw module, your robotics hardware is free to roam but still have all of the main processing happen on the PC via telemetry. The big advantage of this is that you can leave your robot hardware on the floor and concentrate on developing your code in real-time on the fly on the PC. This saves hours when programming as there is no code/compile/download/test cycle.

EXAMPLE

Imagine we want our Rover to advance for 1 second on a voice command. We could pro- gram the VR Click to recognize “Forward One” and let’s say the output id assigned is ‘01’ in FlowStone. We would then need to code “if id = 01 turn on both wheel motors for one second”. We could do this in one of two ways: 1) using a FlowStone Equals module and a Timed Pulse module to select a motor value of 999 using the Select module, Or 2) using the Ruby code module where we could code the decision and use an event timer. Both work equally well so the choice is up to the programmer. We can see how building up each command to output different values a robot command system can become quite sophisticated. And we can, of course, combine any combination of decoding to control a range of actions/activities. If you happen to have an X10 home automation control box, you can even turn the lights and TV on and off, etc.

CONCLUSION

Getting hardware voice recognition capability into a robot is now a reality and it is surprisingly easy to use thanks to a new breed of Voice Recognition chips. In this project we were able to get things going in a matter of minutes and working with Voice Recognition connected to and controlling various pieces of hardware is great fun as well as educational. There can be limitations like single voice and sensitivity to background noise but on the whole it proves to be quite reliable and consistent.

Links

DSP Robotics, dsprobotics.com
Mikroelektronika, mikroe.com

Leave a Reply

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