Jarvis is an advanced AI-powered chatbot assistant designed to handle a variety of tasks such as answering queries, performing real-time searches, generating images, executing system tasks, and providing voice-based interactions. Built with a modular architecture, Jarvis leverages APIs like Groq and Hugging Face, along with libraries like PyQt5, Selenium, and edge-tts for a seamless user experience.
โ ๏ธ Status: Currently in active development with new features being added regularly.
- ๐ฌ Conversational AI - Answer general and real-time queries using the Groq API
- ๐ Real-Time Search - Fetch up-to-date information using Google Search
- โ๏ธ Task Automation - Open/close applications, play music on YouTube, perform system tasks (mute, volume control, etc.)
- ๐จ Image Generation - Generate images using Hugging Face's Stable Diffusion model
- ๐ค Voice Interaction - Support for voice input (via Selenium-based speech recognition) and voice output (via edge-tts)
- ๐ฅ๏ธ Graphical Interface - A PyQt5-based GUI for user interaction
- ๐ Chat History - Maintains conversation logs for reference
- โ๏ธ Customizable - Configurable via .env file for usernames, API keys, and other settings
- ๐ Python 3.9 or higher
- ๐ Internet access
- ๐ Google Chrome (for Selenium-based voice input)
- ๐ API keys for:
- Groq API (
GROQ_API_KEY) - Hugging Face API (
HUGGING_FACE_API_KEY)
- Groq API (
git clone <repository-url>
cd jarvis-xpython -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activatepip install -r requirements.txt๐ฆ Required packages include:
groq, googlesearch-python, AppOpener, pywhatkit, requests
beautifulsoup4, rich, keyboard, PyQt5, selenium, webdriver-manager
mtranslate, Pillow, edge-tts, pygame
Create a .env file in the project root:
Username=YourName
Assistantname=Jarvis
GroqAPIKey=your-groq-api-key
HuggingFaceAPIKey=your-hugging-face-api-key
InputLanguage=en
AssistantVoice=en-US-GuyNeuralThe project automatically creates a Data directory to store logs, chat history, and generated content.
python main.py- A GUI window will appear with a microphone button to toggle voice input
- Speak or type your query (if voice input is disabled)
- Jarvis will classify your query and perform the appropriate action
- Use activation commands to control voice input
| Command | Action |
|---|---|
"Jarvis, wake up" |
Activate voice input |
"Jarvis, sleep" |
Deactivate voice input |
| Category | Example Command |
|---|---|
| ๐ General Query | "Who was Akbar?" |
| ๐ Real-time Query | "Who is the current Indian Prime Minister?" |
| ๐ Open Application | "Open Chrome" |
| ๐ต Play Music | "Play Let Her Go" |
| ๐จ Generate Image | "Generate image of a futuristic armored hero" |
| ๐ง System Task | "Mute" |
jarvis/
โโโ ๐ Core/ # Core functionality modules
โ โโโ ๐ค ChatBot.py # Handles general query answering using Groq API
โ โโโ ๐ QueryClassifier.py # Classifies user queries into task categories
โ โโโ ๐ RealTimeSearch.py # Performs real-time searches using Google
โ โโโ โ๏ธ TaskExecuter.py # Executes tasks like opening apps, playing music
โ โโโ ๐ค VoiceInput.py # Captures voice input using Selenium
โ โโโ ๐จ VisualContentCreator.py # Generates images using Hugging Face
โ โโโ ๐ VoiceOutput.py # Converts text to speech using edge-tts
โโโ ๐ Interface/ # GUI-related files
โ โโโ ๐ฅ๏ธ UI.py # PyQt5-based graphical interface
โโโ ๐ Data/ # Storage for logs and generated content
โ โโโ ๐ assistant.log # Application activity logs
โ โโโ ๐ฌ ChatLog.json # Conversation history
โ โโโ ๐ ConversationLog.json # Additional conversation log
โ โโโ ๐ผ๏ธ generated_images/ # Folder for AI-generated images
โโโ โถ๏ธ main.py # Entry point of the application
โโโ โ๏ธ .env # Configuration file for environment variables
โโโ ๐ debug.log # Debug log file for image generation
โโโ ๐ฆ requirements.txt # List of required Python packages
- ๐ค Voice Input: Requires Google Chrome for Selenium to work. Ensure ChromeDriver is compatible with your Chrome version
- ๐จ Image Generation: May take time depending on the Hugging Face API response. Generated images are saved in the Data directory
- ๐ Error Handling: Logs are stored in
Data/assistant.loganddebug.logfor debugging purposes - ๐ง Customization: Modify the
.envfile to change the assistant's name, voice, or input language
Ensure your Groq and Hugging Face API keys are valid and correctly set in the .env file.
- Check if Chrome is installed and ChromeDriver is compatible
- Ensure microphone access is granted
- Verify Selenium WebDriver setup
- Verify PyQt5 installation:
pip install PyQt5 - Check system display settings
- Try running:
python -c "import PyQt5; print('PyQt5 OK')"
- Check the
debug.logfile for API errors - Ensure your Hugging Face API key has sufficient credits
- Verify internet connection stability
This project is actively being developed and contributions are welcome!
How to contribute:
- Fork the project
- Create your feature branch
- Make your improvements
- Test thoroughly
- Submit a pull request
For major changes, please open an issue first to discuss your ideas.
๐ Built with โค๏ธ by Ritik Pandey