Skip to content

Shubhadip1004/JARVIS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ™οΈ JARVIS Voice Assistant

Python License Platform Status

A Python-powered voice assistant inspired by Tony Stark's JARVIS from Iron Man

Features β€’ Installation β€’ Usage β€’ Available Commands β€’ Project Structure β€’ Technical Details β€’ Troubleshooting β€’ Contributions β€’ License β€’ Acknowledgments


πŸš€ Features

Category Features
🎀 Voice Recognition Real-time speech-to-text using Vosk (offline)
πŸ”Š Speech Synthesis Text-to-speech responses with pyttsx3
πŸ“… Date & Time Current date, time, and weekday information
πŸ“° News Latest technology news headlines
🌀️ Weather Current weather and forecasts for any city
πŸ˜„ Entertainment Random dad jokes API with fallback jokes
πŸ–₯️ System Control Launch applications (Windows)
πŸ“ File Management Open Documents and Downloads folders
🌐 Web Integration Open websites and play YouTube music
πŸ€– AI Chat GPT integration via OpenRouter for intelligent conversations
🌐 Connection Monitoring Automatic internet detection with graceful offline fallback
πŸ” Smart Question Answering Ask questions and get AI-powered explanations
πŸ“‘ Online/Offline Mode Seamless switching between online and offline features

πŸ“¦ Installation

  1. Download the "Source code (zip)" file below
  2. Extract to your preferred location
  3. Run install.bat (Windows) to install dependencies
  4. Follow setup instructions in README.md
  5. Run python main.py to start JARVIS

Setup Required

- Download Vosk model from: https://alphacephei.com/vosk/models
- Extract to `model/vosk-model-small-en-us-0.15/`
- Create `.env` file with your API keys (see `.env.example`)

Prerequisites

  • Python 3.8 or higher
  • Windows OS (for app launching features)
  • Microphone
  • Internet connection (for news and jokes)

Step-by-Step Setup

  1. Clone the repository

    git clone https://github.com/Shubhadip1004/JARVIS.git
    
    cd JARVIS
    
  2. Install Python dependencies

    pip install -r requirements.txt
    
  3. Download Vosk Speech Recognition Model

    Download the model (choose one): Small model (recommended):

      https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip
    
      unzip vosk-model-small-en-us-0.15.zip
    

    Or download manually from:

      https://alphacephei.com/vosk/models
    

    Place the vosk-model inside model folder

      model/vosk-model-small-en-us-0.15
    
  4. Set up environment variables

    Rename the example file:

      cp .env.example .env
    

    Add your API keys to .env:

      Get free API keys from:
    
           - OpenRouter: https://openrouter.ai/ for GPT access
    
           - NewsAPI: https://newsapi.org/ for news headlines
    
           - VisualCrossing Weather: https://weather.visualcrossing.com for weather forcasting
    
      Your .env file should contain:
    
             gpt_api_key=your_openrouter_api_key_here
    
             news_api_key=your_newsapi_key_here
    
             weather_api_key=your_visualcrossing_weather_api_key_here
    

🎯 Usage

Starting JARVIS

     python src/main.py

Example Interaction

     🎀 You: "Hello Jarvis"

     πŸ”Š JARVIS: "Hello [Your Name]! How are you today?"

     🎀 You: "What time is it?"

     πŸ”Š JARVIS: "Let me see... Current time is 14 hours, 25 minutes and 10 seconds"

     🎀 You: "Tell me a joke"

     πŸ”Š JARVIS: "Why do programmers prefer dark mode? ... Because light attracts bugs!"

πŸ—£οΈ Available Commands

Basic Commands

     "hello", "hi" - Greet JARVIS

     "what's your name" - Introduction

     "what time is it" - Current time

     "what's the date today" - Today's date

     "what day is it" - Current weekday

Applications

     "open notepad" - Launch Notepad

     "open calculator" - Open Calculator

     "open browser" - Launch Chrome

     "open word" - Microsoft Word

     "open excel" - Microsoft Excel

     "open powerpoint" - Microsoft PowerPoint

     "open paint" - MS Paint

Entertainment

     "tell me a joke" - Random dad joke

     "what's the news" - Technology headlines

     "what's the weather like in [place]" - Weather forecasting

     "play music" - YouTube music

System & Web

     "open documents" - Documents folder

     "open downloads" - Downloads folder

     "open google" - Google search

     "open whatsapp" - WhatsApp Web

Ask Questions

     "ask [question]" - AI-powered answers on any topic  
     
     "explain [concept]" - Detailed explanations  

πŸ—οΈ Project Structure

  JARVIS/

        β”œβ”€β”€ src/

              β”‚   β”œβ”€β”€ main.py                 # 🎯 Main application entry point

              β”‚   β”œβ”€β”€ command.py              # ⚑ Command processing & execution

              β”‚   β”œβ”€β”€ live_transcriber.py     # 🎀 Voice recognition (Vosk)

              β”‚   β”œβ”€β”€ tts.py                  # πŸ”Š Text-to-speech engine

              β”‚   β”œβ”€β”€ jokes.py                # πŸ˜„ Joke API & fallback system

              β”‚   β”œβ”€β”€ news.py                 # πŸ“° News headlines fetcher

              β”‚   β”œβ”€β”€ date_and_time.py        # πŸ“… Date & time utilities

              β”‚   β”œβ”€β”€ connection_checker.py   # 🌐 Internet status & monitoring

              β”‚   β”œβ”€β”€ gpt_integration.py      # πŸ€– AI chat with GPT models

              β”‚   β”œβ”€β”€ weather.py              # 🌀️ Weather data & forecasts

              β”‚   └── state.py                # 🧠 Application state management

         β”œβ”€β”€ model/     

              β”‚   └── vosk-model-small-en-us-0.15

         β”œβ”€β”€ requirements.txt                 # πŸ“¦ Python dependencies

         β”œβ”€β”€ .env.example                     # πŸ”§ Environment template

         β”œβ”€β”€ .gitignore                       # πŸ™ˆ Git exclusion rules

         └── README.md                        # πŸ“– This file

πŸ”§ Technical Details

Voice Recognition

     Engine: Vosk (offline, no internet required)

     Model: vosk-model-small-en-us-0.15

     Sample Rate: 16kHz

     Latency: Real-time processing

Text-to-Speech

     Library: pyttsx3 (cross-platform)

     Features: Offline operation, multiple voices

External APIs

     News: NewsAPI (technology headlines)

     GPT: OpenAI (deepseek-r1t2-chimera model by tngtech)

     Jokes: icanhazdadjoke.com with fallback local jokes

     Weather Forecasting: VisualCrossing Weather 

πŸ› Troubleshooting

Common Issues

Microphone not detected:

     Check microphone permissions

     Ensure default recording device is set

Vosk model not found:

     Ensure model is in the correct location:

     JARVIS/model/vosk-model-small-en-us-0.15/

Dependencies installation failed:

     Try installing individually:

           pip install vosk

           pip install sounddevice

           pip install pyttsx3

           pip install openai

           pip install urllib.requests

News not working:

     Verify NewsAPI key in .env file

     Check internet connection

GPT not working:

     Verify GPT AI key in .env file

     Check internet connection

Weather not working:

     Verify Weather AI key in .env file

     Check internet connection

🀝 Contributions

We welcome contributions! Feel free to:

  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

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  Vosk for offline speech recognition

  NewsAPI for news headlines

  OpenAI & tngtech for trained GPT model (deepseek-r1t2-chimera model)

  icanhazdadjoke for joke API

  VisualCrossing for Weather API

  Marvel's Iron Man for inspiration
Made with ❀️ by Shubhadip Mahata

"I came to realize that I had more to offer this world than just making things that blow up." - Tony Stark

About

A Python Voice Assistant inspired by J.A.R.V.I.S.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors