Hey, Siri. What’s the weather like in New York tomorrow? And what about in San Francisco?
And in Miami? Thank you! If you take a step back and think about this, do you realize
that I just had an actual conversation with a nonliving object? A few decades ago, compu-ters
could barely get past the basic functions of a machine, let alone talking to a human.
But with the rise of natural language processing, that all changes. But what gives the computer
the power to actually understand the exact sounds of the person and make sense out of
it all? Well this is thanks to the powerful subfield of AI called Speech Recognition,
and in this video I’ll walk you through what this field is and how it works
its magic. So broadly, Speech Recognition allows for the recognition and translation
of spoken words into text. The most famous examples of a speech recognition software
are smart speakers, like Alexa, as you saw in the beginning of the video. Another example
of a speech recognition software is the infamous Google translate that might help you with
your Spanish homework now and then. But you might still be wondering how exactly all of
this works. How can a computer actually recognize speech? Well speech recognition works by breaking
down audio into individual sounds, converting these sounds into a digital format, and using
algorithms and models to find the most probable word fit in that language. To better understand
this, let’s dig deeper on each of these steps. So when people speak, they create vibrations
in the air. A device known as the analog-to-digital converter transforms this sound wave into
binary data that the machine can understand. The ADC also filters the sound to remove unnecessary
noise, and normalizes the sound and speed of the speech, to match the prerecorded samples
in the machine’s device. It then separates the data into different bands of frequency,
which the Spectrogram then analyzes further. On the x axis, there is time, and the yaxis
plots the frequency of a sound (as in high pitches versus low pitches). You see, all
words are made up of distinct vowel sounds that each have different frequencies, which
are recorded on this device. The areas that are brighter signify high frequencies, and
the areas that are darker signify low ones. All vowel sounds have different frequency
patterns, which can be pre-programmed into the computer, allowing it to recognize when
a spoken sound matches a specific vowel sound. These here, are known as phonemes, which are
the smallest elements of a language that make up its base. The computer then runs these
phonemes through complex models that compare them to words in its built in dictionary.
But there’s a catch. Human language isn’t so simple. We all know that people speak with
different accents, slangs, and mispronunciations, and these variations aren’t in the computer’s
dictionary. So how would the machine be able to figure out that a British saying “baahn”
means the same as an American saying “barn”? Well, this is where models such as the Hidden
Markov Model come in. Now these models are too complex to fully understand in this video,
so we’ll get to these in a later video when we talk about Machine Learning and Neural
Networks. But for now, just know that Speech Recognition uses models such as the Hidden
Markov Model to understand the intricacies of our human language. So, coming back to
the smart speaker example that we began with, we now know how Alexa was able to understand
the sounds coming out of my mouth. But how was she able to understand the meaning and
context of my words and respond back with valuable output? Well, this is where Natural
Language Processing comes in, which we discussed in my last video. After Speech Recognition,
it is up to NLP to figure out the exact meaning and purpose of the human’s words. Now let’s
take a quick look at another example. I saw a case-study on Coursera on how a smart speaker
works, and I want to walk you guys through this. And if you’d like to check out this
course, I’ve included a link to it in the description box. Let’s walk through exactly
how Alexa works, which can be broken down into 4 steps. So let’s say that you want
Alexa to tell you a joke. The first step is a trigger word detection, and in this case,
that would be “Alexa”. This means that whenever Alexa hears this phrase, it knows
that a command is coming next. Alexa is programmed with an algorithm that will take in a phrase
said by the human as input and output either a 0 or a 1, depending on whether or not the
phrase matches “Alexa”. Next, Alexa will use speech recognition to detect the next
words after “Alexa”. It will then translate this audio into a text transcript. Intent
recognition is the next step, which is where Alexa will use NLP to figure out exactly what
you are telling it to do, or your intent. It will use another algorithm that takes in
your words as input and match it one of the operations in a pre-programmed list. Lastly,
Alexa will execute your command, in this case telling you a joke. To respond back with words,
it would use speech synthesis which is essentially the opposite of speech recognition. It would
formulate a response in text, take that text, breaks it apart into individual sounds, and
plays the sounds back to back out of a speaker. So, the next time you ask Alexa to tell you
a joke or play some music, you know exactly how she’s doing it. Now Alexa, as you know,
is a bot that you can have voice conversations with. But there are also virtual assistants
that you can chat with without any voice interaction, most commonly known as messenger chatbots.
Text bots exist on various kinds of messaging platforms, so you can chat with a bot directly
on your phone. Additionally, messenger chatbots are often easier and more effective to build
as they don’t require pre-recorded speech responses to user queries. So, in the next
few videos, I’m going to introduce you to the world of chatbots and a free platform
on which you can actually build one yourself – no coding required. And if you’ve enjoyed
learning about Speech Recognition in this video, make sure to give this video a big
thumbs up and comment down below what kinds of voice assistants or text chatbots you use
in your life. And if you are new here, make sure to subscribe and turn on notifications
so you don’t miss any videos that’ll help you on your journey towards mastering artificial
intelligence. Thanks for watching, and I’ll see you in the next one.