Envelope reconstruction algorithm for audio processing
I would recommend a streaming RMS detector. The standard approach for computing a streaming RMS detector is to square the input samples and then apply these to a 1st-order lowpass filter. If you want the output in dB, take 10*log10() of this quantity. If you want the output in volts, take the square root of this quantity. If Logs and square-roots are too heavy for your processor, there are low-mips ways to approximate them.
Note that RMS detection offers a good compromise between a peak detector (which is often over-responsive to very narrow transients) and average (which is sometimes too slow). Also, the ear tends to approximate RMS dynamics in its perception of loudness.