Skip to content

Latest commit

ย 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

J.A.R.V.I.S AI ๐Ÿค–

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)

JARVIS Interface

โœจ Features

  • ๐Ÿ—ฃ๏ธ 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

๐Ÿ›  Tech Stack

  • 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

๐Ÿ“ฆ Installation

Prerequisites

  • Python 3.11+
  • Git

1. Clone the Repository

git clone https://github.com/yourusername/jarvis-ai.git
cd jarvis-ai

2. Set Up Python Environment

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt

3. Configure Environment Variables

Create a .env file in the root directory:

GOOGLE_API_KEY=your_gemini_api_key_here

Get your Gemini API key from: https://ai.google.dev/

4. Run the Application

uvicorn src.app.main:app --reload --port 8000

Visit http://localhost:8000 in your browser (Chrome recommended for best compatibility).

๐Ÿณ Docker Deployment

Build and Run with Docker

docker build -t jarvis-ai .
docker run -p 8000:8000 -e GOOGLE_API_KEY=your_key_here jarvis-ai

Deploy to Render.com

  1. Push your code to GitHub
  2. Create a new Web Service on Render.com
  3. Connect your repository
  4. Add GOOGLE_API_KEY as an environment variable
  5. Deploy!

Render will automatically detect the Dockerfile and build your app.

๐ŸŽฎ Usage

  1. Text Input: Type your message in the input field and click "SEND"
  2. Voice Input: Click the microphone button (๐ŸŽค) and speak
  3. Voice Output: JARVIS will respond with both text and audio
  4. Interactive Avatar: The Arc Reactor pulses and rotates in sync with audio

๐Ÿ”ง Project Structure

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

๐ŸŽจ Customization

Change the Voice Model

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"

Adjust JARVIS Personality

Edit src/app/services/llm_service.py to modify the system prompt.

Customize UI Colors

Edit the CSS in src/static/index.html to change the color scheme.

โšก Performance Notes

  • 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

โš ๏ธ Disclaimer

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

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿค Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

๐Ÿ“ง Contact

For questions or suggestions, open an issue on GitHub.


Built with โค๏ธ by a fan who just wanted to talk to JARVIS

About

๐Ÿค– Voice-activated AI assistant with a holographic Arc Reactor interface. Built with FastAPI, Gemini, Three.js & custom JARVIS voice model.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages