title = soundMeter
heading = Making a Sound Meter in Python
subheading = A basic usage of audio handling libraries for creating a fun sound-meter!
category = Tutorials
tags = Python, Audio
author = Krish Mehta
date = August 4, 2016
//(DO NOT REMOVE THESE LINES)
//(WRITE YOUR BLOG BELOW FROM LINE 12)
Those who have seen the 3 blocks of audience in PCSA compete during the STAB Orientation for the loudest cheer, know what this Sound Meter is.
To analyse any incoming sound(be it mic or laptop microphone) and find its maximum volume. Actually, using other detailed operations you can estimate the frequency etc. Basically, once we read the audio input stream we can use the desired computations on it.
Plan of action
This is roughly what we need to do:
Read the input from the laptop microphone or the mic(in our case, that requires setting it to default recording device)
Find the maximum value of the sound channels over a chunk of inputs.
pyaudio for audio stream input.
audioop for max value analysis.
pygame for display.