Imagine you are at a noisy restaurant, you hear the clanging of the dishes, the hearty laughs from the patrons around you, the musical ambience, and you are struggling to hear your friend from across the table. Wouldn’t it be nice if the primary noise that you hear was solely from your friend? That is the problem that sound source localization can help solve.
Sound source localization, as you might have guessed, is the process of identifying unique noises that you want to amplify. It is how your Amazon Echo Dot identifies who is speaking to it with the little ring at the top. For Engineering Open House, we wanted to create a device that can mimic the colorful ring at the top in a fun, creative way. Instead of a colorful light ring, we wanted to use a mannequin head that turns towards the audience when they speak to it.
My colleague Manan and I designed “Alexander”, the spinning head that can detect speech. We knew our system had to contain a microphone array, a processor to control the localization system and a motor to turn the mannequin head. Our choices of each component are as follows:
The Microphone Array: The Matrix Creator
The Matrix Creator is a powerful development board that contains an FPGA system, sensors, an array with 8 microphones and other interesting features. Although this hobbyist board has numerous functions that can drive intensive prototypes, we simply used it for its easy-to-interface microphone array. With an extensive library and helpful documentation, the Matrix company played a big part in assisting us with this project.
Interested in this product? Find it here: https://www.matrix.one/products/creator
The Processor: Raspberry Pi 3
The Raspberry Pi is a cheap, yet extremely useful computer system that can run the Raspbian OS and is an excellent prototyping system. Its widespread use and open-source community makes this component relatively easy to use and is the “brain” of our project. And it made an easy choice because of how easy it connects to the Matrix Creator through the GPIO pins.
To learn more about the Raspberry Pi visit https://www.raspberrypi.org/products/raspberry-pi-3-model-b/
The Motor: Servo
We chose to spin the head using a servo. The Matrix Creator includes documentation and code for using a servo with its localization library. In addition, servo’s are cheap and readily available.
One way to perform sound source localization is to use Direction of Arrival (DOA) estimations. DOA estimations are calculations that determine the direction of where a signal is coming from. Many times it is determined from beamforming techniques such as constructive/destructive signal interference and signal delays. We wanted to use these estimations in our design and the ODAS (Open embeddeD Audition System) library provided by the Matrix company included basic DOA estimation approximation programs. These approximation programs generated a real time angle calculation to determine in what direction the sound was coming from. The software was loaded onto the Raspberry Pi and determined the direction from the data supplied by the microphone array on the Matrix Creator board.
Finally, we added the Servo using another interface program from ODAS. This program allowed us to communicate with the Matrix Creator and the Servo and the Servo spun in the direction determined by the DOA program. With the Servo spinning in the direction of speech, all that was left to do was add our lovely Styrofoam head – Alexander – and construct a simple shelf for the head to spin on. A video of the demonstration is shown below from Engineering Open House: