A voice-activated AI assistant inspired by Iron Man's J.A.R.V.I.S., featuring a stunning holographic Arc Reactor interface and real-time audio responses.
๐ด Live Demo: Try JARVIS now โ
(Note: Free tier may take ~30s to wake up)
- ๐ฃ๏ธ Voice Input/Output - Talk to JARVIS using your microphone, get audio responses
- โ๏ธ Arc Reactor HUD - Procedurally generated 3D interface with audio-reactive animations
- ๐ง Google Gemini AI - Fast, intelligent responses powered by Gemini LLM
- ๐๏ธ Custom Voice - British accent using the community-trained JARVIS voice model
- ๐ Real-time Streaming - WebSocket-based sentence-level audio streaming for low latency
- ๐ Stunning UI - Purple/cyan neon theme with glassmorphism effects
- Backend: FastAPI (Python) + WebSockets
- AI Brain: Google Gemini API
- Voice (TTS): Piper TTS with custom JARVIS model from Hugging Face
- Voice (STT): Web Speech API (built into Chrome)
- Frontend: Vanilla JavaScript + Three.js
- Deployment: Docker-ready, deployed on Render.com
- Python 3.11+
- Git
git clone https://github.com/yourusername/jarvis-ai.git
cd jarvis-aipython -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txtCreate a .env file in the root directory:
GOOGLE_API_KEY=your_gemini_api_key_hereGet your Gemini API key from: https://ai.google.dev/
uvicorn src.app.main:app --reload --port 8000Visit http://localhost:8000 in your browser (Chrome recommended for best compatibility).
docker build -t jarvis-ai .
docker run -p 8000:8000 -e GOOGLE_API_KEY=your_key_here jarvis-ai- Push your code to GitHub
- Create a new Web Service on Render.com
- Connect your repository
- Add
GOOGLE_API_KEYas an environment variable - Deploy!
Render will automatically detect the Dockerfile and build your app.
- Text Input: Type your message in the input field and click "SEND"
- Voice Input: Click the microphone button (๐ค) and speak
- Voice Output: JARVIS will respond with both text and audio
- Interactive Avatar: The Arc Reactor pulses and rotates in sync with audio
jarvis_ai/
โโโ src/
โ โโโ app/
โ โ โโโ main.py # FastAPI server & WebSocket endpoint
โ โ โโโ services/
โ โ โโโ llm_service.py # Gemini integration
โ โ โโโ tts_service.py # Piper TTS with HuggingFace model
โ โ โโโ websocket_manager.py # WebSocket connection manager
โ โโโ static/
โ โโโ index.html # Frontend UI (HTML + Three.js)
โโโ Dockerfile # Docker configuration
โโโ requirements.txt # Python dependencies
โโโ fly.toml # Fly.io deployment config
โโโ README.md
Edit src/app/services/tts_service.py:
# Switch from 'medium' to 'high' for better quality (requires more CPU)
self.model_filename = "en/en_GB/jarvis/high/jarvis-high.onnx"
self.config_filename = "en/en_GB/jarvis/high/jarvis-high.onnx.json"Edit src/app/services/llm_service.py to modify the system prompt.
Edit the CSS in src/static/index.html to change the color scheme.
- Local Development: The high-quality voice model runs instantly on decent hardware (M1 Mac, modern Intel/AMD)
- Render Free Tier: Uses the medium-quality model to balance quality and speed on limited CPU
- Recommended: For production, deploy on a VPS with 1GB+ RAM (DigitalOcean, Fly.io, etc.) for best performance
This project is for educational and personal entertainment purposes only.
The voice model mimics the character J.A.R.V.I.S. (voiced by Paul Bettany) from Marvel Studios. It is a community-trained model and is not licensed for commercial use.
- โ Do not use for commercial products
- โ Do not use to impersonate real individuals
- โ Respect intellectual property rights
This project is licensed under the MIT License - see the LICENSE file for details.
- Piper TTS - Fast neural TTS engine
- jgkawell/jarvis - Custom JARVIS voice model
- Google Gemini - Powerful LLM API
- Three.js - 3D graphics library
- Marvel Studios & Paul Bettany - Original JARVIS inspiration
Contributions are welcome! Feel free to open issues or submit pull requests.
For questions or suggestions, open an issue on GitHub.
Built with โค๏ธ by a fan who just wanted to talk to JARVIS
