Skip to content

AjayBora002/Voice-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Jarvis - AI Voice Assistant

Jarvis is a Python-powered voice-controlled personal assistant.
It listens for the wake word "Jarvis" and can perform tasks like:

  • Opening websites
  • Playing music
  • Telling news, jokes, and weather
  • Solving math expressions
  • Wikipedia search
  • Taking screenshots
  • Setting reminders
  • Controlling your system
  • Translating text
  • Checking battery status
  • Chatting with Google Gemini AI

🚀 Getting Started

1️⃣ Clone this repository

git clone https://github.com/your-username/jarvis-assistant.git
cd jarvis-assistant

2️⃣ Create and activate a virtual environment
 python -m venv jarvis_env


🔑 API Keys Setup

This project requires a few APIs:

Google Gemini API Key → Get it here

gemini_api_key = "your-gemini-key"


OpenWeather API Key → Get it here

api_key = "your-weather-key"


NewsAPI Key → Get it here

newsapi = "your-news-key"


Put your keys directly inside the jarvis.py file where indicated.

▶️ Running Jarvis

Run:

python jarvis.py


Jarvis will wait for the wake word:

Listening for wake word...
You said: jarvis
[Jarvis]: Yes


Now you can give commands 🎤



🗂 Features and Usage Guide
🔊 Wake Word Activation

Say:

Jarvis


Jarvis will reply:

[Jarvis]: Yes


Then it starts listening for commands.

🌐 Open Websites

"Open Google"

"Open YouTube"

"Open Facebook"

"Open LinkedIn"

👉 Jarvis opens the website in your browser.

🎶 Play Music

Add your songs in music_library.py like:

music = {
    "blue": "https://www.youtube.com/watch?v=...",
    "shapeofyou": "https://www.youtube.com/watch?v=..."
}


Say:

Play blue


👉 Jarvis opens the YouTube link.

📰 News Headlines

Say:

Headlines


or

News


👉 Jarvis speaks the top 5 Indian news headlines.

🌦 Weather

Say:

Weather in Delhi


👉 Jarvis fetches live weather using OpenWeather API.

➕ Math Solver

Say:

Calculate 25 * 12


👉 Jarvis solves with SymPy and reads the result.

📖 Wikipedia Search

Say:

Python in Wikipedia


👉 Jarvis reads a 2-sentence summary.

📸 Screenshot

Say:

Screenshot


👉 Saves as screenshot.png.

😂 Jokes

Say:

Tell me a joke


👉 Jarvis fetches from Official Joke API.

🕒 Time & Date

Say:

What’s the time?


👉 Jarvis: “The time is 08:32 PM”

Say:

What’s the date?


👉 Jarvis: “Today is Monday, September 03, 2025”

⏰ Reminder

Say:

Remind me to study in 1 minute


👉 Jarvis waits 1 minute then reminds you.

💻 System Control

"Shutdown" → PC shuts down in 5 seconds

"Restart" → PC restarts in 5 seconds

"Sleep" → PC goes to sleep

🔋 Battery Info

Say:

Battery


👉 Jarvis: “Battery is at 75 percent. Laptop is charging.”

🌍 Translation

Say:

Translate hello how are you to Hindi


👉 Jarvis speaks: "नमस्ते आप कैसे हैं"

Supported: Hindi, English, French, Spanish, German.
(You can expand in lang_dict inside code.)

🤖 Gemini AI Chat

If Jarvis doesn’t recognize your command, it asks Google Gemini AI.

Example:

What is quantum computing?


👉 Jarvis fetches smart AI-generated answers.

📂 Project Structure
📦 jarvis-assistant
 ┣ 📜 jarvis.py          # main assistant
 ┣ 📜 music_library.py   # custom music links
 ┣ 📜 requirements.txt   # dependencies
 ┣ 📜 README.md          # documentation
 ┗ 📂 jarvis_env/        # virtual environment (ignored by git)

🧰 requirements.txt

Example dependencies (you should include this file in repo):

speechrecognition
pyttsx3
gtts
playsound
pygame
requests
sympy
pyautogui
wikipedia
psutil
googletrans==4.0.0-rc1

📸 Demo

👉 (Add screenshots of your terminal / GIFs / a short demo video here)

📌 Future Improvements

Add Spotify/YouTube Music integration

Add continuous conversation mode

GUI version of Jarvis

Smarter AI-based intent detection

🤝 Contributing

Pull requests are welcome!
For major changes, please open an issue first to discuss.

About

Jarvis is a Python-based voice assistant that can perform tasks like web search, weather updates, news, math solving, Wikipedia search, jokes, reminders, system control, translation, and AI chatting using Google Gemini API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors