2

Im trying to get my Raspberry do stuff, based on the audio level of a played song. The song shouldn't neccessarily be a local mp3 file on the Raspberry. Let me explain it like this:

If (audio level above threshold): do something..

I've found this http://freshfoo.com/posts/pulseaudio_monitoring/ and Real time audio input/output in Python with PyAudio which is pretty much what im looking for i guess, but i have to be able, reading single samples in order to compare it with thresholds ill be using. https://stackoverflow.com/questions/604453/analyze-audio-using-fast-fourier-transform is also a topic that could help, if there was a code on how the creater got those numbers. I hope u can help me out with this, for further informations just ask :)

Slowmo
  • 21
  • 1
  • 2

1 Answers1

1

Try sox library, I don't find it necessary to implement your own fft code for that, sox has easy tool for stuff like this, here is the link. https://linux.die.net/man/1/sox you probably just need "silence" but try it with high threshold. If you want to use it in .py file you just need to import a sox implemented library like https://pypi.python.org/pypi/sox