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
- Python | Build a REST API using Flask
- 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
- Build a GUI Application to Get Live Stock Price using Python
- Build a Voice Recorder GUI using Python
- Build an Application to extract URL and Metadata from a PDF using Python
- Build a GUI Application to get distance between two places using Python
- Build an Application for Changing PC's Wallpaper using Python
- Build an Application to Search Installed Application using Python
- Build an Application for Screen Rotation Using Python
- Build an Application to extract news from Google News Feed Using Python
- Build an GUI Application to Get Live Air Quality Information Using Python.
- Build an Application to translate English to Hindi in Python
- How to build an array of all combinations of two NumPy arrays?
- Create virtual environment using venv | 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.