Edge Machine Learning device that recognizes reggaeton and triggers a Bluetooth test routine on a configured speaker
Roni Bandini — Buenos Aires, Argentina — February 2024
Reggaeton Be Gone is an experimental Raspberry Pi device inspired by TV-B-Gone.
It continuously samples ambient audio, uses an Edge Impulse audio-classification model to determine whether reggaeton is playing, displays the inference confidence on a 128×32 OLED, and—when the configured threshold is exceeded—triggers a Bluetooth test routine against a configured speaker.
The original motivation was simple: a neighboring Bluetooth speaker playing loud reggaeton every morning.
The resulting project combines:
- 🎙️ Audio acquisition
- 🧠 Edge Machine Learning
- 🎵 Music-genre classification
- 🍓 Raspberry Pi
- 📡 Bluetooth experimentation
- 🖥️ OLED feedback
- 📝 Event logging
A later project explores the Bluetooth side without Machine Learning or a Raspberry Pi.
Pocket Gone is smaller, cheaper and portable:
The evolution from Reggaeton Be Gone to Pocket Gone was also presented at Nerdearla 2025:
👉 Pocket Gone — Nerdearla / NERDflix
flowchart LR
MUSIC["🎵 Ambient Music"]
MIC["🎙️ USB Microphone"]
PI["🍓 Raspberry Pi 3"]
EI["🧠 Edge Impulse<br/>AudioImpulseRunner"]
CLASS{"reggaeton?"}
OLED["🖥️ 128×32 OLED"]
LOG["📝 log.txt"]
BT["📡 Bluetooth Test Routine"]
SPEAKER["🔊 Configured Speaker"]
MUSIC --> MIC
MIC --> PI
PI --> EI
EI --> CLASS
CLASS --> OLED
CLASS --> LOG
CLASS -->|"score > threshold"| BT
BT --> SPEAKER
The ML inference runs locally on the Raspberry Pi using an Edge Impulse .eim deployment.
- 🎵 Reggaeton / other-music classification
- 🧠 Edge Impulse Linux inference
- 🎙️ USB microphone or USB audio interface
- 🖥️ 128×32 SSD1306 OLED
- 🔘 Physical start button
- 🎯 Configurable inference threshold
- 📡 Configurable Bluetooth target
- 📝 Timestamped activity log
- 🔬 Multiple experimental Bluetooth methods
- 🧪 Manual
forceFiretest mode - 🖼️ Custom OLED graphics and font
- 🧱 3D-printed front panel
- 🔄 Several later experimental versions
The original model was trained because common music-genre datasets such as GTZAN did not provide a dedicated reggaeton class.
The workflow was:
flowchart LR
SONGS["🎵 Music Samples"]
WAV["WAV<br/>Mono / 16 kHz"]
SPLIT["✂️ 4 s Windows"]
MFE["🔬 MFE"]
NN["🧠 Classification"]
EIM["📦 Linux ARM .eim"]
PI["🍓 Raspberry Pi"]
SONGS --> WAV
WAV --> SPLIT
SPLIT --> MFE
MFE --> NN
NN --> EIM
EIM --> PI
Original settings documented for Version 1:
| Parameter | Value |
|---|---|
| Audio | Mono WAV |
| Sample rate | 16 kHz |
| Window size | 4000 ms |
| Processing | MFE |
| Learning block | Classification |
| Target deployment | Linux ARM |
| Runtime format | .eim |
The current source expects:
model = "reggaetonbgone-linux-armv7-v4.eim"A public reference model is now available on Hugging Face:
The model card specifies:
Audio: 16 kHz WAV / mono
Labels:
- reggaeton
- otros
The published reference model was trained with only six songs, so the model card recommends training a larger dataset for improved generalization.
This is particularly important when deploying the classifier in rooms with:
- speech
- television
- other music genres
- different speakers
- background noise
- varying microphone distance
The Python application uses:
from edge_impulse_linux.audio import AudioImpulseRunnerand initializes the model with:
with AudioImpulseRunner(modelfile) as runner:
model_info = runner.init()
labels = model_info['model_parameters']['labels']Audio is continuously classified through:
for res, audio in runner.classifier(
device_id=selectedDeviceId
):The configured USB input is:
selectedDeviceId = 1Change this value to match the desired microphone/audio interface.
Version 1.0 currently uses:
threshold = 0.95or:
95% confidence
The program specifically watches the:
reggaeton
class.
Below the threshold, the OLED displays:
Is reggaeton?
87.42 %
The relevant logic is:
if label == 'reggaeton' and score <= threshold:
updateScreen(
"Is reggaeton?",
str(round(score * 100, 2)) + " %"
)When the threshold is exceeded:
if label == 'reggaeton' and (
score > threshold or forceFire == 1
):the configured Bluetooth test action is triggered.
The principal settings are grouped near the beginning of:
myPath = "/home/pi/reggaeton/"
selectedDeviceId = 1
method = 1
targetAddr = ":::::"
packagesSize = 800
threadsCount = 1000
threshold = 0.95
myDelay = 0.1
forceFire = 0
model = "reggaetonbgone-linux-armv7-v4.eim"| Setting | Purpose |
|---|---|
myPath |
Runtime asset directory |
selectedDeviceId |
Audio input |
method |
Bluetooth experiment mode |
targetAddr |
Test speaker address |
packagesSize |
Method-specific parameter |
threadsCount |
Number of repetitions |
threshold |
ML confidence threshold |
myDelay |
Delay between actions |
forceFire |
Skip ML trigger for testing |
model |
Edge Impulse .eim |
The source code is intended for controlled experimentation with hardware you own.
The application does not immediately begin audio classification.
GPIO configuration:
GPIO.setmode(GPIO.BCM)
buttonPin = 26
GPIO.setup(
buttonPin,
GPIO.IN,
pull_up_down=GPIO.PUD_UP
)The program waits at:
Waiting for button...
until GPIO 26 is pulled LOW.
After the button is pressed:
Listening...
and audio inference begins.
The build uses a monochrome SSD1306 128×32 OLED.
disp = Adafruit_SSD1306.SSD1306_128_32(
rst=None
)The screen displays information such as:
Reggaeton BeGone
Listening...
and:
Reggaeton BeGone
Is reggaeton?
92.61 %
The UI is rendered using Pillow:
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFontCustom font:
font = ImageFont.truetype(
'whitrabt.ttf',
12
)| OLED | Raspberry Pi |
|---|---|
| SDA | GPIO 2 |
| SCL | GPIO 3 |
| VCC | Power |
| GND | GND |
Enable I²C with:
sudo raspi-configand verify the display with:
i2cdetect -y 1| Button | Raspberry Pi |
|---|---|
| Pin 1 | GPIO 26 |
| Pin 2 | GND |
The internal pull-up is enabled in software.
Connect either:
USB microphone
or:
USB audio interface + microphone
The original build used a Behringer Xenyx 302USB.
| Component | Quantity |
|---|---|
| Raspberry Pi 3 | 1 |
| DFRobot 128×32 OLED | 1 |
| DFRobot Push Button | 1 |
| USB microphone / USB audio interface | 1 |
| microSD card | 1 |
| 5 V / 3 A power supply | 1 |
| Female-female jumper wires | Several |
| Bluetooth speaker for controlled testing | 1 |
| Custom enclosure/front panel | 1 |
An optional external Bluetooth adapter can also be used for experimental versions.
flowchart TD
START["Power On"]
UI["Display Target + Method"]
WAIT["🔘 Wait for Button"]
LOAD["🧠 Load .eim Model"]
LISTEN["🎙️ Capture Audio"]
CLASSIFY["Run Classification"]
SCORE{"reggaeton > 95%?"}
OLED["🖥️ Display Score"]
LOG["📝 Write Log"]
ACTION["📡 Trigger Test Routine"]
START --> UI
UI --> WAIT
WAIT --> LOAD
LOAD --> LISTEN
LISTEN --> CLASSIFY
CLASSIFY --> SCORE
SCORE -->|"No"| OLED
OLED --> LISTEN
SCORE -->|"Yes"| LOG
LOG --> ACTION
ACTION --> LISTEN
Every major operation is written to:
log.txt
with a timestamp:
now = datetime.datetime.now()
dtFormatted = now.strftime(
"%Y-%m-%d %H:%M:%S"
)Events include:
Started
Listening
AI model ...
Firing threshold ...
Interrupted
This is useful for comparing inference behavior with the audio being played during experiments.
The code expects a slightly different runtime layout from the flat GitHub repository.
A practical deployment is:
/home/pi/reggaeton/
│
├── reggaetonBeGone.py
├── reggaetonbgone-linux-armv7-v4.eim
├── whitrabt.ttf
├── log.txt
│
└── images/
└── logo.png
This matters because the current source loads:
myPath + 'images/logo.png'while the GitHub repository currently stores logo.png at repository root.
Either create the images/ directory as above or change the image path in the Python source.
Install Raspberry Pi OS:
Enable:
SSH
I²C
through:
sudo raspi-configThe application requires:
- Python 3
- Edge Impulse Linux SDK
- PortAudio / PyAudio
- Raspberry Pi GPIO
- Pillow
- Adafruit SSD1306
- Adafruit GPIO
- BlueZ
The original complete dependency procedure is preserved in:
👉 Reggaeton Be Gone — Hackster.io
Edge Impulse Linux SDK:
👉 edgeimpulse/linux-sdk-python
Clone the repository:
git clone \
https://github.com/ronibandini/reggaetonBeGone.git
cd reggaetonBeGoneRepository:
👉 github.com/ronibandini/reggaetonBeGone
Prepare the runtime assets:
logo.png
whitrabt.ttf
Edge Impulse .eim model
Then configure:
myPath
selectedDeviceId
threshold
targetAddr
methodin:
Run the application in a controlled test environment with your own Bluetooth speaker.
reggaetonBeGone/
│
├── reggaetonBeGone.py
├── README.md
├── LICENSE
│
├── logo.png
├── sticker.png
├── whitrabt.ttf
└── log.txt
- 🐍
reggaetonBeGone.py— Version 1.0 application - 📝
log.txt— sample runtime log - 🖼️
logo.png— OLED graphic - 🏷️
sticker.png— enclosure artwork - 🔤
whitrabt.ttf— display font - ⚖️
LICENSE— MIT License
The version available in this GitHub repository.
Features:
Raspberry Pi 3
Edge Impulse audio classification
128×32 OLED
GPIO start button
Configured Bluetooth target
Two experimental test methods
Activity log
Source:
Released to participants of the Nerdearla Chile 2024 workshop.
Improvements documented by the author include:
64-bit support
On-device Bluetooth scanning
Strike system to reduce false positives
Process cleanup
Updated ML model
Workshop:
👉 Reggaeton Be Gone — Nerdearla / NERDflix
Background:
👉 Workshop Reggaeton Be Gone en Nerdearla Chile — Medium
Created for the Ekoparty 2024 workshop.
The experimental release added further scanning, model and external-radio improvements.
Workshop announcement:
👉 Cómo armar un Reggaeton Be Gone en Ekoparty
More version history:
Complete Spanish workshop covering:
- hardware
- Machine Learning
- assembly
- limitations
- Version 2.0
The later talk follows the evolution from Reggaeton Be Gone to Pocket Gone.
The original February 26, 2024 build documents the circuit, Raspberry Pi configuration, ML training, audio input, OLED interface and enclosure.
👉 Reggaeton Be Gone — Hackster.io
Detailed development history, versions, ML workflow, results, conferences and press coverage.
👉 Reggaeton Be Gone — Roni Bandini / Medium
16 kHz mono Edge Impulse model with reggaeton and otros labels.
👉 Reggaeton Be Gone Model — Hugging Face
Published February 27, 2024.
👉 Reggaeton Be Gone, la máquina impulsada por IA que bloquea bocinas Bluetooth — WIRED
Published February 23, 2024.
👉 Reggaeton-Be-Gone Disconnects Obnoxious Bluetooth Speakers — Hackaday
👉 Pardon the Interruption — Hackster
Published February 28, 2024.
👉 La musica del vicino è fastidiosa? Ecco la soluzione da hacker — Tom's Hardware
Published April 9, 2024.
👉 Reggaeton Be Gone: esta máquina casera silencia la música de los vecinos usando IA — Euronews
👉 Latino crea aparato para hackear y apagar bocinas que reproduzcan reggaetón — Univision
Feature on maker culture, Reggaeton Be Gone and other experimental machines.
👉 Roni Bandini, el creador de la antena anti reggaeton — La Nación
Audio keyword recognition with Edge Impulse running directly on a Particle Photon 2.
👉 github.com/ronibandini/Photon2VoiceCommand
Audio TinyML on Arduino Nano 33 BLE Sense for recognizing the sound of paper page turns.
👉 github.com/ronibandini/ReadingTime
Computer Vision inference connected to a physical control system.
👉 github.com/ronibandini/TIAM62AITrafficLight
Audio output triggered by Edge Impulse Computer Vision classification.
👉 github.com/ronibandini/domesticLMLRAD
Contracultura Maker is a book by Roni Bandini about maker culture, experimental electronics, AI, physical computing and technological autonomy.
Reggaeton Be Gone is one of the projects connected with this approach to building deliberately unusual technological artifacts.
📂 Contracultura Maker — GitHub repository
📕 Download Contracultura Maker PDF
Roni Bandini Maker · AI Developer · Writer Buenos Aires, Argentina
- 🐙 GitHub — @ronibandini
- 🌐 Medium — @ronibandini
- 𝕏 X / Twitter — @RoniBandini
- 📸 Instagram — @ronibandini
▶️ YouTube — @RoniBandini- 💼 LinkedIn — Roni Bandini
Built with 🎵 + Raspberry Pi + Edge Machine Learning + Bluetooth.
