DIY Sound Source Localization System using Raspberry Pi

We designed a smart sound localization system using Raspberry Pi that can find the source of the sound and localize and visualize it.

Sound localization is the ability to determine the location of a sound source based on the sound waves that reach the ear. It is a fundamental aspect of hearing and is essential for orienting ourselves around and interacting with others.

Sound imaging, on the other hand, aims to create a mental image of the location and spatial characteristics of sounds in the environment. It involves the brain integrating information from both ears and using cues such as the intensity, timing, and frequency of sound waves to create a mental map of the location and characteristics of sound sources.

Sound localization can be used in many ways to hit people in the flood or use source sound localization or make the smart robot follow a particular sound to get the animal or footage or the audio-based research system.

Sound localization is now used to detect drones and shoot them in the sky based on sound localization and tracking systems.

Fig 1 Mic array leads showing sound direction and intensity

Bill of Materials

IngredientsamountDescriptionPrice Approx
Raspberry Pi 411Gb or 2 GB or 4000
MIC Array 14mic /6 mics array Respeaker / Sipeed5000
5V Power Adapter1Power supply for raspberry pi100

Sound Localization System – Code

First, install the mic array driver for the mic array you are using; it changes the driver model and mic array and vendors, they give you the details for that, or install the driver given in the instruction by them.

For 3D sound localization and visualization, ODAS studio is used; it runs the algorithm and analyzes the sound waves, and gives you 3d sound data.

ODAS depends on node js so we need to install open terminal and then run the command.

sudo apt install curl
curl -sL | sudo -E bash -
sudo apt install nodejs

Now install ODAS by running the following in the terminal.

sudo apt-get install libfftw3-dev
sudo apt-get install libconfig-dev
sudo apt-get install libasound2-dev
git clone
cd odas
mkdir build
cd build
cmake ../
git clone
npm install

Now we need to place the mic array and then you can start ODAS and do the configuration according to the mic array. If you have a 6 mic array or 4 mics array, then configure accordingly, then start odas using the following command.

Now you will see the ODAS GUI.

npm start
Sound Localization System ODAS GUI

Sound Source Localization System works

Now put the Mic array board on the raspberry pi GPIO and connect them, then select the config file in the ODAS GUI and click start now; it starts showing live data on the 3v globe from where the sound is coming from. ON MIC array if your mic array has an LED, then it will light up according to the direction and intensity of the sound source.

ODAS Indicates the direction of sound
fig ODAS Indicates the direction of sound

You can check it out to understand more about the sound source localization system.

Source link


Leave a Comment

Your email address will not be published.