A voice-controlled personal AI assistant for Windows, inspired by JARVIS, built using Python, Google Gemini AI, Speech Recognition, and Text-to-Speech.
Jarvis can:
- 🎙️ Listen to voice commands
- 🧠 Respond intelligently using Google Gemini
- 🔊 Speak responses aloud
- 🌐 Open websites
- 🎵 Play local music
- 📁 Open folders
- 📝 Save AI-generated responses
- ⏰ Tell the current time
- Voice Input using microphone
- AI Conversations powered by Google Gemini
- Text-to-Speech Output (Jarvis speaks back)
- Website Automation (Google, YouTube, Wikipedia)
- Local File & Music Access
- Persistent Chat Memory
- Error Handling for API Quotas
| Component | Technology |
|---|---|
| Language | Python 3.9+ |
| AI Model | Google Gemini (gemini-2.5-flash) |
| Speech Recognition | SpeechRecognition |
| Voice Output | pyttsx3 |
| AI SDK | google-genai |
| OS | Windows |
Jarvis-AI-For-Windows/
│
├── main.py # Main Jarvis AI logic
├── config.py # API key configuration
├── Openai/ # Saved AI responses
├── .venv/ # Virtual environment
├── requirements.txt # Dependencies
└── README.md # Project documentation
Before running Jarvis, ensure you have:
- ✅ Python 3.9 or above
- ✅ A working microphone
- ✅ Internet connection
- ✅ Google Gemini API Key
-
Go to Google AI Studio 👉 https://aistudio.google.com/
-
Sign in with your Google account
-
Click “Get API Key”
-
Create a new API key
-
Copy the key
pip install -r requirements.txtOr manually:
pip install speechrecognition pyttsx3 google-genai pyaudio
⚠️ If PyAudio fails on Windows, install using precompiled wheels: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
apikey = "YOUR_GEMINI_API_KEY_HERE"python main.pyYou should hear:
“Jarvis AI Activated”
| Command | Action |
|---|---|
| Open Google | Opens Google |
| Open YouTube | Opens YouTube |
| Open Wikipedia | Opens Wikipedia |
| Open Music | Plays local music |
| Open Notes | Opens a folder |
| What is the time | Tells current time |
| Artificial Intelligence ... | AI-generated response |
| Reset Chat | Clears chat memory |
| Jarvis Quit | Exits the assistant |
- Uses Google Gemini (
gemini-2.5-flash) - Maintains conversation context using
chatStr - Responses are spoken using Text-to-Speech
- Long AI responses are saved in the
Openai/folder
Ensure:
- ✔️
pyttsx3installed correctly - ✔️ System audio output is enabled
- ✔️ Windows speech engine is available
Test voice separately:
import pyttsx3
engine = pyttsx3.init()
engine.say("Testing Jarvis voice")
engine.runAndWait()speech_recognition.exceptions.WaitTimeoutError
✔️ Speak clearly ✔️ Ensure microphone access enabled ✔️ Reduce background noise
Jarvis automatically:
- Detects
429errors - Waits before retrying
- Announces the issue via voice
- ❌ Do NOT hardcode API keys
- ✔️ Use
config.pyor environment variables - ✔️ Add
config.pyto.gitignore
- 🔐 Wake word detection
- 🌐 Offline mode
- 📱 Mobile integration
- 🧠 Memory persistence
- 🎯 Custom command training
Contributions are welcome!
- Fork the repository
- Create a feature branch
- Commit changes
- Open a Pull Request
This project is licensed under the MIT License.
Co-Founder – Unicodrex | Technical Lead – Skill Sprint | Trainee Game Developer – CEGA
If you like this project, please ⭐ star the repository and share it!