In read_wave(), the call to normalize() makes issue: if read_wave() then write(), the new audio is different in amp.
Suggest don't call normalize(), but convert data to [-1.0, 1.0] using: ys = ys * 1.0 / ( 2 ** (sampwidth * 8 - 1));
122,123d121
< ys = ys * 1.0 / ( 2 ** (sampwidth * 8 - 1));
<
126,127c124
<
< # wave.normalize()