Hello.
I have a project I am working on where when a sensor is tripped, a random audio file is played (sound effect) and I want to turn on an LED when the sound file reaches a certain db level or noise level. Think ,,,light an LED when a gun shot is played sort of thing. I am currently using python to play the audio file in a callback by using os.system and sending it to mpg123.
The question is, does anyone know of a way to get the db or noise level of a file the raspberry pi is playing? Im sending the sound out the 3.5 jack if that matters.