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 :)

asked Dec 9, 2016 at 10:34
2
  • 1
    Majority of StackExchange users chime here to read more or less challenging questions and answering them. Very few users, if any, come here to get advice on how to spend their free time by reading articles that someone (like you) read and to ask those users (like you) questions. Commented Dec 9, 2016 at 10:51
  • well i see your point but my problem is that i dont have any aproach and all im asking for is if there is any library or function that i can use for my purpose. im sorry if u got me wrong here.. and i also wrote that i could give further information for my question, if needed.. Commented Dec 9, 2016 at 12:01

1 Answer 1

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

answered Dec 12, 2016 at 18:05

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.