I setup a nice utility to log and record scanner radio traffic and then remove silence using SOX.  To record continuously I keep calling SOX with silence detection:function dosox() {/usr/bin/sox -t alsa -D plughw:2,0 $DATE.wav silence 1 0.1 2% 1 1.0 2% dosox  }dosoxThis works very well for ALSA sound devices.  However I now would like to get the stream from a url.  I use the URL source like:function dosox() {/usr/bin/sox -t mp3 $CHAN_URL $DATE.wav silence 1 1.0 2% 1 2.0 2%    dosox  }dosoxWith the stream SOX seems to generate many audio output files quickly.  Many of these files are near duplicates. (They contain the same transmission).  I think SOX is out running the stream cache and considering this the end of the file, then terminating.  Then when SOX is called the next time it grabs the same stream which apparently can be of audio which was already streamed.Assuming this is what is going on, I am looking for an easy way to have SOX exit on actual silence on the stream, but wait a bit when it thinks it got to the end of the stream for more audio.  Things I tried:-Used mplayer to stream to a fifo and read that in with SOX.-Tried to adjust the silence settings of the SOX silence effect.Here is an example stream
SOX detecting silence when reading mp3 from url
audio;streaming;sox