An always-on Arch Linux voice and clap trigger that launches your desktop tools after login.
After you boot your laptop and log into your desktop session, a background listener waits for either of these independent triggers:
- two claps
- the exact phrase
Wake up, daddy's home
When either trigger matches, it launches:
- Brave with a configured URL
ghostty- VS Code
This project uses a native Linux microphone listener. Brave is only launched as an action target and does not need microphone permission.
listener.pycaptures microphone audio withffmpegthrough PipeWire/Pulse.- Clap detection runs on raw PCM frames using peak and RMS thresholds plus a short double-clap timing window.
- Phrase detection uses Vosk with an offline English speech model.
- A
systemd --userservice keeps the listener running after login. - When a trigger fires, the listener launches the configured desktop commands and enforces cooldowns to avoid spam.
listener.py: main listener and launcherconfig.json: phrase, clap thresholds, device, commandsrequirements.txt: Python dependency listsystemd/wake-home-listener.service: reusable user service unit
- Arch Linux or another Linux desktop with PipeWire/Pulse support
ffmpeg- Python 3
- a working microphone
- a Vosk English model
- Clone the repo:
git clone https://github.com/dasturchioka/tony-stark-setup.git
cd tony-stark-setup- Create a virtual environment and install Python dependencies:
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt- Download and extract the small English Vosk model:
mkdir -p model
cd model
curl -LO https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip
unzip -o vosk-model-small-en-us-0.15.zip
cd ..-
Adjust
config.jsonif needed. -
Install the user service:
mkdir -p ~/.config/systemd/user
cp systemd/wake-home-listener.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now wake-home-listener.serviceDefault config values:
- phrase:
Wake up, daddy's home - URL:
https://youtu.be/KPeT0jTcWGU - commands: Brave, Ghostty, VS Code
- clap timing window:
900 ms - clap cooldown:
12000 ms - phrase cooldown:
12000 ms - global action cooldown:
15000 ms
You can change the trigger phrase, target URL, launch commands, device name, and clap thresholds in config.json.
Run the listener directly before enabling the service:
.venv/bin/python listener.pyThen test:
- clap twice
- say
Wake up, daddy's home
Check listener.log to see recognized phrases and trigger events.
- Raise
clap_peak_thresholdif claps trigger too easily. - Raise
clap_rms_thresholdif background noise causes false positives. - Raise
clap_window_msif your double clap is slower. - Change
deviceifdefaultis not the microphone source you want.
- Clap and speech recognition are not mathematically 100% certain.
- Vosk phrase recognition quality depends on microphone quality, background noise, and pronunciation.
- The service starts after login, not before login.
MIT