Closed seacj closed 3 years ago
wavfile.read()
does not apply any normalization, whereas soundfile.read()
applies normalization. You need to normalize the data returned by wavfile.read()
as: audio0 = audio0/32767.
to get similar output as soundfile.read()
. import numpy as np
a = [65, 63, 123, 162, 169, 119]
np.array(a)/32767.
output:
array([0.0019837 , 0.00192267, 0.00375378, 0.004944 , 0.00515763, 0.0036317 ])
which is the output of soundfile.read()
wavfile.read()
is faster than soundfile.read()
@seacj I have reproduced similar results using wavfile.read()
without any normalization, so it seems that it doesn't affect the performance.
@seacj I have reproduced similar results using
wavfile.read()
without any normalization, so it seems that it doesn't affect the performance.
Thank you. That's right.
Here the scale is dfferent. Does it affect the performance of the model because the input feature changes? (I also notised that wavfile is faster than soundfile, but the latest code adopt soundfile)