Alexa Voice Assistant is a simple Python program utilizing speech recognition and text-to-speech synthesis to interact with the user through voice commands. The assistant can perform various tasks such as playing music on YouTube, providing the current time, fetching information from Wikipedia, sharing jokes, and responding to casual questions.
-
Voice Recognition:
- Utilizes the
speech_recognition
library to recognize voice commands from the user.
- Utilizes the
-
Text-to-Speech Synthesis:
- Employs the
pyttsx3
library to convert text responses into audible speech.
- Employs the
-
Task Execution:
- Executes tasks based on recognized commands, including playing music on YouTube, fetching the current time, providing information from Wikipedia, telling jokes, and answering casual inquiries.
-
Continuous Interaction:
- Runs in an infinite loop, allowing continuous interaction with the voice assistant. The assistant listens for commands and responds accordingly.
speech_recognition
pyttsx3
pywhatkit
datetime
wikipedia
pyjokes
Ensure these dependencies are installed before running the code.
-
Speech Recognition:
- The assistant continuously listens for commands. Simply say "Alexa" followed by your command.
-
Available Commands:
- Play music on YouTube: "Play [song name]"
- Fetch the current time: "What's the time?"
- Retrieve information from Wikipedia: "What is [topic]?"
- Ask for a joke: "Tell me a joke."
- Inquire about the assistant's well-being: "How are you?"
-
Continuous Interaction:
- The program runs in an infinite loop, allowing ongoing interaction. Say "Alexa" to initiate a command at any time.
- The assistant's voice can be configured by changing the voice index in the
voices
list in the code.
Contributions are welcome! Feel free to submit issues or pull requests to enhance the functionality or add new features.
This project is licensed under the MIT License.
Feel free to reach out for any questions or clarifications.
Happy Voice Assisting! 🗣🤖