What is the corner frequency of the low-pass filter? It is kind of pointless to use a filter without specifying its corner frequency.<p>Also, peak detection can be improved a lot by searching for local maxima of the level instead of taking a threshold of the amplitude.<p>As a scientist of acoustics, I find this approach frustratingly naive. Still, nice write-up!