Refer:http://blog.csdn.net/spenghui/article/details/77500721
Normal Mode
rec radio.wav
Monitoring Mode
keep listening, when volume greater than threshold then record it. There are two threshold params. The first is for starting recording, & the second is for stopping recording.rec -p | sox -p radio.wav silence 1 0.50 2% -1 2.0 2%