Command line utility to detect sound
Hi
I would like to find a command line utility that will detect sound above a certain volume and do something like terminate with a status or issue a signal that can be trapped by another process. I haven't been able to find anything, but using the words sound and detection together in google leads inexorably to sound card detection!
Alternatively, which library/app would be the best one to start with if I need to adapt something? I'm an experienced programmer, but not with sound.
Thanks for any help you can give me.
Nick
Signature · 2 lines
View this message in context: http://www.nabble.com/Command-line-utility-to-detect-sound-tp24940295p24940295.html Sent from the linux-sound mailing list archive at Nabble.com.
Jörn Nettingsmeier
Quoted 10 lines · NickRob
Hi
I would like to find a command line utility that will detect sound above a certain volume and do something like terminate with a status or issue a signal that can be trapped by another process. I haven't been able to find anything, but using the words sound and detection together in google leads inexorably to sound card detection!
Alternatively, which library/app would be the best one to start with if I need to adapt something? I'm an experienced programmer, but not with sound.
check out the linux audio developers' mailing list. for your particular application, grab the swh ladspa plugin set, check out the compressors. they contain code for envelope followers, which will compute the energy of a sound signal using the root-mean-square method. rip it out (it's gpl) and add some C glue around it to tie into your shell scripts or whatever it is you want to do.
best,
jörn
Hi Jörn
Thank you very much for your reply. I will follow up your suggestions.
Best Wishes
Nick
Quoted 24 lines · Jörn Nettingsmeier
Quoted 10 lines · NickRob
Hi
I would like to find a command line utility that will detect sound above a certain volume and do something like terminate with a status or issue a signal that can be trapped by another process. I haven't been able to find anything, but using the words sound and detection together in google leads inexorably to sound card detection!
Alternatively, which library/app would be the best one to start with if I need to adapt something? I'm an experienced programmer, but not with sound.
check out the linux audio developers' mailing list. for your particular application, grab the swh ladspa plugin set, check out the compressors. they contain code for envelope followers, which will compute the energy of a sound signal using the root-mean-square method. rip it out (it's gpl) and add some C glue around it to tie into your shell scripts or whatever it is you want to do.
best,
jörn