I read an audio file (an instrumental music file that is mono and 16000) with wav.read (read function from scipy.io.wavfile.) This function gives me a data file in int16 format. When I change the type to float and write it again I hear a lot of jitter. Why does that happen?
Here is my script in python 3.6. This is the music file.
import scipy.io.wavfile as wav
from scipy.io.wavfile import write
rate, music = wav.read("music.wav")
music = np.expand_dims(music, -1)
music_float = music.astype('float')
write("float_music", rate, music_float)
write
function is it that you call there? it's notwav.write
, it seems! $\endgroup$scipy.io.wavfile.write
(as you've probably done): You didn't adhere to the admissible input value range, did you? I see no scaling! $\endgroup$