Smart AI Robot With Gender Recognition Using Voice

“ Robot With Smart Sense its can now recognise your gender even if it is not seeing you can ”

“ We humans have extraordinary capability through which we can recognise estimate the gender without seeing the face or body of person just by listening to persons voice”

Previously we have made a smart robot that can recognize the face but be human and have some extraordinary capability that is not available in any robot. The smart AI robot can recognise the face as well as can detect the age and gender of the person using the voice of person , the robot now does not need to see the face and body of the person to recognise them , it can cnow sense the gender and person using the voice tone.

So let’s start the project with collection of the following components Here components from previous version of robot

Next you have to assemble the robot as described in the article then we have to start working for this version of robot.

Bill Of Materials

First of all we need to assemble the robot face as in the previous version of the article then we have to and the voice bonnet to the robot.

First of all we have to safely remove the RPI4 board and then Attach the AIY Voice bonnet on the Raspberry Pi 4 keeping in mind the pins matching each other on raspberry pi and bonnet.

Next we have to attach the speakers to the speaker out pin of Raspberry Pi Bonnet.

Now we are ready to use the Raspberry Pi Voice Bonnet On Our Smart AI Robot.

Now Booth the Raspberry Pi on robot and then Open the linux terminal and install the required Modules and library into the Raspberry Pi .We already have installed the following library in previous version of robot


Here we need to install few extra library from previous version using the following commands

sudo pip3 install pyaudio
sudo pip3 install speechrecognition
sudo  pip3 install voicegender

After install of the above libraries we are now all set for coding part


Open the Python IDLE and then code as following

First we have to import the required library and modules in code.  Here we have imported the time , threading for multiple processing like we need to record the audio and check the but push at same time then we need to import the espeak for speech synthesis and the aiy board library to access the aiy board recording and play back function.Nest for recognition of voice and sensing the gender of person we import the voice gender library in the code

After that we have define the filename where we temporarily save the person’s voice so that we can process them as per our need.

After that we will  create the main function where we create the code that check the button press event on bonnet if the it detect the press of button then it will automatically start the voice recording function and record the users voice until the next button press event and then it saves the voice recorded in the test.wav file after that it call the voice gender function that process the audio and then classify the audio tone as male and female and then using espeak it will tell if the speaker is male or female and also play back the audio.


Now save the code and run the code then press the button on bonnet and and say hello or anything and then again press the button on the bonnet and wait a few sec the robot strat speaking to you and tells you your gender is male or female and playback your recorded audio as well . So here it is our smart AI robot that can recognise the us and our gender just like we Humans and tell about our gender


We will be happy to hear your thoughts

Leave a reply

Login/Register access is temporary disabled
Compare items
  • Total (0)