A Python-based voice assistant that can execute commands, open applications, and answer questions using Google's Gemini AI.
✨ Voice Commands - Control your computer with natural speech 🎤 Wake Word Detection - Activate with "Hey Jarvis" or always-listening mode 🤖 AI-Powered - Uses Google Gemini for intelligent responses 🚀 Quick Actions - Open apps, browsers, and system tools instantly ⏰ Time & Date - Get current time and date information 🔍 Web Search - Search the web with voice commands 💻 System Control - Shutdown, restart, and get system information 📱 18+ Applications - Open popular apps with simple voice commands
- Clone the repository:
git clone https://github.com/KrishnaSrinivas-24/JARVIS.git
cd JARVIS- Install dependencies:
pip install -r requirements.txt- Set up your Google Gemini API key:
- Get your API key from Google AI Studio
- Replace
"Paste your API Here"injarvis.pywith your actual API key
Run JARVIS:
python jarvis.pyYou'll be prompted to choose a listening mode:
- Option 1: Wake Word Mode - Say "Hey Jarvis" or "Jarvis" to activate
- Option 2: Always Listening Mode - No wake word needed (default)
When using wake word mode:
- Wait for the prompt:
Waiting for wake word... - Say "Hey Jarvis" or "Jarvis"
- JARVIS will respond: "Yes? How can I help you?"
- Give your command
- Repeat for each command
Benefits:
- Privacy-friendly - only listens when activated
- Saves battery on laptops
- Reduces false positives in noisy environments
Open Applications:
- "Open Google" / "Open Edge" - Launch browsers
- "Open YouTube" / "Open Spotify" - Media platforms
- "Open Word" / "Open Excel" / "Open PowerPoint" - Office apps
- "Open Notepad" / "Open Calculator" / "Open Paint" - System utilities
- "Open VS Code" / "Open Visual Studio Code" - Code editor
- "Open GitHub" / "Open Discord" - Dev tools
- "Open Command Prompt" / "Open File Explorer" - System access
- "Open Settings" / "Open Task Manager" - System settings
Time & Date:
- "What time is it?" / "Tell me the time"
- "What's the date?" / "What's today?"
Web Search:
- "Search for [query]" - Search Google for anything
- Example: "Search for Python tutorials"
System Control:
- "System info" / "System information" - Get OS details
- "Shutdown" - Shutdown computer (30 second delay)
- "Restart" / "Reboot" - Restart computer (30 second delay)
- "Cancel" - Cancel pending shutdown/restart
Exit:
- "Exit" / "Quit" / "Bye" - Close JARVIS
General Questions:
- Ask anything! If JARVIS doesn't recognize a command, it will use Gemini AI to answer your question.
- ✅ Added optional wake word mode with "Hey Jarvis" or "Jarvis" activation
- ✅ User can choose between wake word mode and always-on mode at startup
- ✅ Improved privacy - only listens when wake word is detected
- ✅ Better battery efficiency for laptops
- ✅ Reduced false positives in noisy environments
- ✅ Removed recursive restart after unknown responses
- ✅ Added proper error handling for all speech recognition exceptions
- ✅ Implemented timeout and phrase limits to prevent hanging
- ✅ Added ambient noise adjustment for better recognition
- ✅ Continuous loop without restart delays
Benefits:
- No more infinite loops on recognition errors
- Faster response time between commands
- Better error recovery
- Smoother user experience
- Privacy-friendly wake word option
- Python 3.7+
- Microphone access
- Internet connection (for speech recognition and Gemini AI)
- Windows OS (for application shortcuts)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.