π¬ βGood Morning, Boss!β β A voice-activated assistant powered by Python, speech recognition, and LLaMA 2 via Ollama.
- β° Dynamic time-based greetings
- π€ Real-time weather reports
- π° Latest news headlines
- π§ Speech recognition (Google API)
- π Text-to-speech (TTS) using
pyttsx3 - π§ LLaMA 2 chat integration via
ollama - βοΈ Auto-run on Windows startup (optional)
git clone https://github.com/ayuzhjha/XARVIS.git
cd XARVISMake sure Python 3.10+ is installed. Then:
pip install requests pyttsx3 SpeechRecognition pyaudio ollama
β οΈ On Windows, installpyaudiovia a.whlifpipfails:
Download from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
-
Download and install Ollama
- Visit https://ollama.com/download
- Install it for your operating system
-
Pull the base LLaMA model
ollama pull llama2
## π API Keys Setup
Replace the placeholders in the script with your actual keys:
```python
weather_api_key = "YOUR_OPENWEATHERMAP_API_KEY"
news_api_key = "YOUR_NEWSAPI_KEY"
location = "Your City"- Get weather key β OpenWeatherMap
- Get news key β NewsAPI
Run the assistant:
python JARVIS1.2.py- XARVIS will:
- Greet you based on the time
- Tell the current time
- Announce the weather and news
- Ask: βI am ready to assist you. Please ask me anything.β
- Respond by speaking into your mic.
- Say
"exit"or"bye"to end the session.
The script uses Windows registry to add itself to startup:
add_to_startup() # Already called in mainTo disable it, remove the "JARVIS" key manually from:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
| Module | Role |
|---|---|
speech_recognition |
Voice to text |
pyttsx3 |
Text to voice |
ollama |
Chat interaction via LLaMA 2 |
requests |
Weather + News API calls |
winreg |
Adds to startup |
- GUI support with PyQt or Tkinter
- Custom voice personas
- File search & automation features
- Voice-controlled system commands
Made by Ayush Jha (A.J.)
π οΈ Division: XAEZOR β XARVIS (AI Assistant)
π« Reach out: GitHub
𧬠βPart of XAEZOR β a futuristic ecosystem where intelligence meets automation.β