首页 > 解决方案 > RuntimeError 将 yaml 配置文件传递给 Essentia MusicExtractor

问题描述

我正在尝试使用Essentia MusicExtractor来自yaml配置文件的配置文件生成功能集,如文档herehere via python中所述。

我的代码片段:

from essentia.standard import MusicExtractor

profile = "some_profile.yaml"
audio = "some_audio.mp3"

features, frames = MusicExtractor(profile=profile)(audio)

我的yaml简介:

在此处输入图像描述

这会产生以下错误:

RuntimeError:
  Error while configuring MusicExtractor:
  Pool: Cannot set/add/merge value to the pool under the name 'rhythm.stats'
  because that name already exists but contains a different data type than value.

看起来我并没有做错什么。

标签: python

解决方案


我遇到了同样的问题并以这种方式解决了它:

  • 从 essentia repos示例中下载了示例配置文件。
  • 运行配置文件。
  • 每次运行后注释掉冲突的行,这只是少数。基本上是statsstatsMFCC线。

由此我可以得出一个工作概况。


推荐阅读