Librosa 抛出 ValueError

问题描述 投票:0回答:1

x_val, s_rate = librosa.load(文件名, sr=采样率)

文件“/python3.6/site-packages/librosa/core/audio.py”,第 140 行,位于 加载 y = sf_desc.read(frames=frame_duration,dtype=dtype,always_2d=False).T

文件“/python3.6/site-packages/soundfile.py”, 第 862 行,读取 框架 = self._check_frames(框架, fill_value)

文件“/python3.6/site-packages/soundfile.py”,第 1270 行,在 _check_frames 中

raise ValueError("frames must be specified for non-seekable files") ValueError: frames must be specified for non-seekable files

当我尝试使用 Librosa 加载 .wav 文件时,出现上述错误。我安装了 ffmpeg,并且 .mp3 文件加载正常,没有任何问题。我无法理解这个错误的含义。非常感谢对错误的任何解释或解决问题的任何解决方案。

python-3.x audio speech valueerror librosa
1个回答
0
投票

检查文件的比特率。我的一些波形文件有 71kbps,我会得到同样的错误。我将它们转换为 256kbps、16kHZ,结果成功了。 我正在使用 librosa 0.9.2

© www.soinside.com 2019 - 2024. All rights reserved.