title: Detect & Record Audio in Python
body: <p>I need to capture audio clips as WAV files that I can then pass to another bit of python for processing. The problem is that I need to determine when there is audio present and then record it, stop when it goes silent and then pass that file to the processing module.</p>
  
  <p>I'm thinking it should be possible with the wave module to detect when there is pure silence and discard it then as soon as something other than silence is detected start recording, then when the line goes silent again stop the recording.</p>
  
  <p>Just can't quite get my head around it, can anyone get me started with a basic example.</p>