Nexus A.I. is a powerful desktop voice assistant that understands your commands and performs multiple tasks - from chatting intelligently and fetching weather reports to reading the latest news, opening apps/websites, playing music, taking screenshots, and more - all through your voice.
It combines the power of Speech Recognition, Groq AI, and Windows Automation to deliver a smooth, conversational, and hands-free experience.
✅ AI Chat Integration (Groq API) – Get intelligent, human-like responses to your queries.
🌤 Weather Updates – Get real-time weather information for any city using the OpenWeatherMap API.
📰 Latest News – Fetch top news headlines from NewsAPI based on your chosen topic.
🎶 Music Player – Play your favorite song from a local path via a simple voice command.
🕒 Time Updates – Ask the current time anytime.
📸 Screenshots – Take and save screenshots instantly.
🧮 Applications Access – Open essential Windows utilities via voice.
🌐 Website Shortcuts – Quickly open popular sites like YouTube, Google, Wikipedia, etc.
💬 Persistent Logging – Every conversation (user prompt + AI response) is stored in responses.txt.
🔊 Speech Synthesis & Recognition – Powered by Microsoft SAPI and Google Speech Recognition.
🧠 Threaded Asynchronous Speech – Speak and listen simultaneously with smooth execution.
graph TD
A[🎤 User Voice Input] --> B[Speech Recognition]
B --> C{Command Detection}
C -->|Weather Query| D[🌤️ OpenWeatherMap API]
C -->|News Query| E[📰 NewsAPI]
C -->|AI Chat| F[🤖 Groq LLaMA 3.1]
C -->|Website| G[🌐 Web Browser]
C -->|Music| H[🎵 Music Player]
C -->|Screenshot| I[📸 PyAutoGUI]
C -->|App Control| J[💻 Windows Apps]
C -->|Time| K[🕒 System Time]
D --> L[Response Generation]
E --> L
G --> L
H --> L
I --> L
J --> L
K --> L
F --> M[📝 Log to responses.txt]
M --> L
L --> N[🔊 Text-to-Speech]
N --> O[✨ Voice Output]
style A fill:#00FFFF,stroke:#0080FF,stroke-width:3px,color:#000
style O fill:#00FF00,stroke:#008000,stroke-width:3px,color:#000
style F fill:#FF6B35,stroke:#C23B00,stroke-width:2px
style C fill:#FFD700,stroke:#FFA500,stroke-width:2px
style L fill:#9D4EDD,stroke:#7209B7,stroke-width:2px
| Component | Technology Used |
|---|---|
| Programming Language | Python |
| AI Model | Groq LLaMA 3.1 8B Instant |
| Speech Recognition | speech_recognition (Google API) |
| Text-to-Speech Engine | Microsoft SAPI (via win32com.client) |
| Weather Data | OpenWeatherMap API |
| News Data | NewsAPI |
| Automation | pyautogui |
| Environment Management | python-dotenv |
| Threading | threading, pythoncom |
git clone https://github.com/your-username/Nexus-AI-Voice-Assistant.git
cd Nexus-AI-Voice-Assistantpython -m venv venv
venv\Scripts\activate # For Windowspip install -r requirements.txtCreate a .env file in the project directory and add your API keys:
GROQ_API_KEY = your_groq_api_key
WEATHER_API_KEY = your_openweather_api_key
NEWS_API_KEY = your_newsapi_key💡 You can obtain:
- Groq API key from https://console.groq.com
- OpenWeatherMap API key from https://openweathermap.org/api
- NewsAPI key from https://newsapi.org/register
Run the assistant with:
python main.pyWhen you see “🔊 Listening...”, speak any of these commands:
🗣 Example Commands:
-
“What’s the weather in Delhi?”
-
“Tell me the latest news about Indian politics.”
-
“Open YouTube.”
-
“Play music.”
-
“Take a screenshot.”
-
“What time is it?”
-
“Use AI to explain black holes.”
-
“Chat with me.”
Say “quit” anytime to exit 👋
-
Speech Recognition:Captures your voice and converts it to text. -
Intent Detection:Identifies what you’re asking (e.g., weather, news, chat). -
Task Execution:Calls APIs or OS-level commands accordingly. -
Response Generation:Uses the Groq LLaMA model to generate conversational replies. -
Speech Output: Converts the AI's response back into voice using Microsoft SAPI.
- Handles speech recognition failures gracefully.
- Catches API timeouts or invalid responses.
- Automatically logs activity for debugging and record-keeping.
Aryan Gupta
📍 Bhilai, Chhattisgarh
🔗 GitHub Profile
If you like this project, leave a ⭐ and share it with others!