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
| 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 |
- Download the "Source code (zip)" file below
- Extract to your preferred location
- Run
install.bat(Windows) to install dependencies - Follow setup instructions in README.md
- Run
python main.pyto start JARVIS
- 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`)
- Python 3.8 or higher
- Windows OS (for app launching features)
- Microphone
- Internet connection (for news and jokes)
-
Clone the repository
git clone https://github.com/Shubhadip1004/JARVIS.git cd JARVIS -
Install Python dependencies
pip install -r requirements.txt -
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.zipOr download manually from:
https://alphacephei.com/vosk/modelsPlace the vosk-model inside model folder
model/vosk-model-small-en-us-0.15 -
Set up environment variables
Rename the example file:
cp .env.example .envAdd 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
python src/main.py
π€ 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!"
"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
"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
"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
"open documents" - Documents folder
"open downloads" - Downloads folder
"open google" - Google search
"open whatsapp" - WhatsApp Web
"ask [question]" - AI-powered answers on any topic
"explain [concept]" - Detailed explanations
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
Engine: Vosk (offline, no internet required)
Model: vosk-model-small-en-us-0.15
Sample Rate: 16kHz
Latency: Real-time processing
Library: pyttsx3 (cross-platform)
Features: Offline operation, multiple voices
News: NewsAPI (technology headlines)
GPT: OpenAI (deepseek-r1t2-chimera model by tngtech)
Jokes: icanhazdadjoke.com with fallback local jokes
Weather Forecasting: VisualCrossing Weather
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
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
This project is licensed under the MIT License - see the LICENSE file for details.
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
"I came to realize that I had more to offer this world than just making things that blow up." - Tony Stark