Skip to contentSkip to conversation

Command line utility to detect sound

DISCUSSION NickRob 2 participants 3 messages Aug 12, 2009 – Aug 13, 2009 Sound

lore
Share & tools
lore

NickRob

author
#0 lore raw

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.
#1 lore raw
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

#2 lore raw
In reply to NickRob

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