Shop OBEX P1 Docs P2 Docs Learn Events
Propeller speech recognition robot — Parallax Forums

Propeller speech recognition robot

NikosGNikosG Posts: 705
edited 2012-01-02 15:40 in Robotics
Introduction:
This project presents a differential drive robot that has two continuous rotation servos. The board of the robot is the popular “Propeller Demo Board” of Parallax. The Robot has the ability to recognize voice commands from the user and then it performs the corresponding movements.
The project is based on “Goertzel Speech Recognition Demo” introduced by Phil Pilgrim. When I saw Phil’s project I became so exciting and I decided to build a robot able to recognize the four basic movement commands: “FORWARD”, “BACKWARD”, “RIGHT” and “LEFT” in order to perform these movements according the user’s desire. Instead of a TV monitor, the robot uses 3 different LED s (Green, Red and Yellow) to interact with the user. First the user must teach the robot the four commands. For this reason the robot can hear and learn a command pronounced by the user when the Red LED is blinking. If a voice command is not very “clear” and the robot is not able to understand it the Yellow LED is blinking. The Green led is blinking when the robot has successfully recorded and learned a voice command or has understood a voice command and it is ready to perform the next recording or the next movement.
attachment.php?attachmentid=79904&d=1301963356
The hardware and the design:
If you already have a BoeBot and a Propeller Demo Board it is very easy to create a Propeller speech recognition robot. The only you have to do is to remove the”Board of Education” from the Boebot and replace it with the Propeller demo Board. In addition you need three LED s (Red Green and Yellow) and some resistors to build the appropriate circuit on the Propeller demo board’s breadboard. If you don’t have a Boebot here is the list of hardware you need and you can find from Parallax store:
Propeller Demo Board
Boe Bot Chassis
Polyethylene Ball 1"
2 X Boe-Bot/SumoBot Wheel & Tire
2 X Parallax (Futaba) Continuous Rotation Servo
4AA Battery Holder
1 X Green LED
1 X Red LED
1 X Yellow LED
2 X 1K ohm, 1/4 watt resistor
3 X 220 ohm, 1/4 watt resistor
If you build your Propeller speech recognition robot with the hardware that I suggested above, your robot will looks like this:
attachment.php?attachmentid=79900&d=1301963348
I give you a Skethup schematic instead of a real image because I didn’t use a BoeBote to build my Propeller speech recognition robot. Although I had two BoeBots in my lab I didn’t use them because I had bounded them in other projects so I decided to build a new simple robot platform by myself.
I used a simple homemade chassis from plexiglas and two homemade aluminum servo adapters to adapt the two servos on the chassis. The plexiglas chassis has in the middle a square hole to bind a 7,2 V rechargeable battery. The wheels have 4,7 cm diameter each and are smaller than the BoeBot’s wheels.
attachment.php?attachmentid=79901&d=1301963350
I also give you a 3d eDrawing file: (Propeller speech recognition robot Drawings.rar) where you can see both models with full details.
Note: You need the viewer 3D eDrawing Viewer Download (viewer)
The circuit of the robot is the following:
attachment.php?attachmentid=79903&d=1301963354
Here you can see a video with the construction and the operation of the robot.
The software:
The software of the robot is written in spin code. To be honest I don’t believe that I have written any new code. I would say that my work was mainly a montage of already existed spin code that I found through the Parallax Forums. As I told you before the code is based on the “Goertzel Speech Recognition Demo” by Phil Pilgrim. I made some small changes in this code such us the way that the robot interacts with the user. I removed the TV output commands and I replaced them by the three blinking LED s commands. I also added some code from “Control Two Servos.spin” file by PE Kit Servo Control v1.4 in order to make the robot to move according the voice commands. I have also changed a bit the “Servos for PE Kit.spin” in order to work properly with the rest code. The code you have to run is the “Speach_REC_Robot_4_commandsVer2.spin” in conjunction with the objects: ”goertzel.spin”, and “Servos for PE Kit_nikos”. All the necessary code is included in the “Speach_recognition_Robot_Code.rar” file.

Comments

  • HumanoidoHumanoido Posts: 5,770
    edited 2011-04-09 20:33
    Nikos G., this is a fantastic project! The level of detail is remarkable and the implications of a human speech commanded system is definitely profound and far reaching! Keep up the outstanding excellent work and I look forward to seeing project updates as they are completed.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-04-09 21:27
    Nikos,

    Very nicely done! Not to mention: a well-produced video! :)

    -Phil
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-04-10 20:59
    It had trouble discerning 'Forward' from 'Backward', their having "-ward" in common. Likewise there was trouble with the Greek words for Left and Right which sounded like they had some 'commonality' too (are they literally translated, 'left' and 'other left'?)
    What if you used the English 'Forward' and 'Right' and the Greek words for 'Backward' and 'Left', or the other way around. They're all markedly different then. Any difference?
  • WhitWhit Posts: 4,191
    edited 2011-04-11 19:20
    Great project NikosG. Thanks for the excellent documentation and video.

    @PJ - I like the idea of mixing English and Greek to avoid common sounding words.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-04-12 14:18
    An option that you may want to try is using a wireless microphone setup. Some of the receivers are pretty small and could mount directly on the robot. That way you are speaking directly into a headset instead of across the room. You may have a better chance of picking up your voice instead of interference from the servo motor noise, etc.

    Robert
  • ercoerco Posts: 20,255
    edited 2011-04-15 14:49
    Ennai akrivos afto poo thelo. Efharisto poli!

    Great project, NikosG!
  • graffixgraffix Posts: 389
    edited 2011-04-17 14:23
    wrote:
    I can't read the speech recognition robot code.Is there a way to translate it to spin? Or ?
  • NikosGNikosG Posts: 705
    edited 2011-04-19 12:13
    Dear friends,
    Thank you for your encouraging comments. Opinions from people like you have a special value for me!
    Phil I hope that the changes I have made in your code doesn't make you crazy :) I feel that I make a sacrilege
    when I remove or impede commands in your code.!!! (Your code is very sophisticated and I realy feel fear when I try to change something!!!)
    The idea of mixing English and Greek suggested by P J Allen and Whit is amazing!!! Thank you very much !!!
    This idea improves the effectiveness of the robot and gives me a practical solution in the new challange that I
    face right now.A new command menu with 6 voice commands. I design an educational activity with the Propeller speech recognition robot ispired by the whell-known educational software.
    I have some difficulties but I hope that I will be able to solve the problems soon.
    The wireless microphone setup suggested by RobotWorkshop is very interesting. I saw this video [url=
    ] Speech Controlled Parallax Bot [/url]. I think that this robot must use this method. Unfortunately the creator doesn't give more information. But the result is amazing!
    erco, you are surpise me! your Greek are perfect :) Thank you very much! (Kalo Pasha! = Hapy Easter!)
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-04-19 12:45
    NikosG wrote:
    Phil I hope that the changes I have made in your code doesn't make you crazy...
    No, of course not! The program is MIT licensed and exists to modify and mold to your own ends. I'm honored that you could make such good use of it.

    BTW, in the "wireless mic" video, I believe the verbal commands were being interpreted by a PC program before being forwarded to the BoeBot in digital form over an RF link.

    -Phil
  • ercoerco Posts: 20,255
    edited 2011-04-20 01:56
    @NikosG: Thanks, before kids I enjoyed world travelling & learning languages, but my Greek is neither perfect nor terribly PC. My favorite expression to work into a conversation? Tha fas ksilo! Rough translation: "eat wood", as if hitting someone in the head with a big stick. So much for international diplomacy...

    Kalo Pasha to you as well!
  • graffixgraffix Posts: 389
    edited 2011-04-25 15:38
    graffix wrote: »
    I can't read the speech recognition robot code.Is there a way to translate it to spin? Or ?

    i downloaded this to open the .rar file for windows 7

    http://www.7-zip.org/
  • NikosGNikosG Posts: 705
    edited 2011-04-27 05:23
    An educational robotic activity using the Propeller speech recognition robot
    The question that arises after the construction of the Propeller speech recognition robot is how we can use it in a class for educational purposes. Although the programming code is very sophisticated and it is more suitable for high level programming activities, the use of the robot is very simple and it consist an excellent tool in order to introduce the idea of the programming. In my opinion we can use this robot even with primary school students or smaller children because the user can program the robot only with the voice and it is not necessary to know any programming language or the use of any computer menu and command.
    One idea is to imitate the activity “Driving a car” from “Motion Planning” software
    In this activity the user tries to drive a virtual car using a six-command menu. The final goal is to drive a green car from the start, and park it in the parking place.
    attachment.php?attachmentid=80669&d=1303906231
    The six command menu moves the robot forward and backward and it has also the ability to make the robot to do arcs.
    attachment.php?attachmentid=80670&d=1303906235
    In order to do this activity using the propeller speech recognition robot we must create a similar menu with 6 voice commands. Personally I used mixing English and Greek command menu to avoid common sounding words as it is suggested by J. Allen and Whit.The six commands are the following:
    Command-1: The robot makes a Front Left Arc (VOICE Command: “LEFT”)
    Command-2: The robot moves FORWARD (VOICE Command: “FORWARD”)
    Command-3: The robot makes a Front Right Arc (VOICE Command: “RIGHT”)
    Command-4: The robot makes a Rear Left Arc (VOICE Command: “ARISTERA”) (I used the corresponding “Left” in Greek language)
    Command-5: The robot moves Backward (VOICE Command: “PISSO”) (I used the corresponding “Backward” in Greek language)
    Command-6: The robot makes a Rear Right Arc (VOICE Command: “DEKSI”) (I used the corresponding “Right” in Greek language)

    Then we need a flat surface in which we put the speech recognition robot and we draw the parking place. After that we turn on the robot and we teach it the six commands using our voice. You can choose every voice command you want. Another good idea is to use the numbers 1,2,3,4,5,6 instead of the commands that I used above. But it is very important to keep the correct order of the commands when we teach the robot. Otherwise we must change the command order inside the SPIN code.
    Then we try to park the robot in the parking place. The winner is the person who parks the robot using the less commands. Here is a video that explains activity:
    The new spin code for this activity is the file:” Speach_REC_Robot_6_commands.spin”
    This code except from the files: “Goertzel Speech Recognition Demo by Phil Pilgrim” and
    “Control Two Servos by PE Kit Servo Control v1.4”, it is also use some code from
    ''ServoContinuesRotation by CRpropellerCode-v2.0 “, in order to make the robot move in arcs.
    If you find interesting this activity you can see the Motion Planning software in order to take ideas and create similar “moving car” activities with your students or with your children!

    Nikos Giannakopoulos
  • vivekrk44vivekrk44 Posts: 3
    edited 2011-10-14 00:52
    Hey ive been trying this out and it does not work for me :( , im using a propeller DIP on a breadboard , copied the microphone circuit from the demo board example and also using the serial programmer. When i run the program i have to bring my mouth very close to the mic in order for it to recognise that ive spoken , and most of the time i say forward i get left and it rarely recognises the words right and back. plus ive double checked the negative and positive terminals of the mic im using , can someone help me out ?
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-10-16 06:10
    vivekrk44 wrote: »
    Hey ive been trying this out and it does not work for me :( , im using a propeller DIP on a breadboard , copied the microphone circuit from the demo board example and also using the serial programmer. When i run the program i have to bring my mouth very close to the mic in order for it to recognise that ive spoken , and most of the time i say forward i get left and it rarely recognises the words right and back. plus ive double checked the negative and positive terminals of the mic im using , can someone help me out ?
    Try running the audio program by Chip Gracey in the OBEX, talk into the mic at varying distances and use a headset to listen for any anomaly. It's a good diagnostic to check for microphone noise and response. The circuit may need a different electret.
  • vivekrk44vivekrk44 Posts: 3
    edited 2011-10-18 10:36
    Humanoido wrote: »
    Try running the audio program by Chip Gracey in the OBEX, talk into the mic at varying distances and use a headset to listen for any anomaly. It's a good diagnostic to check for microphone noise and response. The circuit may need a different electret.
    hi thanks for your reply , i checked that out and found that its for the propeller demo board , and the headphone amp ic is not available in my country , i live in dubai UAE , so is there any other method to check it out ?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-10-18 11:33
    Notice in the Demo Board schematic that the headphone circuitry consists of an RC network followed by the headphone amp. You will need the RC network, but you can replace the headphone amp with any amplifier designed for a line input. For example, you could use pretty much any amplifier designed for computer use to feed speakers or headphones from a computer's audio output.
  • vivekrk44vivekrk44 Posts: 3
    edited 2011-10-20 00:43
    Mike Green wrote: »
    Notice in the Demo Board schematic that the headphone circuitry consists of an RC network followed by the headphone amp. You will need the RC network, but you can replace the headphone amp with any amplifier designed for a line input. For example, you could use pretty much any amplifier designed for computer use to feed speakers or headphones from a computer's audio output.

    hey yea ive used the rc filter with the same values and the scme circuit , btw i have an external speaker which has line in from the computer so ill take the amp from there and post the results. and thanks a lot for the help
  • NikosGNikosG Posts: 705
    edited 2012-01-02 15:40
    Hello everybody and Happy New Year!
    The Greek robotic internet site Grobot.gr has published the "Propeller speech recognition robot project"
    You can see the publication in the home page of the above site (in Greek language )
Sign In or Register to comment.