Philip English

Robotics Enthusiast, Director, Investor, Trainer, Author and Vlogger

Aldebaran NAO Tutorial Video 3 “Speech Recognition”

Aldebaran NAO Tutorial Video 3 Speech Recognition

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 itfs 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 itfs 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. Letfs 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 wefre just going to check to see if hefs still connected. Yep! he is connected up. Brilliant! I need to see if hefs connected up to the browser as well.

Speech Recognition

  • 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 doesnft actually say it like not an actual word like there with gNAOh.

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 gHelloh and g5h there so wefre 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 gNAOh.

So we go back into the spanner. What Ifm gonna do is If I’m gonna copy and paste it.

Cause in this way there will be no spelling mistakes and itfs gonna be exactly the same if itfs a capital gNh or if itfs 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 oh. 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 whatfs listening and this is whatfs gonna be coming out.

Now we actually want NAO to do something when he hears the word so what we do is wefre gonna go and grab the say commands again.

So audio, voice and say from one of the earlier tutorials and wefre 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 letf 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 wefre gonna say, gHello, I did not understand youh ok. And then simply we go up and we connect each one of these say boxes up obviously to the corresponding word gnaoh, gr 2 d 2 and gc 3 p oh.

And on here, say, gHello. Yes I am NAOh and then the next one, gHello, yes I am r 2 d 2

and the next one, gHello, I am c 3 p oh. 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 doesnft 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 letfs give it a go with NAO sitting next to me. So letfs hit play.

Philip:  Nao

Speaker:  Hello. Yes I am NAO

Brilliant! Ifmgonna 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 letfs try something else. Letfs see if he gets it right or wrong. Letfs say we have a different word.

Philip: Cat

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! Thatfs 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 hefll be able to understand what youfre 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 ifll see what i can do. Thanks guys and ifll see you next time.

I will see you next time.

Hope you enjoyed the blog!

Aldebaran NAO Tutorial Video 3 “Speech Recognition” YouTube: https://youtu.be/5pMx-K7AnEA

Philip English: https://philipenglish.com

Sponsor: Robot Center: http://www.robotcenter.co.uk

You might be interested in …