使用melodia vamp插件会引发错误

时间:2018-02-08 01:34:03

标签: python mp3 midi librosa

代码:

import vamp
import librosa
audio_file=filepath+'ChaitraSairam-Anandaamrutakarshini-Copy.mp3'
audio, sr = librosa.load(audio_file, sr=44100, mono=True)
data = vamp.collect(audio, sr, "mtg-melodia:melodia")

当我尝试运行上面的代码时出现以下错误:

Vamp::HostExt: Unable to load library "C:\Program Files\Vamp Plugins\mtg-melodia.dll"
Vamp::HostExt: Unable to load library "C:\Program Files (x86)\Vamp Plugins\mtg-melodia.dll"
Vamp::HostExt::PluginLoader: No library found in Vamp path for plugin "mtg-melodia:melodia"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\anush\Anaconda3\lib\site-packages\vamp\collect.py", line 166, in collect
    plugin, step_size, block_size = vamp.load.load_and_configure(data, sample_rate, plugin_key, parameters, **kwargs)
  File "C:\Users\anush\Anaconda3\lib\site-packages\vamp\load.py", line 83, in load_and_configure
    vampyhost.ADAPT_CHANNEL_COUNT)
TypeError: Failed to load plugin: mtg-melodia:melodia

我尝试使用Sonic Visualizer 32位加载melodia,它可以在Sonic Visualizer中使用。

2 个答案:

答案 0 :(得分:0)

您需要从此处https://www.upf.edu/web/mtg/melodia安装Melodia插件(请参阅&#34;下载和安装&#34;)。 Windows / Linux / Mac有一些选项,这对我在Ubuntu上有用。

答案 1 :(得分:0)

对我有用的是创建我没有但在此处指定的目录https://www.upf.edu/web/mtg/melodia(点击&#34;下载和安装&#34;)

mkdir /usr/local/lib/vamp

然后在那里复制文件(从文件夹&#39; m&#39;你已经提取过它们)

sudo cp /home/user/Downloads/m* .

希望这有帮助!