VAD-python icon indicating copy to clipboard operation
VAD-python copied to clipboard

ValueError: Unexpected end of file

Open EbtesamJubran opened this issue 5 years ago • 3 comments

I had an issue when i am running the code; it says: Traceback (most recent call last): File "detectVoiceInWave.py", line 6, in v = VoiceActivityDetector(filename) File "/home/ebtesam/Desktop/Code/VAD-python-master/VAD-python-master/vad.py", line 11, in init self._read_wav(wave_input_filename)._convert_to_mono() File "/home/ebtesam/Desktop/Code/VAD-python-master/VAD-python-master/vad.py", line 20, in _read_wav self.rate, self.data = wf.read(wave_file) File "/home/ebtesam/.local/lib/python3.7/site-packages/scipy/io/wavfile.py", line 246, in read raise ValueError("Unexpected end of file.") ValueError: Unexpected end of file.

how can i solve it?

EbtesamJubran avatar Aug 12 '19 06:08 EbtesamJubran

Hello @EbtesamJubran I think your file might be corrupted, have you tried this with different files?

Sadam1195 avatar Aug 21 '19 09:08 Sadam1195

Hey! Thank you for your reply. Actually, I have mp4 files and I converted it online to .wav and it didn't work with me. However, I used another online convertor to convert mp4 files to .wav and it works correctly.

EbtesamJubran avatar Aug 22 '19 14:08 EbtesamJubran

@EbtesamJubran Glad that I could help. You can close the issue now. :)

Sadam1195 avatar Aug 26 '19 10:08 Sadam1195