Jarvis is an AI-powered Python voice assistant that listens to your commands and performs tasks like opening websites, playing music, fetching live news, and answering general questions using OpenAI GPT.
- Voice Activation: Wake Jarvis with the keyword
Jarvis. - AI Chat Mode: Uses OpenAI GPT (ChatGPT) for intelligent responses.
- Website Control: Open popular websites like Google, YouTube, Facebook, and LinkedIn.
- Music Playback: Play your favorite songs from a predefined music library.
- Real-Time News: Fetch and read top headlines using NewsAPI.
- Text-to-Speech: Natural speech using
gTTS(Google Text-to-Speech). - Speech Recognition: Powered by the
speech_recognitionlibrary.
- Python 3.x
- SpeechRecognition (Voice input)
- gTTS / pyttsx3 (Text-to-Speech)
- Webbrowser (Website automation)
- OpenAI API (AI-powered responses)
- NewsAPI (Real-time headlines)
- Pygame (MP3 playback)
Jarvis/ β βββ main.py # Main script (entry point) βββ musicLibrary.py # Dictionary of songs and links βββ requirements.txt # Project dependencies βββ README.md # Project documentation
-
Clone the repository
git clone https://github.com/YourUsername/jarvis-voice-assistant.git cd jarvis-voice-assistantpip install -r requirements.txt
-
Add API Keys
newsapi = "<Your NewsAPI Key Here>" client = OpenAI(api_key="<Your OpenAI API Key Here>")
-
Run the Project
python main.py
- "Jarvis, open Google"
- "Jarvis, play despacito"
- "Jarvis, what's the news?"
- "Jarvis, who is Elon Musk?" (AI response from GPT)
- speechrecognition
- pyttsx3
- gTTS
- pygame
- requests
- openai