A sophisticated voice-controlled personal assistant with facial recognition security and modern web interface.
Note: This project is actively developed with weekly feature updates and improvements.
-
Secure Facial Authentication
- Personalized user recognition
- Multiple user profiles support
- Secure login system
- Privacy-focused with local processing
-
Advanced Voice Command System
- Natural language processing
- Customizable command library
- Contextual responses
- Multilingual support
-
Intelligent Hotword Activation
- Responds to "Jarvis" wake word
- Configurable sensitivity
- Background noise filtering
-
Elegant Web Interface
- Modern responsive design
- Real-time visual feedback
- Chat history and interaction logging
- Dark/light theme options
-
System Automation
- Control compatible smart home devices
- Schedule tasks and reminders
- File and web search capabilities
- Calendar integration
-
Hardware:
- Webcam (720p+ recommended)
- Microphone
- Speakers/Headphones
- 4GB+ RAM recommended
- 500MB free disk space
-
Software:
- Python 3.6 or higher
- Modern web browser (Chrome/Firefox recommended)
- OpenCV with face recognition support
- Internet connection for web searches and updates
Platform | Status | Notes |
---|---|---|
Linux | โ Full support | Thoroughly tested on Ubuntu 20.04+ and Debian 10+ |
Windows | Works on Windows 10/11, may require camera configuration adjustments | |
macOS | Basic functionality works on macOS 11+ (Big Sur) |
Note: Currently primarily tested and optimized for Linux environments. Cross-platform improvements are ongoing.
Ensure you have Python 3.6+ and pip installed:
python --version
pip --version
git clone https://github.com/yourusername/jarvis.git
cd jarvis
For Linux:
bash install.sh
For Windows:
pip install -r requirements-windows.txt
For macOS:
pip install -r requirements-mac.txt
Create a .env
file in the root directory:
# API Keys
OPENAI_API_KEY=your_openai_key_here
WEATHER_API_KEY=your_weather_api_key_here
# Configuration
DEBUG_MODE=False
LOG_LEVEL=INFO
CAMERA_INDEX=0
MIC_INDEX=0
python backend/auth/sample.py
During this process:
- You'll be prompted for a numeric user ID
- Enter your name when prompted or add it to the names list
- The script will capture 100 images of your face
- Look at the camera from different angles for better recognition
- Press ESC to exit early if needed
python backend/auth/trainer.py
This will:
- Process your face samples
- Create a trainer.yml file
- Save the model in the trainer directory
- Optimize recognition parameters for your hardware
Start the main application:
python app.py
The application will:
- Initialize all services
- Open a browser window with the Jarvis UI
- Perform facial authentication
- If authenticated, display the main interface
- Begin listening for the "Jarvis" hotword
- Process commands through voice or text input
Example commands you can use:
- "Jarvis, what's the weather today?"
- "Jarvis, set a timer for 5 minutes"
- "Jarvis, play some music"
- "Jarvis, search for Python tutorials"
- "Jarvis, tell me a joke"
- "Jarvis, turn on the living room lights"
- "Jarvis, what's on my calendar today?"
- "Jarvis, send an email to John"
If face authentication isn't working:
# Verify the trainer file exists
ls -l backend/auth/trainer/trainer.yml
# Rebuild your training data in better lighting
python backend/auth/sample.py
python backend/auth/trainer.py
# Test recognition separately
python backend/auth/test_recognition.py
If the camera doesn't work:
# Check camera permissions on Linux
ls -l /dev/video*
# Ensure no other application is using the camera
sudo fuser -v /dev/video0
# Try different camera indices in your .env file
CAMERA_INDEX=1
The application tries multiple camera backends:
cv2.CAP_ANY
cv2.CAP_V4L
cv2.CAP_V4L2
cv2.CAP_DSHOW
(Windows)cv2.CAP_AVFOUNDATION
(macOS)
If voice recognition isn't working:
# Check audio input devices
python -c "import pyaudio; p = pyaudio.PyAudio(); [print(p.get_device_info_by_index(i)) for i in range(p.get_device_count())]"
# Test microphone
python backend/tests/test_audio.py
# Try different microphone indices in your .env file
MIC_INDEX=1
jarvis/
โโโ app.py # Main application entry point
โโโ backend/
โ โโโ auth/ # Authentication modules
โ โ โโโ sample.py # Captures face samples
โ โ โโโ trainer.py # Creates face recognition model
โ โ โโโ recognize.py # Authenticates users
โ โโโ command.py # Command processing
โ โโโ feature.py # Core assistant features
โ โโโ nlp/ # Natural language processing
โ โ โโโ intent.py # Intent recognition
โ โ โโโ entity.py # Entity extraction
โ โโโ utils/ # Utility functions
โ โโโ audio.py # Audio processing
โ โโโ camera.py # Camera handling
โ โโโ network.py # Network operations
โโโ frontend/ # Web interface files
โ โโโ index.html # Main UI
โ โโโ styles/ # CSS files
โ โ โโโ main.css # Main stylesheet
โ โ โโโ themes/ # Theme variations
โ โโโ scripts/ # JavaScript files
โ โ โโโ main.js # Core functionality
โ โ โโโ voice.js # Voice processing
โ โ โโโ ui.js # UI interactions
โ โโโ assets/ # Images, icons, etc.
โ โโโ img/ # Images
โ โโโ icons/ # UI icons
โ โโโ sounds/ # Audio cues
โโโ data/ # Data storage
โ โโโ faces/ # Face samples
โ โโโ users/ # User profiles
โ โโโ logs/ # Application logs
โโโ tests/ # Test modules
โโโ test_auth.py # Authentication tests
โโโ test_commands.py # Command tests
โโโ test_features.py # Feature tests
To add new commands:
- Update the
process_command
function inapp.py
:
def process_command(command):
# ... existing code ...
elif "your new command" in command:
return your_new_function()
# ... existing code ...
- Add new functions in the
feature.py
file:
def your_new_function():
# Implementation
return "Response to the user"
- Add tests for your new feature:
# tests/test_features.py
def test_your_new_function():
result = your_new_function()
assert result == "Expected response"
For better performance on resource-constrained systems:
# Run in lightweight mode
python app.py --lightweight
# Disable unnecessary features
python app.py --no-gui # Terminal mode
python app.py --no-hotword # Disable always-listening mode
To update Jarvis to the latest version:
git pull origin main
pip install -r requirements.txt
python migrate.py # Apply any database migrations
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add some amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
Please ensure your code follows the project's coding style and includes appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks in advance to all contributors and testers
- Special thanks to the OpenCV and Python communities
- All the open-source libraries that made this project possible
- Mobile application support
- Cloud sync for user preferences
- Advanced NLP for more natural conversations
- Integration with additional smart home platforms
- Offline mode for privacy-focused users