Skip to content

ritikpandey01/Jarvis-X

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Jarvis - Advanced AI Chatbot Assistant

๐Ÿ“‹ Overview

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.

โœจ Features

  • ๐Ÿ’ฌ 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

๐Ÿ“‹ Prerequisites

  • ๐Ÿ 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)

๐Ÿš€ Installation

1๏ธโƒฃ Clone the Repository

git clone <repository-url>
cd jarvis-x

2๏ธโƒฃ Set Up Virtual Environment (recommended)

python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

3๏ธโƒฃ Install Dependencies

pip 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

4๏ธโƒฃ Configure Environment Variables

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-GuyNeural

5๏ธโƒฃ Setup Complete!

The project automatically creates a Data directory to store logs, chat history, and generated content.

๐ŸŽฏ Usage

๐Ÿƒโ€โ™‚๏ธ Run the Application

python main.py

๐Ÿ—ฃ๏ธ Interact with Jarvis

  • 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

๐ŸŽฎ Voice Control Commands

Command Action
"Jarvis, wake up" Activate voice input
"Jarvis, sleep" Deactivate voice input

๐Ÿ’ก Example Commands

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"

๐Ÿ“ Project Structure

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

๐Ÿ“ Important Notes

  • ๐ŸŽค 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.log and debug.log for debugging purposes
  • ๐Ÿ”ง Customization: Modify the .env file to change the assistant's name, voice, or input language

๐Ÿ› ๏ธ Troubleshooting

๐Ÿ”‘ API Key Issues

Ensure your Groq and Hugging Face API keys are valid and correctly set in the .env file.

๐ŸŽค Voice Input Not Working

  • Check if Chrome is installed and ChromeDriver is compatible
  • Ensure microphone access is granted
  • Verify Selenium WebDriver setup

๐Ÿ–ฅ๏ธ GUI Not Displaying

  • Verify PyQt5 installation: pip install PyQt5
  • Check system display settings
  • Try running: python -c "import PyQt5; print('PyQt5 OK')"

๐ŸŽจ Image Generation Fails

  • Check the debug.log file for API errors
  • Ensure your Hugging Face API key has sufficient credits
  • Verify internet connection stability

๐Ÿค Contributing

This project is actively being developed and contributions are welcome!

How to contribute:

  1. Fork the project
  2. Create your feature branch
  3. Make your improvements
  4. Test thoroughly
  5. Submit a pull request

For major changes, please open an issue first to discuss your ideas.


๐Ÿš€ Built with โค๏ธ by Ritik Pandey

About

๐Ÿ” Jarvis is a personal AI assistant that brings together conversation, automation, and creativity in one place. It can chat intelligently, search the web in real-time, generate images, control your system, and respond to voice commands - all through natural language interaction.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages