Editor's take: The way Roni Bandini describes the Raspberry Pi project makes it seem relatively straightforward and built on a shoestring – for example, he used the metal enclosure from a broken audio board as one of the parts. But the project could come with some legal risks so beware when trying this yourself.

Not a confrontational person? Or to be more precise, you're not a confrontational person who doesn't appreciate the musical stylings of reggaeton music blasted at full volume through a wall you share with a neighbor at 9 in the morning? That was Raspberry Pi maker and developer Roni Bandini's predicament, and while annoying, he also saw the intrusion as an opportunity to build an AI device that could handle the situation more creatively.

Thus, Reggaeton Be Gone was born, the name selected as an homage to the Tv-B-Gone device. It can monitor room audio and identify the reggaeton genre with machine learning. Then it triggers comm requests and packets to the Bluetooth speaker with the goal of disabling it or at least disturbing the sound so much that the neighbor will be forced to turn it off.

Also read: Ever Wonder How the Shazam Algorithm Works?

It's not foolproof. For example, not all Bluetooth speakers are vulnerable, and the speaker needs to be relatively close to the Raspberry Pi Bluetooth to reach it. Furthermore, Bandini's project comes with some possible legal risks, so make sure it is in compliance with local laws and regulations before trying it. Bandini also warns people to use it only with their own Bluetooth speakers "for educational purposes."

With those disclaimers out of the way, this is roughly how he did it.

A Raspberry Pi 3 B+ was connected to a DFRobot OLED display panel with a 128 x 32px resolution. A USB microphone was used to handle the audio, and a push button is used to control when the system checks for the presence of reggaeton music within earshot.

Other parts that went into the project included a microSD card, 5V 3A power supply, female to female jumper cables and a 3d printed case front.

There are several music genre AI classification datasets and models like GTZAN, but Bandini did not find a reggaeton category, so he had to train their own model, noting that reggaeton's classic syncopated rhythm pattern makes it ideal for machine learning pattern recognition.

Bandini plans to publish how he trained the model soon but did say after downloading several songs and exporting them to 16khz wav, the wavs were uploaded to the Edge Impulse platform.

There's far more that went into the project, which Bandini describes here.