Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Nov 18 '10 at 20:26

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

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

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:


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

Your Answer


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.