Mp3 files give a "File contains data in an unknown format" error
I couldn't get it to work. Here's the full error stack. The file is an mp3 file with MPEG Audio Layer 1/2 codec (mpga), at 48khz
Found 232 wav or mp3 files ------ process audio C:/Users/Music/Mantovani\Adios Muchachos.mp3 converting mp3 to wav: C:/Users/Music/Mantovani\Adios Muchachos.mp3 C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\librosa\util\decorators.py:88: UserWarning: PySoundFile failed. Trying audioread instead. return f(*args, **kwargs) Traceback (most recent call last): File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\librosa\core\audio.py", line 164, in load y, sr_native = __soundfile_load(path, offset, duration, dtype) File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\librosa\core\audio.py", line 195, in __soundfile_load context = sf.SoundFile(path) File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\soundfile.py", line 740, in init self._file = self._open(file, mode_int, closefd) File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\soundfile.py", line 1264, in _open _error_check(_snd.sf_error(file_ptr), File "C:\Users\AppData\Local\Programs\Python\Python310\lib\site-packages\soundfile.py", line 1455, in _error_check raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace')) RuntimeError: Error opening 'C:/Users/Music/Mantovani\Adios Muchachos.mp3': File contains data in an unknown format.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Music\Samples\Polymath\polymath\polymath.py", line 690, in
Next time, please try to include as many details about your setup as possible like OS version, pyenv/conda environment, python version, etc. as it greatly helps to trace down issues and improve the software and its documentation.
From the error, it seems that you are missing ffmpeg. You can find instructions for how to install ffmpeg on your version of Widows. If you are using conda, you can try calling conda install ffmpeg. Hope this helps.