A personal Python-based voice assistant powered by Google Gemini AI and Neural Text-to-Speech, inspired by Iron Man's J.A.R.V.I.S.
- 🧠 Conversational AI (Gemini Powered): Falls back to Google Gemini for natural, witty, context-aware conversations whenever a command isn't a built-in automation task.
- 🎙️ Natural Neural Voice + Caching: Uses Microsoft Edge's
en-GB-RyanNeuralvoice viaedge-tts(with Hindihi-IN-MadhurNeuralsupport) and caches generated.mp3responses locally using MD5 hashing for instant playback on repeated phrases. - 🗣️ Indian-English Speech Recognition: Listens via microphone using Google Speech Recognition (
en-in). - ⚙️ Desktop & Web Automation: Captures screenshots, plays local music, searches Wikipedia, opens websites, tells jokes, and handles system power controls.
- 🪪 Custom Identity: Dynamically change and persist the assistant's name via
assistant_name.txt.
| Voice Command | Action |
|---|---|
"time" / "date" |
Speaks the current system time or date |
"wikipedia <topic>" |
Fetches and reads a 2-sentence Wikipedia summary |
"play music <song>" |
Plays a matching (or random) track from your Music folder |
"open youtube" / "open google" |
Opens YouTube or Google in your default browser |
"screenshot" |
Captures the screen and saves it to Pictures\screenshot.png |
"tell me a joke" |
Reads out a random programming joke |
"change your name" |
Lets you rename the assistant and saves it locally |
"who made you" |
Reveals the creator Easter egg |
"shutdown" / "restart" |
Shuts down or restarts the Windows PC |
"offline" / "exit" |
Puts the assistant to sleep and exits the loop |
| Anything else | Handled conversationally by Google Gemini AI |
- Language: Python 3
- AI Engine:
google-genai(Gemini API) - Speech-to-Text:
SpeechRecognition,PyAudio - Text-to-Speech:
edge-tts,playsound,asyncio,hashlib - Automation & Utilities:
pyautogui,wikipedia,pyjokes,webbrowser,os,datetime
git clone [https://github.com/KiafAhmadKhan/myjarvis.git](https://github.com/KiafAhmadKhan/myjarvis.git)
cd myjarvis
## Install dependencies
pip install SpeechRecognition pyaudio wikipedia pyautogui pyjokes edge-tts playsound==1.2.2 google-genai
## Add your Gemini API Key
Open the main Python file and replace the placeholder with your Google AI Studio API key:
GEMINI_API_KEY = "your_actual_api_key_here"
(Tip: Keep your API key private and never commit your real key to a public repository.)
## Run Jarvis
python myjarvis.py
(Replace main.py with your actual .py filename if different.)
👨💻 Author
Kaif Ahmad Khan