Execution of the code
This is the table in the database in which all the commands given by user recorded after complete execution of the code
This is the table in the database in which emojis inputed by the user recorded
This is the table in the database in which review given by the user recorded
Voice assistants like Siri, Cortana or google assistant can do useful things for you like opening applications, searching for information, sending messages and more. While it’s useful the ones you’ve been given. It’s way more fun to make your own. Speech recognition is the process of converting audio into text. This is commonly used in voice assistants like Alexa, Siri, etc. Python provides an API called Speech-recognition to allow us to convert audio into text for further processing. That’s why I have chosen specifically python for this project. This voice assistant behaves as Alexa or Google assistant.
What it does
1) Voice assistant is able to do conversation with you. 2) It is able to do any kind of calculation such as add, subtract, multiply, divide, trigonometric operations, etc. 3) This voice assistant having two voices. i.e., male voice and female voice. We can use any one of them and we can change that voice any time. 4) It is able to give answer of any question. 5) It can open any website, YouTube, Google. We have to tell the name of that website to the voice assistant to open that website. 6) It is able to open any app and file in your device. e.g. Word, Excel, WhatsApp, Gallery, etc. 7) It is able to tell us current time and current, tomorrow, yesterday and some other dates. 8) It can handle whatsApp on voice commands using pyautogui functions. 9) It is able to send mail to other mail id using voice commands. 10) It can click your photo. 11) It can take screenshot. 12) We can set alarm in it. 13) We can play Tic Tac Toe game which I have made using tkinter and also some online games which I linked to it. 14) It is able to do sentiment analysis by inputing emojis. 15) It is able to detect human faces. 16) It can perform brightness control, sound control, night light control, etc. by voice commands. 17) It is able to play some keys of piano. 18) It is able to tell whether the website is down or not. 19) After giving the command to the voice assistant, that command stored in my database. 20) We can give the review to this voice assistant and it will be recorded in the database. and some other functions.... In each if-else condition, I added some words. If this words found in the user’s command or query, then the voice assistant will check this words in each if-else condition till the requirement properly satisfies. Then it will give answer accordingly.
How I built it
1. Required Libraries and modules: 1)pyttsx3 – It is a text-to-speech conversion library in Python 2)PyAudio – It provides Python bindings for PortAudio, the cross-platform audio I/O library. with PyAudio, you can easily use python to play and record audio on a variety of platforms. 3)SpeechRecognition - SpeechRecognition is a library that helps in performing speech recognition in python. It support for several engines and APIs, online and offline e.g. Google Cloud Speech API, Microsoft Bing Voice Recognition, IBM Speech to Text etc. 4)Tkinter - In Python, Tkinter is a standard GUI (graphical user interface) package. Tkinter is Python's default GUI module and also the most common way that is used for GUI programming in Python. 5)datetime - The datetime is the main module for working with dates in python. 6)Sqlite3 – Used to deal with database 7) cv2 - Used for face detection and image capture. 8) pyautogui - Used to automate keyboard and mouse. 9) Some other - calendar, time, math, wikipedia, webbrowser, os, smtplib, winsound, pygame
2. Required Platforms 1)Spyder – For python coding 2)DB Browser – For database 3)Command Prompt - For installation of libraries and modules 4)Web-browser
Challenges I ran into
While making this AI voice assistant, sometimes I faced errors which are very difficult to resolve. But by taking help of internet, I solved this errors.
Accomplishments that I'm proud of
While completing one by one each task by the voice assistant I feel very nice. Now my dream of making AI voice assistant is finally completed.
What I learned
By doing this project I got to know about the python language from basics to advanced level. I got to know about its different modules, libraries and packages used in python. Overall it was very informative project.
What's next for AI Voice Assistant
I can make it more advanced. I can add more functions in it like handwriting recognition, image to text conversion, sign language recognition, object recognition etc.