I am new to audioprocessing, and need some help for my project. Could someone explain me the difference between the kind of data that is returned by librosa.load, and scipy.io.wavefile.read? The former gives an array of floats while the latter gives an integer array. And the amusing part is that the size of the array returned in both cases are different.
Please provide some insight to this. (You may use your own audiofile to reproduce the problem)
sig, sr = librosa.core.load(filepath, sr=None)
sig[:10]
array([ 0.00262944, 0.00108277, -0.00248273, -0.00865669, -0.0161767 ,
-0.01958228, -0.01867038, -0.01742653, -0.01652605, -0.01589082],
dtype=float32)
sr, y = scipy.io.wavfile.read(filepath)
y[:10]
array([ 94, -10, -217, -564, -627, -582, -527, -520, -440, -349],
dtype=int16)
print(sig.shape)
(7711,)
y.shape
(5595,)