我正在尝试使用librosa打开一个m4a文件,但是当我使用librosa.load时仍然遇到NoBackendError。关于如何解决错误的任何帮助?错误如下:
from __future__ import print_function
import librosa
filename = 'file.m4a'
y, sr = librosa.load(filename)
错误:
---------------------------------------------------------------------------
NoBackendError Traceback (most recent call last)
<ipython-input-18-93a4f3277be0> in <module>()
2 # 2. Load the audio as a waveform `y`
3 # Store the sampling rate as `sr`
----> 4 y, sr = librosa.load(filename)
~\Anaconda3\lib\site-packages\librosa\core\audio.py in load(path, sr, mono, offset, duration, dtype, res_type)
110
111 y = []
--> 112 with audioread.audio_open(os.path.realpath(path)) as input_file:
113 sr_native = input_file.samplerate
114 n_channels = input_file.channels
~\Anaconda3\lib\site-packages\audioread\__init__.py in audio_open(path)
114
115 # All backends failed!
--> 116 raise NoBackendError()
NoBackendError:
答案 0 :(得分:0)
多数情况下,这意味着您没有该格式的编解码器。 您是否已安装ffmpeg oder gstreamer并在路径中?
答案 1 :(得分:0)