-
Notifications
You must be signed in to change notification settings - Fork 12
Friday.py Explained
Importing Libraries: The program starts by importing various libraries required for different functionalities such as speech recognition, text-to-speech, web scraping, email sending, image processing, etc.
Class Definitions: Two classes, namely "Person" and "Friday", are defined to store and retrieve the user's name and the assistant's name, respectively.
Function Definitions:
-
speak: This function uses the gTTS library to convert text to speech and save it as an audio file.
-
wish: It greets the user based on the current time and introduces the assistant.
-
jokes: This function generates and speaks a random joke using the pyjokes library.
-
email: Allows the user to send emails by providing the necessary information like email address, password, receiver's email address, and message.
-
quotes: Retrieves and speaks a random quote.
-
news: Fetches the latest news headlines using the News API and speaks them.
-
days: Tells the user the current day.
-
date: Tells the user the current date.
-
screenshot: Takes a screenshot of the screen using the pyautogui library.
-
ask: Uses the Wolfram Alpha API to answer computational questions asked by the user.
-
calender: Opens the Google Calendar in a web browser.
-
note: Allows the user to write a voice note and saves it to a text file.
-
wiki: Searches Wikipedia and speaks a summary of the search result.
-
read_note: Reads the previously saved voice note from the text file.
-
cmd: Opens the command prompt/terminal.
-
ip: Retrieves and speaks the user's IP address.
-
cpu: Provides information about CPU usage and battery status.
-
cam: Opens the front webcam and displays the video feed.
-
stock: Performs a Google search for stock market information.
-
pdf_reader: Reads the content of a PDF file provided by the user.
-
time_now: Tells the current time.
-
support: Opens the link to the software's GitHub repository.
-
youtube: Performs a YouTube video search based on user input.
-
google: Performs a Google search based on user input.
-
route_to: Opens Google Maps with directions to the specified location.
-
wiki_step_mode: Activates a "how to" mode and provides step-by-step instructions.
-
Setup and Introduction: The program includes functions to play startup and introduction audio files.
-
Neural Intents and Mapping: The program uses the Neural Intents library to define and train a model for understanding user queries and mapping them to appropriate functions.
Main Thread: The MainThread class handles the main execution of the program. It includes methods for speech recognition, handling user queries, and running the assistant's responses in the background.
Main GUI: The Main class creates the graphical user interface using the PyQt5 library and connects the UI elements to the corresponding functions.
Application Execution: The program creates an instance of the GUI class, shows the UI, and starts the event loop to execute the application.
Overall, the program combines different functionalities and provides a conversational interface for the virtual assistant "Friday." The user can interact with the assistant by speaking voice commands, and the assistant responds accordingly by performing various tasks such as providing information, opening websites, sending emails, and more.
This wiki is a collaborative knowledge base for the F.R.I.D.A.Y project. It serves as a central hub for documentation, tutorials, and other helpful resources related to the project.
We welcome contributions to this wiki from the community. If you have any improvements, corrections, or new content to add, please follow our contribution guidelines. Your contributions are greatly appreciated!
The content in this wiki is licensed under the MIT license license. Please review the LICENSE file for more information.
If you have any questions, suggestions, or feedback regarding this wiki, please open an issue in the repository or reach out to us through contact information.