Maker.io main logo

XRP Voice Recognition

2024-06-07 | By Jorvon Moss

Audio Voice Recognition

The XRP is a special pico-based board that comes with a kit that's great for beginners. I decided to use the XRP board to show you can use just the board to make cool stuff. With the help of my friend Travis, we've put together the XRP and the DFRobot voice recognition system. This system makes use of the voice recognition board to recognize voice commands to control the servo and the motors. For this setup, we focus mainly on controlling the servos and motors using voice commands, but I'll show you parts of the code that you need to edit if you wish to change up the commands.

I am using the Qwiic connection to the DFRobot voice recognition board.

XRP Voice Recognition

Make sure you have the proper libraries installed, which I have uploaded. The two main ones are “neopixel_test” and “DFRobot_DF2301Q_convertedtoupy”.

Click here to download the code and library files for this project.

If you look at lines 55-90 in the “main” code, you’ll see the commands I have pre-programmed.

XRP Voice Recognition

I set the Servo2 pin to work as an RGB LED pin. I can set the colors by using the wake word and saying, “Set to red” or “Set to Green”.

I can also control the motors by saying “Go Forward” or “Retreat.” I have Servo1 pin controlling a normal Servo, and I can have it move by saying “Open the door” or “Close the door”.

The “elif cmd_id ==” is how you set the voice commands.

XRP Voice Recognition

These are some of the pre-prepared voice commands. You can change this in the code by changing the ID number that is related to the fixed command word.

This is a fun, quick build, and a great way to use voice commands and get them working in your project.

制造商零件编号 ROB-22727
XRP CONTROLLER
SparkFun Electronics
制造商零件编号 SEN0539-EN
GRAVITY VOICE RECOGNITION SENSOR
DFRobot
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum