librosa: Getting an Error: ValueError: Input signal length=0 is too small to resample from 44100->22050 , while loading an mp3 file by librosa.load()
BEFORE POSTING A BUG REPORT Please look through existing issues (both open and closed) to see if it’s already been reported or fixed!
Describe the bug A clear and concise description of what the bug is. Recently I am working with some audio data . But the issue I am facing that while I am trying to load the audio file by librosa.load().
To Reproduce
Expected behavior
I am guessing that this error is may be happening as the x which should be 1-D numpy array , it is empty in this case. but why??
When I am playing the sound by Ipython ,It is working fine .

Screenshots If applicable, add screenshots to help explain your problem.
Software versions*
Windows-10-10.0.22621-SP0 Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] NumPy 1.22.3 SciPy 1.8.0 librosa 0.9.2 INSTALLED VERSIONS
python: 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)]
librosa: 0.9.2
audioread: 3.0.0 numpy: 1.22.3 scipy: 1.8.0 sklearn: 1.0.2 joblib: 1.1.0 decorator: 5.1.1 soundfile: 0.11.0 resampy: 0.4.2 numba: 0.56.4 pooch: v1.6.0 packaging: 21.3
numpydoc: None sphinx: None sphinx_rtd_theme: None sphinx_multiversion: None sphinx_gallery: None mir_eval: None ipython: None sphinxcontrib-svg2pdfconverter: None pytest: None pytest-mpl: None pytest-cov: None matplotlib: 3.5.1 samplerate: None soxr: None contextlib2: None presets: None Additional context Add any other context about the problem here. Please help me to fix this issue . As the x is getting store an empty numpy 1-D array I cann’t able to proceed further .I am not getting it’s solution no where .
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (7 by maintainers)
Libsndfile did indeed just release a new version that should fix this issue. Alas, I haven’t found time yet to recompile/release a new version of soundfile. But if you put a newer version of libsndfile in your load path, soundfile will pick the new one instead of the included one.