Hi Everyone and on this video we look into NAO speech recognition so if you like talking to your robot want him to hear and understand whatever you’re saying, then stay tuned
Hi guys I’m Philip English from robophil.com. Now on this video we’re looking to do some program member on how to use NAO speech recognition functions.
The outer part of a NAO robot comes with four microphones around itfs head which it uses to listen to sounds around it.
Unlike humans though, who can process sound nearly instantaneously, the NAO needs to listen to sound at a specific time.
After it hears a human speech it uses its built it algorithms to convert the sound into words that it understands.
To get this one to work, we need to tell the NAO what words to listen for, whether itfs a yes or a no or a cat or a dog.
When the NAO processes a sound, it can classify it to a Yes sound or a No sound or it may not recognize a sound that classify neither the two. Once the word is recognized, the NAO can then be programmed to react in different ways.
Alright! Jumping straight to it guys. Letfs have a look at how we can get NAO speech recognition work it.
So what we have to do is we go into choreograph and see we have NAO sitting there.
Again wefre just going to check to see if hefs still connected. Yep! he is connected up. Brilliant! I need to see if hefs connected up to the browser as well.
- Go over to the audio folder
- Go in the voice folder
- Select a speech recognition behavior
- Drag it to the main box
- Connect up a noodle to the robot
- Click the Spanner button (You will see that there is a word list in there. This is the list that we want to play with)
- Type in “NAO” on the first one
- Type in gr 2 d 2 for the second word
- Type in “c 3 p o” for the third word
Now I want to keep the spaces between gr 2 d 2 so it says gr 2 d 2″ and doesnft actually say it like not an actual word like there with gNAOh.
Now, what we want to do is we want to obviously find out what happens when the word goes through him and we wanna actually set a behavior for each time he hears a certain word.
- Go back into the folders
- Go to the flow control
- Scroll down and select the switch case
- Drag the switch case into the main box
Now as you can see the switch case box here already has gHelloh and g5h there so wefre just gonna add an extra row but we wanna change this word in it so we have the three words that the NAO is gonna say in here.
So we have hello here. Now we wanna change that to gNAOh.
So we go back into the spanner. What Ifm gonna do is If I’m gonna copy and paste it.
Cause in this way there will be no spelling mistakes and itfs gonna be exactly the same if itfs a capital gNh or if itfs a capital word or not a capital word then it will not work and the NAO will not recognize it.
So copy that one across and then we will copy this one across.
We always wanna put the brackets in there as well so it would recognize it as a saying.
And then the gc 3 p oh. There we go. add them in there as well. It needs the quotation mark so it sees it as a word.
So from that we will then plug in the speech recognition box into the robot so we grab this little noodle here and plug it in.
So this is whatfs listening and this is whatfs gonna be coming out.
Now we actually want NAO to do something when he hears the word so what we do is wefre gonna go and grab the say commands again.
So audio, voice and say from one of the earlier tutorials and wefre gonna produce a few of these, one there, one there and one there. and then we also want one for if he says the wrong word as well so letf start with that one.
So if the, say a word to NAO and then he does not recognize it then it will go through and end up through this little box.
So we bring it down here and this one wefre gonna say, gHello, I did not understand youh ok. And then simply we go up and we connect each one of these say boxes up obviously to the corresponding word gnaoh, gr 2 d 2 and gc 3 p oh.
And on here, say, gHello. Yes I am NAOh and then the next one, gHello, yes I am r 2 d 2
and the next one, gHello, I am c 3 p oh. There we go, okay.
Now what we wanna do is what happens is when the NAO starts listening, he will keep on listening so we wanna stop any loop backs or any feedbacks.
The way you do is is that you drag another noodle from here and you put it into the cross here.
And you do the same with the one where it doesnft recognize a name, out into the cross and this will stop any loop back or feedback.
Now if we try that, hopefully we should have a working speech recognition behavior. So letfs give it a go with NAO sitting next to me. So letfs hit play.
Speaker: Hello. Yes I am NAO
Brilliant! Ifmgonna try again.
Philip: r 2 d 2
Speaker: Hello. Yes I am r 2 d 2 and the last one.
Philip: c 3 p o
Speaker: Hello. I am c 3 p o
Now letfs try something else. Letfs see if he gets it right or wrong. Letfs say we have a different word.
Speaker: Hello. I did not understand you
So there we go. Everything is working perfectly there.
Now if we go into speech recognition little spanner again, they have this threshold which I mentioned right at the start now this is how close the word sound.
Say if you want, have a play with this. Crank this up to 90 or down to 0 and see what the results that you actually get from this tutorial.
But brilliant! Thatfs it guys and well done! You learn how to do speech recognition.
Well done guys!
You can now have your long conversation with your NAO robot and hefll be able to understand what youfre talking about.
Have a play with linking sounds together and different actions and behavior and see if you can have a fluid conversation with your NAO robot.
Now if you liked this tutorial and you wanna see the next one in the collection and please hit the subscribe button and keep up to date with the latest videos that come out please have a look below as well for the related links of the video as well as more information about the NAO robot. If you have any questions or you wanna see any other related tutorials then pay me an email over at robophil.com and ifll see what i can do. Thanks guys and ifll see you next time.
I will see you next time.
Hope you enjoyed the blog!
Aldebaran Basic Tutorials – https://www.youtube.com/playlist?list=PLma9tC7VHPpi8Bz4i2P5FuMlfMhjZ3nJ-
Robo Phil Robot Tutorials – https://www.robophil.com/training/
Aldebaran NAO Tutorial Video 4 “Senses” – https://www.youtube.com/watch?v=0J5TA_ao6Rc&index=4&list=PLma9tC7VHPpi8Bz4i2P5FuMlfMhjZ3nJ-
**Click Below to SUBSCRIBE for More Videos:
Robo Phil Facebook – https://www.facebook.com/RoboPhilip
Robo Phil Twitter – https://twitter.com/RobotPhilip
Robo Phil Website – https://www.robophil.com
Aldebaran NAO Product – http://www.robotcenter.co.uk/collections/aldebaran-robotics-nao