Record and analyze your brain activity in minutesβno complex software required.
A complete web-based solution for recording EEG data from the Muse 2 headset and processing it with scientific-grade analysis. Built with web-muse, this app lets you collect and analyze EEG data entirely in your browser, then dive deeper with our Python post-processing pipeline.
The app guides you through four intuitive phases:
Initial setup screen - ready to connect |
Connected! |
Configure your recording duration
5-second countdown with helpful tips to ensure quality recording
Real-time progress tracking during your recording session |
Beautiful EEG visualization |
Detailed channel statistics, download your data as CSV |
- π No Installation Required: Record EEG directly in your browserβjust open and connect
- π― Beginner Friendly: Guided workflow takes you from connection to analysis in minutes
- π¬ Research-Grade: Scientific analysis pipeline with artifact removal and band power extraction
- π Complete Solution: From raw recording to publication-ready metrics
- π Open Source: Free, transparent, and customizable
- Track Meditation Progress: Monitor alpha and theta waves during meditation
- Study Focus & Attention: Analyze beta waves during cognitive tasks
- Sleep Research: Examine delta waves and sleep stages
- Neurofeedback Training: Real-time brain state monitoring
- Education: Learn about brain signals hands-on
- Research Projects: Collect EEG data for experiments
npm install
npm run devOpen https://localhost:3000, connect your Muse 2, and start recording!
cd post-recording
./install.sh
source venv/bin/activate
python process_eeg.py ../data/your_recording.csvGet instant results: band powers, clinical ratios, and beautiful visualizations.
- π― One-Click Connection: Connect to Muse 2 via Web Bluetoothβno drivers needed
- β±οΈ Flexible Recording: Set duration from 1 to 300 seconds
- π§ Guided Process: Preparation countdown with helpful tips
- π Live Visualization: See your brain waves in real-time
- πΎ Instant Export: Download CSV with all 4 channels
- π Quality Metrics: Review statistics for each electrode
- π§Ή AutoReject: Automatic artifact detection and removal
- π Power Analysis: Welch's method PSD with customizable parameters
- π΅ Frequency Bands: Delta, Theta, Alpha, Beta, Gamma
- πΌοΈ Visualizations: 4-panel summary plots
- πΎ Standard Formats: Export to EDF for use with other tools
- web-muse: Modern JavaScript library for Muse EEG connectivity
- Active development and maintenance
- Web Bluetooth API integration
- Works with current Muse firmware
- Includes React hooks and context
- React 18: Modern, responsive UI
- Vite: Fast development with HTTPS support
- MNE-Python: Gold-standard EEG analysis library
- AutoReject: Automated artifact removal
This app uses the web-muse library (included in the web-muse/ folder) for connecting to Muse devices via Web Bluetooth. Unlike older libraries like muse-js, web-muse is actively maintained and works reliably with modern Muse firmware. It provides a clean API and React hooks for easy integration.
- Hardware: Muse 2 or Muse S headset
- Browser: Chrome, Edge, or Opera (Web Bluetooth required)
- Software:
- Node.js v18+ (for web app)
- Python 3.8+ (for analysis, optional)
- Install dependencies:
npm install- Start the development server:
npm run dev-
Open your browser to
https://localhost:3000 -
Accept the self-signed certificate warning (required for local HTTPS)
- Click "Connect Muse 2 Headset" to pair with your device
- Set your desired recording duration (1-300 seconds)
- Click "Start Recording Session"
- Follow the on-screen tips to prepare for recording
- 5-second countdown before recording begins
- Stay still and relaxed
- Keep your eyes open and focused
- Stay still during the recording
- Watch the countdown timer
- Progress bar shows recording progress
- View your EEG data plotted with offset channels
- Review statistics for each electrode:
- TP9: Left ear electrode
- AF7: Left forehead electrode
- AF8: Right forehead electrode
- TP10: Right ear electrode
- Download your data as CSV
- Start a new recording if desired
The exported CSV file contains:
- Column 1: Timestamp (milliseconds)
- Column 2: TP9 - Left ear (Β΅V)
- Column 3: AF7 - Left forehead (Β΅V)
- Column 4: AF8 - Right forehead (Β΅V)
- Column 5: TP10 - Right ear (Β΅V)
Sample rate: ~256 Hz
- Frontend: React 18 with Vite
- Connection: Web Bluetooth API via web-muse library
- Visualization: HTML5 Canvas
- Data Export: Client-side CSV generation
The Muse 2 headset provides 4 main EEG channels:
- TP9: Left temporal position (behind left ear)
- AF7: Left frontal position (left forehead)
- AF8: Right frontal position (right forehead)
- TP10: Right temporal position (behind right ear)
- Raw EEG data is collected at 256 Hz
- Each sample is timestamped relative to recording start
- Data is stored in memory during recording
- Visualization uses offset plotting for clear channel separation
- Ensure your Muse 2 is powered on and in pairing mode
- Make sure Bluetooth is enabled on your computer
- Try refreshing the page and connecting again
- Use Chrome, Edge, or Opera (Firefox doesn't support Web Bluetooth)
- Web Bluetooth only works over HTTPS
- The dev server is configured for HTTPS
- You may need to accept the self-signed certificate
- Ensure the headset is properly fitted
- Check that all electrodes are making good contact
- Try moistening the electrode contacts slightly
| Browser | Supported | Notes |
|---|---|---|
| Chrome | β Yes | Recommended |
| Edge | β Yes | Full support |
| Opera | β Yes | Full support |
| Firefox | β No | No Web Bluetooth |
| Safari | β No | No Web Bluetooth |
npm run buildThe built files will be in the dist directory.
The app can be deployed to any static hosting service that supports HTTPS (required for Web Bluetooth):
- Build the app:
npm run build - Deploy the
distfolder to GitHub Pages - Ensure HTTPS is enabled (automatic on GitHub Pages)
- Connect your GitHub repository to Vercel
- Vercel will automatically detect Vite and build
- Deploy with one click
- Connect your repository or drag-and-drop the
distfolder - Build command:
npm run build - Publish directory:
dist
- Build the app:
npm run build - Upload
distfolder to your server - Important: Configure HTTPS (required for Web Bluetooth)
- Serve files with any static web server (nginx, Apache, etc.)
- Uses HTTPS (not HTTP)
- Has a valid SSL certificate
- Serves from
https://orlocalhost
Most modern hosting services provide HTTPS by default.
After recording EEG data, process it with our scientific-grade Python pipeline to extract meaningful insights.
cd post-recording
./install.shThis creates a Python virtual environment and installs all required dependencies (MNE-Python, AutoReject, etc.).
After recording in the web app, your CSV file downloads to your Downloads folder. Move it to the data/ folder:
# Option A: Using command line
mv ~/Downloads/eeg_recording_*.csv data/
# Option B: Manually
# Drag and drop the CSV file from Downloads into the 'data' foldersource post-recording/venv/bin/activateYou should see (venv) appear in your terminal prompt.
python post-recording/process_eeg.py data/eeg_recording_YYYY-MM-DDTHH-MM-SS.csvExample with actual filename:
python post-recording/process_eeg.py data/eeg_recording_2025-10-07T22-30-47.csvPro tip: Use tab completion! Type python post-recording/process_eeg.py data/eeg_ and press Tab to autocomplete.
The pipeline will automatically generate:
- β
<filename>.edf- Standard EDF format (universal compatibility) - β
<filename>_band_powers.csv- Detailed band powers per epoch and channel - β
<filename>_summary.csv- Summary statistics averaged by channel - β
<filename>_summary_plot.png- 4-panel visualization (see example above)
All files are saved in the same data/ folder as your input CSV.
- Converts CSV to EDF - Standard format compatible with other EEG tools
- Applies Bandpass Filter - 1.0-40 Hz to remove noise
- AutoReject Preprocessing - Automatically detects and removes bad epochs
- Welch PSD Analysis - Calculates power spectral density (2s window, 1s overlap)
- Band Power Extraction - Computes Delta, Theta, Alpha, Beta, Gamma powers
- Generates Visualization - Creates comprehensive 4-panel summary plot
Processing: data/eeg_recording_2025-10-07T22-30-47.csv
β Converted to EDF format
β Preprocessing complete (20% epochs rejected)
β PSD analysis complete
β Band powers calculated
β Results saved
Output files:
- data/eeg_recording_2025-10-07T22-30-47.edf
- data/eeg_recording_2025-10-07T22-30-47_band_powers.csv
- data/eeg_recording_2025-10-07T22-30-47_summary.csv
- data/eeg_recording_2025-10-07T22-30-47_summary_plot.png
Process all recordings at once:
python post-recording/batch_process.py data/This will process every eeg_recording_*.csv file in the data folder.
See post-recording/README.md for:
- Custom frequency bands
- Advanced parameters
- Troubleshooting
- Individual script usage
eeg-recorder-app/
βββ src/ # React app source code
β βββ components/ # React components (4 recording phases)
β βββ utils/ # Data recording and CSV export utilities
β βββ App.jsx # Main app component
β βββ styles.css # Modern UI styling
βββ web-muse/ # Web Bluetooth Muse connectivity library
βββ post-recording/ # Python post-processing pipeline
β βββ process_eeg.py # Main processing script
β βββ csv_to_edf.py # CSV to EDF converter
β βββ preprocessing.py # AutoReject preprocessing
β βββ psd_analysis.py # PSD and band power analysis
β βββ visualization.py # Summary plot generation
β βββ README.md # Post-processing documentation
βββ data/ # Your recorded EEG data (gitignored)
βββ README.md # This file
βββ QUICKSTART.md # 10-minute getting started guide
βββ PROJECT_SUMMARY.md # Detailed project overview
- Ensure good electrode contact (especially behind the ears)
- Sit still and relax during recording
- Minimize jaw clenching and facial movements
- Record for at least 30-60 seconds for reliable analysis
- Check that epoch rejection rate is <30%
- Compare recordings under similar conditions
- Use longer recordings for more stable power estimates
- Export to EDF format for compatibility with other tools
Contributions are welcome! This project aims to make EEG recording accessible to everyone. Feel free to:
- Report bugs or suggest features via GitHub issues
- Submit pull requests with improvements
- Share your use cases and results
- Improve documentation
- QUICKSTART.md: Get recording in 10 minutes
- PROJECT_SUMMARY.md: Detailed technical overview
- post-recording/README.md: Analysis pipeline documentation
- web-muse: The Muse connectivity library powering this app
- Not for Medical Use: This is a consumer-grade device for research and personal exploration only
- HTTPS Required: Web Bluetooth only works over secure connections
- Data Privacy: All data stays on your deviceβnothing is uploaded anywhere
- Research Tool: Best for within-subject comparisons and learning about EEG
ISC License - see LICENSE file for details
- Built with web-muse - A modern, actively maintained library for Muse connectivity
- Powered by MNE-Python - The leading EEG/MEG analysis library
- Artifact removal via AutoReject - Automated quality control for EEG






