Furthermore, on the technical side, it's not too easy to calculate some number corresponding to the perceived loudness level, especially not as some answers suggested to parse the RMS-signal number output by the command-line tools "aplay"/"arecord". You'd need at least to take the (non-linear in amplitude, dependent on frequency) weighting curves shown on the wikipedia-page for "Loudness" into account:
http://en.wikipedia.org/wiki/Loudness
Then, you'd have to take into account how annoying a sound is, which is obviously highly dependant on the circumstances: A colleague might drive you mad with only very quiet squeeking of his chair, but a lound regularly humming machine you might be able to completely mask out mentally so that you don't even remember if it was turned on or off at some day.
Putting these technical things back to the (morally questionable) problem at hand: If you don't "punish", "educate" or "feedback" your children according to a quantity that they can actually perceive and whose magnitude they can judge, they will experience this apparatus to be highly unfair.
And, additionally, if I would put such a machinery to use, my children would with absolute certainty become masters in creating the most appallingly unpleasant and annoying sounds one can imagine that just don't reach the threshold of the machine. And they would be completely right doing so ;-).
Edit: Typos, "tools aplay/arecord".