https://github.com/ananas1kexe/clap-to-rickroll
A Python-based utility that detects double claps via microphone to automate system actions. It forces volume to 100% via ALSA and triggers a multi-tab browser prank. Uses NumPy for real-time acoustic sharpness analysis.
https://github.com/ananas1kexe/clap-to-rickroll
audio-processing automation claps-detection cybersecurity-prank dsp numpy python rickroll
Last synced: about 1 month ago
JSON representation
A Python-based utility that detects double claps via microphone to automate system actions. It forces volume to 100% via ALSA and triggers a multi-tab browser prank. Uses NumPy for real-time acoustic sharpness analysis.
- Host: GitHub
- URL: https://github.com/ananas1kexe/clap-to-rickroll
- Owner: Ananas1kexe
- Created: 2026-05-09T09:57:00.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-09T10:16:49.000Z (about 1 month ago)
- Last Synced: 2026-05-11T13:59:02.796Z (about 1 month ago)
- Topics: audio-processing, automation, claps-detection, cybersecurity-prank, dsp, numpy, python, rickroll
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clap-to-Rickroll
An automated audio-detection script for Linux that triggers a browser-based prank via microphone input.
## Features
* **Double Clap Detection**: Uses signal processing to identify sharp acoustic peaks.
* **Auto-Volume**: Forces system audio to 100% using ALSA.
* **Rickroll Loop**: Spawns multiple browser tabs with the legendary anthem.
* **Smart Filtering**: Analyzes sound sharpness to reduce false positives from background noise.
## Dependencies
**System (Fedora/Linux):**
```bash
sudo dnf install portaudio-devel alsa-lib-devel
```
**Python:**
```bash
pip install sounddevice numpy pyalsaaudio
```
## Setup
1. Run the script: `python index.py`
2. Perform two sharp claps within **0.15s - 0.8s**.
3. The system will maximize volume and open the YouTube links.
## Configuration
* `ST`: Adjust sharpness sensitivity (lower = more sensitive).
* `DELAY_M/F`: Set the required speed of your claps.
* `COOLDOWN`: Prevents a single loud noise from being counted twice.
---
*Created for fun and local testing.*