Posts tagged pyaudio
Listening to Your Pipes with a MEMS Microphone and Raspberry Pi

A new type of water meter produced by Water Wise Controls (WaWiCo) introduces a novel method for water metering: non-invasive acoustic analysis. Their USB water metering kit allows users to listen to their pipes without the need for plumbing work. In this tutorial, the acoustic profile of a piping system will be explored using a Raspberry Pi computer, the Python programming language, and a WaWiCo USB water meter kit. The resulting analysis will allow users to identify the acoustic profile of their piping system and determine when water is flowing. This is the first of a series of entries into non-invasive water metering from WaWiCo, where open-source technologies will be used to characterize a piping system based on the acoustic profile of a user's home or apartment.

Read More
Audio Processing with The QuadMic 4-Microphone Array on the Raspberry Pi

The QuadMic Array is a 4-microphone array based around the AC108 quad-channel analog-to-digital converter (ADC) with Inter-IC Sound (I2S) audio output capable of interfacing with the Raspberry Pi. The QuadMic can be used for applications in voice detection and recognition, acoustic localization, noise control, and other applications in audio and acoustic analysis. The QuadMic will be connected to the header of a Raspberry Pi 4 and used to record simultaneous audio data from all four microphones. Some signal processing routines will be developed as part of an acoustic analysis with the four microphones. Algorithms will be introduced that approximate acoustic source directivity, which can help with understanding and characterizing noise sources, room and spatial geometries, and other aspects of acoustic systems. Python is also used for the analysis. Additionally, visualizations will aid in the understanding of the measurements and subsequent analyses conducts in this tutorial.

Read More
Recording Stereo Audio on a Raspberry Pi

The INMP441 MEMS microphone is used to record audio using a Raspberry Pi board through the inter-IC sound (I2S or I2S) bus. The I2S standard uses three wires to record data, keep track of timing (clock), and determine whether an input/output is in the left channel or right channel. First, the Raspberry Pi (RPi) needs to be prepped for I2S communication by creating/enabling an audio port in the RPi OS system. This audio port will then be used to communicate with MEMS microphones and consequently record stereo audio (one left channel, one right channel). Python iS then used to record the 2-channel audio via the pyaudio Python audio library. Finally, the audio data will be visualized and analyzed in Python with simple digital signal processing methods that include Fast Fourier Transforms (FFTs), noise subtraction, and frequency spectrum peak detection.

Read More
Loudspeaker Analysis and Experiments: Part II

Part II of the tutorial series on loudspeaker analysis and experiments. The majority of this entry focuses on finding Thiele-Small parameters to fully characterize an electrodynamic loudspeaker in free air.

Read More
Audio Processing in Python Part II: Exploring Windowing, Sound Pressure Levels, and A-Weighting Using an iPhone X

Raspberry Pi 3B+ acoustic analysis using Python. Audio recording and signal processing with Python, beginning with a discussion of windowing and sampling, which will outline the limitations of the Fourier space representation of a signal. Discussion of the frequency spectrum, and weighting phenomenon in relation to the human auditory system will also be explored. Lastly, the significance of microphone pressure units and conversion to the decibel will be briefly introduced and explained.

Read More