I am trying to read .wav audio file by following code
from scipy.io import wavfile
file = 'PC1_20090513_050000_0010.wav'
rate, audio = wavfile.read(file)
but it is showing following error :
raise ValueError("Unexpected end of file.")
ValueError: Unexpected end of file.
Any idea ??
It seems that you got incorrect data in the head of wav file (http://soundfile.sapp.org/doc/WaveFormat/). VLC sometimes can handle that.
Try to resave this file with any soft. For example use sox (http://sox.sourceforge.net/) and resample to the same frequency that were (like this: sox.exe wav_file -r frequency out_wav_file
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With