At the end of the lesson, you will be able to:
Let’s begin!
From the time we are born, we hear words and sounds around us. Even before we can speak, we hear some words that we start responding to words like Mama, Dada, Yes, No.
Our brain tries to find patterns to differentiate various sounds and words and categorize them. It may seem as though humans are pre-programmed to listen and understand but it is not so. We have been trained to develop this ability.
Speech recognition technology has been developed on the same lines. Computers are also trained in the same way.
Speech recognition is very complex and a lot of mathematical equations are involved. Let’s break it down into simple steps:
Alexa, Amazon’s virtual assistant AI technology, uses natural language processing, a procedure of converting speech into sounds, words, and ideas.
Here’s how she works:
The Artificial Intelligence extension in PictoBlox has blocks dedicated to speech recognition. Let’s first add the extension in our project:
To execute speech recognition, we have the recognize speech for () s in ().
When the block is executed, the recognition window will open and you will get a specified time during which PictoBlox will record whatever you say. Once recorded, the speech will be converted to the text of the language you spoke in and saved locally.
In this project, we will make our own personal assistant like Alexa.
We will be making a script that will recognize our voice command and analyze it to play the Mario theme song or the Spider-Man theme song. If the command is not recognized, it will say that it didn’t understand the command.
Let’s start.
Download the songs from here:
Follow the steps to set up the Stage:
In this project, we will also use the Text to Speech extension to respond to the user. To add it, click the add extension button and add the Text to Speech extension.
The script is complete. It will look like this:Click the green flag to start the script.