wav file import problem
audio_file_path = '17973-2-0-32.wav' librosa_audio_data, librosa_sample_rate = librosa.load(audio_file_path)
`--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) File ~\anaconda3\envs\tensorflow2\lib\site-packages\soundfile.py:161 159 raise OSError('no packaged library for this platform') --> 161 import _soundfile_data # ImportError if this doesn't exist 162 _path = _os.path.dirname(_soundfile_data.file) # TypeError if file is None
ModuleNotFoundError: No module named '_soundfile_data'
During handling of the above exception, another exception occurred:
OSError Traceback (most recent call last) File ~\anaconda3\envs\tensorflow2\lib\site-packages\soundfile.py:171 170 raise OSError('sndfile library not found using ctypes.util.find_library') --> 171 _snd = _ffi.dlopen(_libname) 173 except OSError: 174 # Try explicit file name, if the general does not work (e.g. on nixos)
OSError: cannot load library 'C:\Users\beek6\anaconda3\envs\tensorflow2\Library\bin\sndfile.dll': error 0x7e
During handling of the above exception, another exception occurred:
OSError Traceback (most recent call last) Cell In[4], line 2 1 audio_file_path = '17973-2-0-32.wav' ----> 2 librosa_audio_data, librosa_sample_rate = librosa.load(audio_file_path)
File ~\anaconda3\envs\tensorflow2\lib\site-packages\lazy_loader_init_.py:77, in attach.
File ~\anaconda3\envs\tensorflow2\lib\site-packages\lazy_loader_init_.py:76, in attach.
File ~\anaconda3\envs\tensorflow2\lib\importlib_init_.py:127, in import_module(name, package) 125 break 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level)
File
File
File
File
File
File
File ~\anaconda3\envs\tensorflow2\lib\site-packages\librosa\core\audio.py:10 7 import pathlib 8 import warnings ---> 10 import soundfile as sf 11 import audioread 12 import numpy as np
File ~\anaconda3\envs\tensorflow2\lib\site-packages\soundfile.py:192 190 _snd = _ffi.dlopen(_os.path.join(_hbrew_path, _explicit_libname)) 191 else: --> 192 _snd = _ffi.dlopen(_explicit_libname) 194 libsndfile_version = _ffi.string(_snd.sf_version_string()).decode('utf-8', 'replace') 195 if libsndfile_version.startswith('libsndfile-'):
OSError: cannot load library 'libsndfile.dll': error 0xc1`
OSError: cannot load library 'libsndfile.dll': error 0xc1`
没有安装正确,看下win怎么安装libsndfile吧。
I downloaded after than delete, all files, and problem absoluved.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is closed. Please re-open if needed.
This issue is closed. Please re-open if needed.