Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way (via the command line) to output the decibel level of the audio coming into the soundcard's line-in jack? I want to run a script if the volume/intensity of the audio coming into line-in exceeds a certain threshold.

I've checked the files and sub-directories in /proc/asound and have played with the alsa/a* tools a bit, but I haven't found anything promising.

Any ideas/thoughts?

share|improve this question

migrated from serverfault.com Nov 18 '10 at 20:26

This question came from our site for professional system and network administrators.

add comment

2 Answers

Try rec, included in sox package, with the silence filter. You can determine a level and duration to start and stop a record. Then, you can use it as a trigger to continue the script.

There is a very good link: http://digitalcardboard.com/blog/2009/08/25/the-sox-of-silence/

Regards,

share|improve this answer
    
Hi @neogurb, welcome to SuperUser. Not totally sure you would want to spend too much time answering 2 year old questions though ;) –  Julian Knight Mar 7 '13 at 23:13
add comment

Generically, no. The data recorded is a relative value (relative to the maximum the setup will record, which varies by mic, sound card, and other factors).

If you have another piece of equipment by which you can calibrate the values output by the sound card then you can figure it out (again, for a particular setup). But without this external reference there's no way to know.

share|improve this answer
    
That makes sense. Given that, is there a command-line program that will tell me if there is audio coming into the line-in jack, regardless of strength/decibel level/volume? At the end of the day, the decibel level isn't as important - simply knowing whether or not there is a signal on the line is. –  fsmaniac Nov 18 '10 at 21:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.