🧠 brainrot

brainrot is a voice-controlled, hacker-themed AI music assistant that combines live ASCII webcam feeds, AI-powered song recommendations, and terminal-style interaction into a fun, cyberpunk-inspired web app. Just talk to it β€” it listens, recommends songs, and even roasts you if you slouch.

πŸš€ Features

  • πŸŽ™ Voice command interface
  • 🎡 AI-generated song recommendations using GPT
  • πŸ“Ή Live ASCII webcam stream (via OpenCV)
  • 🎧 YouTube Music integration (embedded video player)
  • πŸ–₯ Terminal-style UI with dark hacker aesthetics

πŸ“‚ Project Structure

brainrot/
β”‚
β”œβ”€β”€ app.py                  # Flask server handling routes and AI interactions
β”œβ”€β”€ ascii_video_stream.py   # Live webcam feed rendered as ASCII
β”œβ”€β”€ templates/
β”‚   └── index.html          # Main frontend page
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ style.css           # Hacker-themed styling
β”‚   └── script.js           # Voice input and interactive UI logic
β”œβ”€β”€ cat.mp4                 # Sample video
β”œβ”€β”€ spinning_record.mp4     # Music animation
β”œβ”€β”€ thor.mp4                # Another themed video
└── requirements.txt        # Python dependencies

πŸ›  Installation

  1. Clone the repo:
   git clone https://github.com/yourusername/brainrot.git
   cd brainrot
  1. Install dependencies:
   pip install -r requirements.txt
  1. Run the app:
   python app.py
  1. Visit:
    Open http://localhost:5000 in your browser.

🎀 Voice Commands

Use natural commands like:

  • Play something chill
  • Next song
  • Help

πŸ“¦ Dependencies

See requirements.txt for full list. Key packages:

  • Flask
  • OpenCV (cv2)
  • SpeechRecognition
  • pyttsx3
  • gTTS
  • moviepy
  • numpy

πŸ€– AI Integration

This app uses OpenAI's GPT API for generating song recommendations and witty comebacks. You can set your API key in your environment variables or inject it directly in app.py.

πŸ“Έ Screenshots

Add your own screenshots here to show off the layout, terminal UI, webcam feed, etc.

✨ Credits

Created as a fun side project to combine music, AI, and live video feeds into a single cool interface. Inspired by cyberpunk vibes and hacker culture.


About the Project

brainrot was born from a simple idea: what if your music assistant looked like it belonged in a cyberpunk movie terminal? We wanted to reimagine how people interact with AI-powered tools by combining natural language voice commands, real-time feedback, and a retro-hacker aesthetic into a single immersive experience.

🎧 Inspiration

The project was inspired by:

  • The retro-futuristic vibe of hacker movies and terminals
  • The rise of AI-driven music discovery tools
  • The idea of merging human-computer interaction with modern voice technology in a playful way

We wanted to create something that felt more like a sidekick than a sterile assistant β€” something that listens, responds, and vibes with you.

πŸ›  How We Built It

We used:

  • Flask as the backend web framework to serve the app and manage voice interactions
  • OpenAI’s GPT API to generate dynamic song recommendations based on voice input
  • SpeechRecognition for capturing voice commands directly from the browser
  • JavaScript + Web APIs for handling real-time speech and interfacing with the backend
  • YouTube embeds to serve the actual music with visuals
  • OpenCV + ASCII rendering for a live webcam feed that fits the hacker aesthetic
  • HTML/CSS/JS to build the terminal-style UI, complete with animation and a dark theme

🧠 What We Learned

  • How to integrate voice recognition in the browser and bridge it with Flask via API calls
  • The art of using prompt engineering with GPT to generate relevant music recs
  • Real-time video processing using OpenCV and converting frames to ASCII on the fly
  • Designing engaging user interfaces that are functional, minimal, and thematic
  • Handling asynchronous input (voice, video, user interaction) smoothly in a web app

🚧 Challenges We Faced

  • Making real-time voice recognition work reliably across browsers
  • Syncing voice command responses with UI updates and music playback
  • Keeping the webcam ASCII feed performant without freezing the app
  • Balancing the fun β€œterminal aesthetic” while still being usable and intuitive

Built With

Share this project:

Updates