Record audio when sound is detected, like "motion" does for video SoX's rec with the silence predicate can mimic this.