Thursday, April 23, 2026

Raspberry Pi reveals songbirds’ favourite sounds

Prateek Sahu, a graduate student from the University of Alberta in Canada, works on the auditory perception of songbirds at the institution’s Songbird Neuroethology Lab. He helped develop a cost-effective way to study songbirds’ auditory preferences using Raspberry Pi, and penned this guest post explaining the project.

Do you enjoy listening to birds chattering while on a walk outside, or to your pet bird singing at home? Do you sometimes admire how beautifully they sing, and at other times wonder why they make so much noise? Songbirds communicate with one another for many different reasons, such as attracting mates, alerting others to food or danger, and simply staying in contact with other birds. But did you know that they also develop preferences for certain vocalisations along the way, much like you might prefer music from a particular singer or band?

Songbird auditory preferences

Since the 1950s, researchers have been studying song learning and preferences in birds, exploring whether they prefer their own songs to others’, their parents’ songs to a stranger’s, or conspecific songs (from the same species) to heterospecific ones (from a different species), among other factors. However, traditional experimental setups — including the ones previously used in our lab — relied on expensive, custom-designed digital I/O hardware, making them relatively inaccessible.

In 2025, a team of us at the Songbird Neuroethology Lab developed a cost-effective way to study songbirds’ auditory preferences using a Raspberry Pi Zero 2 W. We wanted to control various parameters and even add new ones to the experiment, so instead of wrestling around with an old, poorly documented system, we decided to build a DIY setup using a Raspberry Pi as the primary brain.

Making the auditory preference setup

As you might imagine, an auditory preference setup revolves around sound playback — accurate audio reproduction is one of its most critical components. We used a HiFiBerry DAC+ Zero and 8-ohm Dayton Audio full-range speakers set within the frequency range of animal vocalisations, making the setup both small and portable.  

Songbirds like to perch constantly; by installing IR sensors on multiple perches (we opted for Adafruit IR Break Beam sensors), audio playback can be triggered as they move from perch to perch, allowing the bird to select which stimulus plays. Because listening to birdsong is self-reinforcing, birds will seek out and replay the songs they like most. This lets us measure their preference for certain classes of vocalisations.

The experiment is controlled by a simple Python script that can be easily modified to adjust which parameters are measured and how the output is formatted. Because Raspberry Pi Zero 2 W supports Wi-Fi — and because internet access can be extended with Ethernet via a USB hub — the experiment can be monitored remotely through SSH. The data is stored on the Raspberry Pi’s SD card and can be retrieved using a program such as WinSCP.    

Affordable setup

Our DIY setup cost under $200 CAD (approx. $145 USD) to make and delivers functionality similar to traditional systems, with room for expansion through additional components like audio recorders and camera modules. Despite its low cost, the setup matches commercial systems in both response detection and accuracy. On top of that, Raspberry Pi Zero 2 W consumes very little power and can run for extended periods without failure. This opens the door for researchers across disciplines to explore songbirds’ auditory preferences with ease.

You can read our open-access paper, A cost-effective Raspberry Pi-based operant playback setup to evaluate auditory preferences in songbirds, to learn more about the setup and how to build your own.

The post Raspberry Pi reveals songbirds’ favourite sounds appeared first on Raspberry Pi.



from News - Raspberry Pi https://ift.tt/crkaWhM

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home