J.A.R.V.I.S.

JARVIS (Just A Rather Very Intelligent System) โ€” A modular, Python-based AI Assistant built from scratch using Speech Recognition, Natural Language Processing, and Gemini API. JARVIS has evolved through 21 marks of innovation โ€” ๐Ÿš€ Created by Devansh Sharma | The Legacy Continues into the VISAR EDGE Era - https://visaredge.vercel.app/

0
0
0
Python
public
Forked

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!

Jarvis V1 Jarvis V2

โœจ 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?โ€

๐ŸŽต Media & Entertainment

  • 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

๐ŸŒค๏ธ Real-time Information

  • 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:

4. Configure Music Folder (Optional)

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

  1. Enable Wake Word: Toggle the โ€œWake Wordโ€ switch in GUI
  2. Say โ€œHey Jarvisโ€ to activate voice mode
  3. Speak your command after hearing the activation sound
  4. Jarvis will respond both in text and voice

Text Commands

  1. Type your message in the input box
  2. Press Enter or click Send
  3. 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

  1. Click Menu โ†’ Themes (or use theme button)
  2. Select from available themes
  3. Theme is saved and applied on next restart

Custom Background

  1. Place your background image in assets/ folder
  2. Name it jarvis_bg.png (or .jpg)
  3. Restart Jarvis to see the new background

Avatar Customization

  1. Replace avatar files in the main directory:
    • avatar2.gif, avatar4.gif, avatar6.gif, avatar9.gif
  2. Supported formats: GIF, PNG, JPG
  3. 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

  1. Create a new file in plugins/ folder (e.g., my_plugin.py)
  2. 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)
  1. 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:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. 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?

  1. Check existing Issues
  2. 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

Ask DeepWiki

v0.3.3[beta]