The Voice Assistant Project is a Python-based desktop application designed to provide a variety of functionalities through voice commands. This virtual assistant can perform tasks such as telling the time and date, telling jokes, searching Wikipedia, and more.
- Voice Commands: Interact with the assistant using voice commands.
- Time and Date: Retrieve the current time and date.
- Jokes: Hear random jokes to lighten up your mood.
- Wikipedia Search: Search Wikipedia and receive a summary of articles.
- Web Browsing: Open websites such as YouTube, Google, and Stack Overflow.
- Media Control: Play music from a specified directory.
- Screenshot Capture: Take and save screenshots.
- Memory: Save and recall user-provided information.
- Translation: Translate text into different languages.
- To run the Voice Assistant Project, you need to have the following software and libraries installed:
-
Python: Version 3.6 or higher is required. Python is the programming language used for the project.
-
Operating System: The project is designed to run on Windows, but it can be adapted to other operating systems with minor modifications.
This project utilizes several Python libraries to achieve its functionality:
-
pyttsx3
: A text-to-speech conversion library in Python. It allows the assistant to speak responses to the user. -
datetime
: Provides classes for manipulating dates and times. Used to get the current date and time. -
speech_recognition
: Recognizes speech and converts it into text. Enables voice command recognition. -
wikipediaapi
: A Python wrapper for the Wikipedia API. Allows the assistant to search and retrieve Wikipedia summaries. -
webbrowser
: A module to open URLs in a browser. Used to open websites. -
os
: Provides a way of using operating system-dependent functionality like reading or writing to the file system. -
random
: Implements pseudo-random number generators. Used to select random jokes and songs. -
pyautogui
: Provides functions to control the mouse and keyboard. Used to take screenshots. -
googletrans
: A library for translating text using Google Translate API. Allows translation of text into different languages.
To set up the Voice Assistant Project, follow these steps:
-
Clone the Repository:
git clone <URL> cd desktop-voice-assistant
-
Set up virtual environment:
- For Windows:
python -m venv .venv
- For macOS/Linux:
python3 -m venv .venv
- For Windows:
-
Activate the virtual environment:
- For Windows:
.venv\Scripts\activate
- For macOS/Linux:
source .venv/bin/activate
- For Windows:
-
Install Requirements
- Install all the requirements given in requirements.txt by running the command
pip install -r requirements.txt
- Install all the requirements given in requirements.txt by running the command
-
Run the Project
- Run the main script:
python assistant.py