File 0001-Fix-highlevel-parameter-in-MusicExtractor-which-coul.patch of Package essentia

From f8e182bebede0e519d52e6fbd1fced46b7e1ac26 Mon Sep 17 00:00:00 2001
From: Antonio Larrosa <antonio.larrosa@gmail.com>
Date: Fri, 2 Oct 2020 12:22:00 +0200
Subject: [PATCH] Fix highlevel parameter in MusicExtractor, which couldn't be
 specified

Previously, specifying the highlevel parameter in the MusicExtractor constructor
raised a RuntimeError exception because the value of `highlevel.svm_models`
wasn't being set with the right type.

Fixes #1051
---
 src/algorithms/extractor/musicextractor.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/algorithms/extractor/musicextractor.cpp b/src/algorithms/extractor/musicextractor.cpp
index 65577361..911f8773 100644
--- a/src/algorithms/extractor/musicextractor.cpp
+++ b/src/algorithms/extractor/musicextractor.cpp
@@ -168,7 +168,8 @@ void MusicExtractor::setExtractorDefaultOptions() {
   options.set("highlevel.compute", false);
 #if HAVE_GAIA2
   if (!svmModels.empty()) {
-    options.add("highlevel.svm_models", svmModels);
+    for (const string &model: svmModels)
+        options.add("highlevel.svm_models", model);
     options.set("highlevel.compute", true);
   }
 #endif
-- 
2.28.0

openSUSE Build Service is sponsored by