VAD-python
VAD-python copied to clipboard
ValueError: Unexpected end of file
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?
Hello @EbtesamJubran I think your file might be corrupted, have you tried this with different files?
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 Glad that I could help. You can close the issue now. :)