Alexa is a device, just like the google assistant,
SIRI that is voice recognized which is able to
answer all questions which we ask sing a song
tells a joke helps in telling a route and all
With just 15 lines of python code ,this feature can
be enabled and we get an extra-ordinary output as
a result, let’s further see how this is done
THINGS DONE TO IMPLEMENT ALEXA:
1. Installed and imported the python speech
2. Installed and imported the python text to speech
3. Some prompt variables, like voice, listener, rand ecognizer are declared for the making use of the audio signals
4 . Meaningful commands are given for the Alexa
to speak (Will be the output)
GOAL OF THE IDEA :
Creating our own Alexa is more cost-effective and
uuser-friendly( just requires some built-in packages
and some internet connection - NO MONEY)
This will make users feel very good in such a
the ay that, they did not spend much using Alexa
because fortunately, they built it!!!
For this, the idea used is “Jetbrains Pycharm“
which is available for both educational and
Those required packages are
available in toggle, we need to just type the
name of the package, say for example, “python
speech recognition“, click on the first website
that you see and copy the package’s link to the
clipboard and then, in the project file where you
are working with, click on the terminal, and
just paste the link, the package is installed
immediately and then you can import it.
These installed packages are imported in the
coding for a better “audio” output, we can change
it accordingly as our wish to keep it as a male or
a female voice.
Imagine getting an expensive product in your
hand, but you pay nothing!!!! , JUST AWESOME
INSIDE THE CODE:
The respective packages are imported.
A variable is created that is interpreted as a
In case of a microphone or some other audio
troubles, we have the code inside a “try” block,
as it may work or may not.
Inside this try block, all the source commands are
A voice variable is declared that will respond
The required meaningful commands are printed.
Of course, there is an except block, but nothing is
done inside it, so just a “pass” statement is given.
ALSO READ: Characteristics-of-Women
World-class learning for you
– Start learning with Easy Shiksha today and get certified
– Authorized certificate recognized everywhere