Emma originally known as Eva. Is a Python-based voice assistant that utilizes various libraries to provide a range of functionalities through voice commands. This project uses pyttsx3 for text-to-speech conversion, speech_recognition for recognizing voice commands, wikipedia for searching Wikipedia, webbrowser for opening web pages, and os for system-related operations.
Emma greets the user based on the time of day - "Good morning," "Good afternoon," or "Good evening."
Emma interacts with the user through voice commands, making it a hands-free experience.
Searches Wikipedia for user-provided queries, summarizes the results, and reads them out loud.
Opens popular websites directly from the browser based on user commands:
- YouTube: Opens YouTube
- Google: Opens Google
- Email: Opens Gmail
- Search: Performs a Google search based on the user's query
- Chat GPT: Opens the OpenAI Chat GPT website
- Study Time: Opens a study-related video on YouTube
- Music: Opens Spotify
- News: Opens BBC News
- Weather: Opens Weather.com
- Calendar: Opens Google Calendar
- Recipe: Explores recipes on AllRecipes
- Learn a Language: Opens Duolingo Certainly! Below is an added section to the README.md that explains how users can implement their own custom commands:
Extend Emma's functionality by adding your own custom commands. Follow the example below to implement a new command:
# Example: Open a custom website
elif "my command" in query:
webbrowser.open("https://www.my-website.com/")
-
Open the
main.py
file. -
Locate the section with custom commands.
-
Add your own command using the template:
elif "<your_command_keyword>" in query: webbrowser.open("<https://your-custom-url.com/>")
Tip:
add you keyword and url inside the <>
and remove the <>
- Save the file and run the script.
Now, when you say "your_command_keyword" during voice interaction, Emma will open the specified URL.
Feel free to add more custom commands or customize existing ones based on your preferences.
If Emma fails to understand a command, it politely apologizes.
- Python 3.x
- Install required Python packages using:
pip install pyttsx3 speechrecognition wikipedia
-
Run the Script:
- Execute the Python script to start Emma, your voice assistant.
-
Voice Interaction:
- Emma will greet you and wait for your command.
-
Speak Commands:
- Issue voice commands, and Emma will respond accordingly.
- Ensure your microphone is functional for voice commands.
- Emma may not comprehend certain commands, and it will apologize if it can't respond.
Feel free to customize the code to add more functionalities or adapt it to your preferences.