SONER listens for a double clap on your microphone and launches your daily product-building stack: terminal at the project directory, Slack, Brave browser, and optionally a welcome message via ElevenLabs TTS.
A native PySide6 desktop window shows real-time audio levels, clap indicators, status, and a live log.
Clap twice → terminal opens at ~/Desktop, Slack launches, Brave opens, and you're ready to build.
- Double-clap detection — configurable sensitivity, spike ratio, noise floor adaptation, and timing windows
- Desktop GUI — dark-themed PySide6 window with RMS meter, clap dots, status badge, and scrollable log
- Product launch stack — opens terminal, Slack, and Brave on double clap
- Smart launch — only opens apps that aren't already running (terminal & Brave)
- ElevenLabs TTS — welcomes you with a cached, customizable spoken phrase
- Real-time noise adaptation — continuously tracks noise floor and adjusts threshold automatically
- Linux-optimized — built and tested on Linux Mint (X-Cinnamon)
- Python 3.11+
- A working microphone
- gnome-terminal (for terminal launch)
- Slack (for team communication)
- Brave Browser (for web/research)
- ElevenLabs API key (optional, TTS skipped without it)
# Clone and enter the directory
git clone https://github.com/Mosss-OS/SONER.git
cd SONER
# Create a virtual environment and install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtEdit the constants at the top of soner.py:
| Constant | Default | Description |
|---|---|---|
SAMPLE_RATE |
48000 | Audio sample rate; try 44100 if your device doesn't support 48000 |
INPUT_DEVICE |
4 | Microphone device index; None for system default |
SPIKE_RATIO |
3.0 | Higher = fewer false triggers; lower = catches quieter claps |
MIN_RMS |
0.005 | Absolute floor for spike detection (helps in quiet rooms) |
COOLDOWN_S |
0.45 | Minimum seconds between double-clap actions |
MAX_DOUBLE_GAP_S |
0.40 | Maximum gap between the two claps |
BLOCK_MS |
50 | Audio analysis window in milliseconds |
WORK_DIR |
~/Desktop | Directory the terminal opens to |
Create a .env file in the project root:
ELEVENLABS_API_KEY=your_key_here
ELEVENLABS_VOICE_ID=your_voice_id_hereWithout ELEVENLABS_API_KEY and ELEVENLABS_VOICE_ID, the welcome speech is skipped (all other actions still run).
# With GUI
python soner.py
# Headless (no GUI — just audio detection and logging)
# Set SHOW_GUI=False in soner.py or modify MainWindow logicThe window title reads SONER - Clap Listener. Stop with Ctrl+C.
sounddevicereads the microphone in blocks- Each block's RMS energy is compared to an adaptive noise floor
- A spike above
noise_floor * SPIKE_RATIO(and at leastMIN_RMS) triggers a clap event - Two claps within
MAX_DOUBLE_GAP_S= double clap detected - Actions run in a background thread:
- Spotify URI opens in browser
- Claude opens in Brave (monitor 1)
- Binance BTC opens in Brave (monitor 3)
- Windsurf focuses/opens
- ElevenLabs welcome plays (once per process)
| Symptom | Fix |
|---|---|
| False triggers on background noise | Raise SPIKE_RATIO (e.g., 6.0–8.0) or MIN_RMS |
| Claps not detected | Lower SPIKE_RATIO (e.g., 2.0–3.0) or clap closer to the mic |
| Input Overflow warnings | Raise BLOCK_MS (e.g., 150–200) |
| Double clap not registering | Widen MIN_DOUBLE_GAP_S / MAX_DOUBLE_GAP_S |
├── soner.py # Main application
├── requirements.txt # Python dependencies
├── README.md # This file
├── .env # Environment variables (not tracked)
├── .gitignore # Git ignore rules
└── .cache/ # Cached TTS audio (auto-created)
Based on the original jarvis concept by hectorg2211. Rewritten with PySide6 GUI, Windsurf support, adaptive noise floor tuning, and multi-monitor Brave window management.
MIT