Running this on OSX, so need to install sox
first:
brew install sox
Then paste this file somewhere, and run it in the background with:
bash monitor-audio-levels.sh
As of right now, it only add a character to /tmp/threshold-tally.txt
for every 5-second interval where volume exceeds the arbitrary "3" threshold. Would be really useful to timestamp each, and convert to JSON that we can send to a custom leftronic.com dashboard widget, and get a rough idea of how much of the day a room's volume exceeds a given threshold.