How to read envelope from a .wav file?

Hi,

I'm trynig to read the envelope of a .wav file. I've checked some libraries but I did not find anything. The Mozzi library seems interesting, but not excaly for this aim. I want to have the values of the envelope in integer.

Thanks

I would take all the negative values, make them positive, and take a moving average. The averaging period should be about 1/10th of a second. If you file is sampled at 20 kHz you would need to average about 200 samples.

Thanks John,
But how can I read the values first? Is there any function todo it?

rume_17:
Thanks John,
But how can I read the values first? Is there any function todo it?

value = file.read()? It was my impression that the .wav file contained 1-byte raw samples. You should read about the .wav file format.