J.A.R.V.I.S. Mark 21 (Latest) โ Personal AI Assistant
Built with Python | CustomTkinter | Gemini API | Modern GUI
Welcome to JARVIS Mark 21, a voice-enabled, GUI-based personal AI assistant inspired by Iron Manโs JARVIS โ reimagined and developed by Devansh. This assistant is smart, stylish, and customizable โ perfect for everyday automation, chatting, and cool AI experiments!
โจ Features
๐จ User Interface & Experience
- Modern GUI (CustomTkinter) โ Beautiful dark-mode interface with customizable themes
- Animated Avatar โ Live animated assistant face (supports GIF, PNG, JPG formats)
- Video Intro โ Cinematic startup video with fade-out effects
- Productivity Dashboard โ Left sidebar with calendar, clock, and uptime timer
- RGB Sidebar Border โ Dynamic color-cycling border for a techy look
- Theme System โ Multiple pre-built themes to customize your experience
- Custom Backgrounds โ Set your own background images
- Loading Animations โ Smooth spinner animations during AI processing
- Typing Animation โ Cinematic text typing with random speed variations
๐๏ธ Voice & Speech
- Voice Recognition โ Speech-to-text using SpeechRecognition library
- Wake Word Detection โ โHey Jarvisโ trigger (toggleable via GUI switch)
- Text-to-Speech (TTS) โ Voice responses using pyttsx3 (toggleable on/off)
- Multi-language Support โ Supports English and Hindi language responses
- Speech Interrupt โ Stop Jarvis mid-speech with interrupt button
- Voice Toggle โ Enable/disable voice via command or GUI switch
๐ค AI & Intelligence
- Gemini API Integration โ Powered by Googleโs Gemini AI for intelligent conversations
- Contextual Memory โ Remembers last 20 conversations for context-aware responses
- Persistent Chat History โ All conversations saved and loaded automatically
- Smart Memory System โ Remembers personal facts about you (name, preferences, etc.)
- Natural Language Processing โ Understands commands in natural language
๐ Productivity Features
- Notes System โ Add, view, and delete notes
- Reminders โ Set time-based reminders with natural language support
- Time delay: โremind me to take medicine in 15 minutesโ
- Natural language: โremind me to call mom tomorrow at 5PMโ
- Custom Commands โ Teach Jarvis new commands: โwhen i say X, do this Yโ
- Chat History โ View and save conversation history
- Memory Recall โ Ask โwhat is my name?โ or โdo you remember my birthday?โ
- Music Player โ Play, pause, resume, stop, skip, and shuffle music
- Auto Music Detection โ Automatically loads music from your Music folder
- Background Music โ Play music while using other features
๐ Web & System Integration
- Web Browser Control โ Open websites (YouTube, Google, GitHub, LinkedIn)
- System Commands โ Control your PC with voice/text:
- Shutdown: โshutdown my pcโ
- Restart: โrestart my pcโ
- Sleep: โsleep my pcโ
- Hibernate: โhibernate my pcโ
- Lock: โlock my pcโ
- Folder Navigation โ Open folders by name
- Application Launcher โ Launch applications via custom commands
- Weather Updates โ Live weather information with auto-location detection
- Current temperature, feels-like, humidity
- Weather description with emoji indicators
- Auto-refreshes every minute
- Tech News โ Latest technology news from NewsAPI and HackerNews
- Top 5 tech headlines displayed in sidebar
- Auto-refreshes periodically
- Market Watch โ Stock market data display (in right sidebar)
๐งฎ Utilities & Plugins
- Calculator Plugin โ Advanced math calculations via voice/text
- Supports: addition, subtraction, multiplication, division
- Percentage calculations: โincrease 100 by 10%โ
- Natural language: โwhat is 25 plus 17?โ
- Plugin System โ Modular plugin architecture for easy extensions
- Create custom plugins with simple registration
- Auto-loads all plugins from
plugins/ folder
๐ฏ Advanced Features
- Auto-Learning Mode โ Jarvis learns custom commands from you
- Bold Text Formatting โ Text in asterisks automatically becomes bold
- Enter Key Support โ Send messages with Enter key
- Unknown Command Logging โ Saves unrecognized commands for future learning
- Thread-Safe Operations โ All operations run in background threads (no freezing)
- Error Handling โ Graceful error handling with user-friendly messages
๐ง Tech Stack
Core Technologies
- Python 3.12+ โ Programming language
- CustomTkinter โ Modern GUI framework
- Google Gemini API โ AI conversation engine
- SpeechRecognition โ Voice input processing
- pyttsx3 โ Text-to-speech engine
Key Libraries
- Pillow (PIL) โ Image processing for avatars
- requests โ HTTP requests for APIs
- python-dotenv โ Environment variable management
- pygame โ Music playback
- OpenCV (cv2) โ Video intro playback
- BeautifulSoup4 โ Web scraping (if needed)
๐ Project Structure
JARVIS_MARK_21_Beta/
โโโ JarvisMain.py # Main entry point
โโโ video_intro.py # Startup video handler
โโโ floating_button.py # Optional floating button
โโโ .env # API keys (create this file)
โโโ requirements.txt # Python dependencies
โ
โโโ GUI/ # User Interface
โ โโโ __init__.py
โ โโโ gui_main.py # Main GUI window
โ โโโ avatar.py # Avatar display handler
โ โโโ helper.py # GUI helper functions
โ โโโ themes/
โ โโโ themes.py # Theme definitions
โ
โโโ core/ # Core Logic
โ โโโ commands.py # Command processing
โ โโโ utils.py # Utility functions
โ โโโ memory.py # Memory management
โ โโโ config.py # Configuration settings
โ โโโ theme_manager.py # Theme management
โ โโโ plugin_loader.py # Plugin system loader
โ
โโโ features/ # Feature Modules
โ โโโ notes.py # Notes management
โ โโโ reminders.py # Reminder system
โ โโโ music.py # Music player
โ
โโโ voice/ # Speech & Voice
โ โโโ tts.py # Text-to-speech
โ โโโ stt.py # Speech-to-text
โ
โโโ api/ # External API Integrations
โ โโโ gemini.py # Gemini AI integration
โ โโโ weather.py # Weather API
โ โโโ news.py # News API
โ โโโ location.py # Location detection
โ โโโ stock_data.py # Stock market data
โ
โโโ plugins/ # Plugin System
โ โโโ __init__.py
โ โโโ calculator.py # Calculator plugin
โ
โโโ DATA/ # User Data Storage
โ โโโ notes.json # Saved notes
โ โโโ reminders.json # Saved reminders
โ โโโ chat_log.txt # Conversation history
โ โโโ memory.json # Persistent memory
โ โโโ custom_commands.json # Learned commands
โ โโโ unknown_commands.txt # Unrecognized commands
โ
โโโ assets/ # Media Assets
โโโ intro.mp4 # Startup video
โโโ avatar*.gif # Avatar animations
โโโ jarvis_bg.* # Background images
โ๏ธ Setup Instructions
Prerequisites
- Python 3.12 or higher installed on your system
- Microphone (for voice features)
- Internet connection (for AI and API features)
Step-by-Step Installation
1. Clone the Repository
git clone https://github.com/RootDeveloperDS/J.A.R.V.I.S..git
cd J.A.R.V.I.S.
2. Install Python Dependencies
# Install all required packages
pip install -r requirements.txt
Note for Windows users: If you encounter issues with PyAudio, try:
pip install pipwin
pipwin install pyaudio
3. Set Up API Keys
run JarvisMain.py and enter your API key when asked:
# Required API Keys
GEMINI_API_KEY=your_gemini_api_key_here
# Optional API Keys (for additional features)
WEATHER_API_KEY=your_openweathermap_api_key
NEWS_API_KEY=your_newsapi_key
How to get API keys:
By default, Jarvis looks for music in your systemโs Music folder. To change this, edit features/music.py and update the path.
5. Run JARVIS
python JarvisMain.py
First Run:
- Youโll see a startup video intro (press ESC to skip)
- The GUI will launch with a welcome message
- Jarvis will check for API keys and create necessary data files
๐ฎ Usage Guide
Basic Commands
Voice Commands
- Enable Wake Word: Toggle the โWake Wordโ switch in GUI
- Say โHey Jarvisโ to activate voice mode
- Speak your command after hearing the activation sound
- Jarvis will respond both in text and voice
Text Commands
- Type your message in the input box
- Press Enter or click Send
- Jarvis responds in the chat window
Common Commands
Chat & Questions
- Ask any question: โWhat is artificial intelligence?โ
- General conversation: โTell me a jokeโ
- Language support: Ask in Hindi for Hindi responses
Notes & Reminders
"add note [your note]" โ Save a note
"show notes" โ View all notes
"delete note [note text]" โ Remove a note
"remind me to [task] in [X] minutes" โ Set a reminder
"remind me to [task] tomorrow at [time]" โ Natural language reminder
"view reminders" โ See all active reminders
Music Control
"play music" โ Start playing music
"pause music" โ Pause playback
"resume music" โ Continue playback
"stop music" โ Stop playback
"next song" โ Skip to next track
"shuffle music" โ Shuffle playlist
System Control
"shutdown my pc" โ Shutdown computer (10 second delay)
"restart my pc" โ Restart computer
"sleep my pc" โ Put computer to sleep
"hibernate my pc" โ Hibernate computer
"lock my pc" โ Lock screen
Web & Apps
"open youtube" โ Open YouTube
"open google" โ Open Google
"open my github" โ Open GitHub
"open my linkedin" โ Open LinkedIn
"open folder [folder name]" โ Open folder from home directory
Memory & Learning
"remember that my [key] is [value]" โ Save personal info
- Example: โremember that my name is Johnโ
"what is my [key]" โ Recall saved info
"what do you remember" โ See all saved memories
"when i say [phrase], do this [action]" โ Teach custom command
- Example: โwhen i say launch mode, do this open Spotify and VS Codeโ
Calculator
"calculator [expression]" โ Perform calculations
- Examples:
- โcalculator 25 plus 17โ
- โcalculator 100 times 5โ
- โcalculator increase 100 by 10%โ
- โcalculator 50% of 200โ
Voice Settings
"enable tts" or "turn on tts" โ Enable voice responses
"disable tts" or "turn off tts" โ Disable voice responses
Utilities
"show chat history" โ Display conversation history
"save chat" โ Save current chat to file
"what can you do" โ List all available features
๐จ Customization
Changing Themes
- Click Menu โ Themes (or use theme button)
- Select from available themes
- Theme is saved and applied on next restart
Custom Background
- Place your background image in
assets/ folder
- Name it
jarvis_bg.png (or .jpg)
- Restart Jarvis to see the new background
Avatar Customization
- Replace avatar files in the main directory:
avatar2.gif, avatar4.gif, avatar6.gif, avatar9.gif
- Supported formats: GIF, PNG, JPG
- Restart Jarvis to load new avatar
Music Folder
Edit features/music.py and change the MUSIC_FOLDER path to your preferred music directory.
๐ง Troubleshooting
Common Issues
โNo module named โcustomtkinterโโ
pip install customtkinter
Microphone not working
- Check microphone permissions in Windows Settings
- Ensure microphone is not being used by another application
- Try running as administrator
API Key Errors
- Verify
.env file exists in the correct directory
- Check that API key is correctly formatted (no extra spaces)
- Ensure you have internet connection
Music not playing
- Verify music files are in supported formats (MP3, WAV)
- Check that music folder path is correct
- Ensure pygame is installed:
pip install pygame
Avatar not displaying
- Check that avatar file exists in the directory
- Supported formats: GIF, PNG, JPG
- Try using a different avatar file
Voice recognition not working
- Check microphone is connected and working
- Install PyAudio:
pip install pyaudio or pipwin install pyaudio
- Try speaking more clearly and louder
๐ For Developers
Adding Custom Plugins
- Create a new file in
plugins/ folder (e.g., my_plugin.py)
- Use this template:
# plugins/my_plugin.py
from voice.tts import speak
def register():
return {
"trigger": "mytrigger", # Word that activates plugin
"description": "My custom plugin",
"run": run_my_plugin
}
def run_my_plugin(command, output_widget):
# Your plugin logic here
response = "Plugin executed!"
output_widget.insert("end", response + "\n")
output_widget.see("end")
speak(response)
- Restart Jarvis - plugin will auto-load!
Extending Commands
Edit core/commands.py to add new built-in commands. Follow the existing pattern:
elif "my command" in command:
reply = "Command response"
# Your logic here
Modifying GUI
- Main GUI:
GUI/gui_main.py
- Themes:
GUI/themes/themes.py
- Avatar:
GUI/avatar.py
๐ API Keys & Security
Required Keys
- GEMINI_API_KEY โ Required for AI conversations
Optional Keys
- WEATHER_API_KEY โ For weather features
- NEWS_API_KEY โ For tech news feed
Security Notes
- Never commit your
.env file to version control
- Keep API keys private and secure
- Rotate keys if compromised
- The
.env file is already in .gitignore
๐ Future Plans (For New Contributors)
- DevX AI Core Integration โ Custom AI framework
- Enhanced GUI Animations โ More fluid UI transitions
- Mobile Port โ Kivy or BeeWare mobile app
- Web Interface โ Browser-based access
- Advanced Plugin System โ Plugin marketplace
- Voice Cloning โ Custom voice profiles
- Multi-user Support โ Multiple user profiles
- Cloud Sync โ Sync data across devices
- More Games & Utilities โ Built-in games and tools
๐ญ Next โ VISAR EDGE (coming soon)
VISAR EDGE V1.0 is on the horizon โ the evolution of JARVIS into a more powerful, context-aware, and visually stunning AI environment ecosystem.
A new chapter of intelligence, design, and autonomy is coming soonโฆ
Get ready โ the VISAR EDGE Era is about to begin. ๐
๐ Version History
Mark 21 (Current)
- โ
Market Watch in sidebar
- โ
Enhanced plugin system
- โ
Improved error handling
- โ
Better UI responsiveness
Previous Versions
See All Version Update Details.md for complete changelog from Mark 6 to Mark 21.
๐ค Contributing
Contributions are welcome! Hereโs how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature)
- Commit your changes (
git commit -m 'Add some AmazingFeature')
- Push to the branch (
git push origin feature/AmazingFeature)
- Open a Pull Request
Areas for Contribution
- Bug fixes
- New features
- Documentation improvements
- Plugin development
- UI/UX enhancements
- Performance optimizations
๐ Reporting Issues
Found a bug? Have a feature request?
- Check existing Issues
- Create a new issue with:
- Clear description
- Steps to reproduce
- Expected vs actual behavior
- System information (OS, Python version)
๐ Documentation
- Setup Guide: This README
- Version History:
All Version Update Details.md
- Code Comments: Inline documentation in source files
๐ Credits
Developed by: Devansh Sharma
Inspired by: Iron Manโs JARVIS
Built with: Python, CustomTkinter, Gemini API
๐ซ Connect With Me
๐ License
MIT License โ Feel free to use, modify, and build upon this project. Attribution is appreciated!
Copyright (c) 2024 Devansh Sharma
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
โญ Show Your Support
If you find this project helpful, please consider:
- โญ Starring the repository
- ๐ด Forking for your own use
- ๐ Reporting bugs and issues
- ๐ก Suggesting new features
- ๐ข Sharing with others
Made with โค๏ธ by Devansh Sharma
โSometimes you gotta run before you can walk.โ โ Tony Stark
