Peak to peak range and IQR for silence detection

Rather than specifying absolute sample limits for both the max
and min sample values in a given chunk, specify the maximum
difference – that is, the maximum allowable max_ - min_.

Using this delta helps us avoid problems with DC offset – if a signal
is not centered on the sample range midpoint, we'll still be able
to use the same silence limits, since we're only looking at how much
of the sample range the signal is covering.

For additional robustness, we also have a delta parameter for the
IRQ: The difference between the first and third quartile values
for the sample values in the given chunk.

This helps avoid false results from sporadic noise which might lead
to high max/min values but is less likely to falsely boost the
Q1/Q3 values – since if it did, it would mean a significant number
of samples in the chunk had large absolute value.

Note that since we can expect most audio signals to be fairly
symmetric across the zero point (ignoring any DC offset), the IQR
is effectively measuring the 50th percentile sample absolute values.

At the moment, both the peak and IQR ranges are specified as sample
values relative to a 16 bit sample width, then normalized relative
to the actual sample width at runtime.

Finally, to make this work, we need real sample values from
frame_to_sample: The padding to four byte values has to go.
Tune peak and IQR silence limits

Add some logging and reasonable presets/defaults for the new peak
and IQR delta silence limit settings.

We still don't have CLI for overriding these.
Comment out noisiest debug logs.
Shorter chunk timings. Update tests to match.

Set the timings back down to much more agressive, more responsive
values. Chunks are now 100 ms long, pre- and post-roll are 200 ms
and 100 ms, respectively, and the audible segment termination
hysteresis window is 1000 ms (whereas the original SNARP code
had an unspecified effective hysteresis window of 3000 ms).

This lets us clip audio segments much closer to the actual audible
portions while still being reasonably generous with not cutting
apart short bursts of silence with a longer audible segment.

Update tests to use expected file lengths for the new, shorter
chunk sizes.

Remove hardcoded SILENCE_MIN and SILENCE_MAX since we're now using
deltas.
dBFS for silence limit specification

Change the silence limit specifications to decibels relative to
full scale (dBFS). This means, for example, that 0 dB is a full
scale wave signal, maxing out the sample width, and -6 dB is a
signal that only uses 50% of the sample width.

For reference, some of preset limits we're assuming are that
-15 dBFS peak to peak and -24 dBFS 50th percentile should pick up
conversational speech, while -27 dBFS peak/-36 dBFS 50th percentile
will pick up whispered speech.

Note that while we're stating dBFS for the level spec, we're actually
not measuring whether the signal comes that close to clipping.
Instead, we're measuring whether the peak-to-peak or quartile 1
to quartile 3 distance is greater than the relevant dBFS limit.

This makes us more robust against DC offsets in the input source
without requiring us to detect or fix any possible offsets.

Convert the default settings (whisper, quiet, and conversational)
to dBFS.

Provide a function to convert dBFS to sample value given a sample
width in bits.

Use this conversion function to convert the desired dBFS value to
sample values before passing them to the silence tagger generator.

Remove SILENCE_MIN and SILENCE_MAX CLI settings.

Add peak silence and IQR (i.e. 50th percentile) silence limit CLI
options, specified in dBFS.

Add CLI options to trigger the conversational, quiet, and whipser
silence level presets.
Clean up logging

Fix up logging to use Python 2.5 compatible formatters and
remove print statements.
Record statistics to file

Offer CLI option to record a "statistics" file containing dBFS values
for the peak and IQR ranges measured for silence detection. This file
can be analyzed to find the best silence limits to use for the
audio in question.
Add analysis script to show histograms of stats

Use pandas and matplotlib to draw histograms of the sample ranges
recorded in a stats file by SNARP. Useful for figuring out the best
silence dBFS limits to set.

N.B. The requirements file is probably over-large at the moment and
     should be tightened up.
Merge pull request #2 from casebeer/dbfs-delta-silence-algo

dbFS delta silence algorithm