Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highlevel parameter can't be used in MusicExtractor #1051

Open
antlarr opened this issue Oct 2, 2020 · 0 comments · May be fixed by #1052
Open

highlevel parameter can't be used in MusicExtractor #1051

antlarr opened this issue Oct 2, 2020 · 0 comments · May be fixed by #1052

Comments

@antlarr
Copy link

antlarr commented Oct 2, 2020

According to https://essentia.upf.edu/reference/std_MusicExtractor.html it's possible to use a "highlevel" parameter (of type list of strings) to specify the list of high-level classifier models to use. But this fails:

>>> from essentia.standard import MusicExtractor                             
>>> extractor = MusicExtractor(highlevel=['/usr/share/essentia-extractor-svm_models/mood_acoustic.history'])                                 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.8/site-packages/essentia/standard.py", line 44, in __init__
    self.configure(**kwargs)
  File "/usr/lib64/python3.8/site-packages/essentia/standard.py", line 64, in configure
    self.__configure__(**kwargs)
RuntimeError: Error while configuring MusicExtractor: Descriptor name 'highlevel.svm_models' of type std::vector<std::string> not found

I saw there's code in musicextractor.cpp to accept it but it does: options.add("highlevel.svm_models", svmModels); . I tested doing that in python and had this result:

>>> from essentia import Pool
>>> p=Pool()
>>> p.descriptorNames()
[]
>>> p.add('highlevel.svm_models', ['test1', 'test2'])
>>> p.descriptorNames()                              
['highlevel.svm_models']
>>> p['highlevel.svm_models']
[['test1', 'test2']]

Which as the error above said, it's not of type "vector of strings" but vector of vector of strings.

antlarr added a commit to antlarr/essentia that referenced this issue Oct 2, 2020
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 MTG#1051
antlarr added a commit to antlarr/bard that referenced this issue Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant