Virtual desktop assistant is an awesome thing. If you want your machine to run on your command like Jarvis did for Tony. Yes it is possible. It is possible using Python. Python offers a good major library so that we can use it for making a virtual assistant. Windows has Sapi5 and Linux has Espeak which can help us in having the voice from our machine. It is a weak A.I.
- pyttsx3: pyttsx is a cross-platform text to speech library which is platform independent. The major advantage of using this library for text-to-speech conversion is that it works offline. To install this module type the below command in the terminal.
pip install pyttsx3
- SpeechRecognition: It allow us to convert audio into text for further processing. To install this module type the below command in the terminal.
pip install SpeechRecognition
- webbrowser: It provides a high-level interface which allows displaying Web-based documents to users. To install this module type the below command in the terminal.
pip install webbrowser
- Wikipedia: It is used to fetch a variety of information from the Wikipedia website. To install this module type the below command in the terminal.
pip install wikipedia
Methods used for Virtual Assistant
1) Speak Method
Speak Method will help us in taking the voice from the machine. Here is the code explanation of Speak Method
2) Take query method
This method will check for the condition. If the condition is true it will return output. We can add any number if conditions for it and if the condition satisfy we will get the desired output.
3) takeCommand method
This method is for taking the commands and recognizing the command from the speech_Recognition module
4) Hello method
This is just used to greet the user with a hello message.
5) Main method
Main method is the method where all the files get executed so we will call the Take_query method here so that it can recognize and tell or give us the desired output.
- Python | Create a simple assistant using Wolfram Alpha API.
- Voice Assistant using python
- Personal Voice Assistant in Python
- Build a simple Quantum Circuit using IBM Qiskit in Python
- Build a basic Text Editor using Tkinter in Python
- Build a COVID19 Vaccine Tracker Using Python
- Build Fuel Price Tracker Using Python
- Create virtual environment using venv | Python
- Using mkvirtualenv to create new Virtual Environment - Python
- Creating and updating PowerPoint Presentations in Python using python - pptx
- Send message to FB friend using Python
- Whatsapp using Python!
- Twitter Sentiment Analysis using Python
- Tracking bird migration using Python-3
- Send mail with attachment from your Gmail account using Python
- Speech Recognition in Python using Google Speech API
- Reading and Generating QR codes in Python using QRtools
- Performing Google Search using Python code
- Python | Plotting Google Map using gmplot package
- Tweet using Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.