An open API service indexing awesome lists of open source software.

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.

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.*