python; audio; detecting silence in audio signal
i'm not gonna deal with python nor numpy nor any other parochial computational platform.


first, since "silence" is a perceptual property, you need to apply a weighting filter, such as A-weighting to boost the frequency components of the audio that our ears are more sensitive to and attenuate the portions we're less sensitive to.  there are other weighting curves besides A-weighting.  i like Robert Wannamaker's E-weighting the best.
then square the filtered signal (to get power or energy).
then low-pass filter the squared and filtered signal (to get an envelope).
then compare this envelope to a threshold that will correspond to the threshold of hearing.
lastly, you may need to put in a little hysteresis in the threshold comparison so that the silence/no-silence result does not jitter as your envelope crosses the threshold.


this is similar to the "gate" function in a compressor/limiter/gate process that sometimes finds expression in audio applications.  the "gate" was to make sure that something that's perceived as silence (or sufficiently low-level that it should be perceived as silence) becomes zero during the "silent" periods of time.