adamjakab / BeetsPluginXtractor

A beets plugin for obsessive-compulsive music geeks to add low and high level musical information to their songs.
MIT License
37 stars 4 forks source link

Not all attributes are being written to item_attributes table. #10

Closed michaeltoohig closed 2 years ago

michaeltoohig commented 4 years ago

Problem

Only danceability, beats_count and average_loudness are being written to the item_attributes table when using xtractor. Do I need to specify the additional attributes I want written somewhere?

EDIT: I forgot to mention bpm is written to the database also.

Setup

OS: Debian 9 via WSL
Python version: 3.7.3
Beets version: 1.4.9
Turning off other plugins made problem go away (yes/no): no

My configuration (output of beet config) is:

directory: ~/music/library
library: ~/music/library.db
threaded: yes

ui:
    color: yes

import:
    write: yes
    move: no
    copy: yes
    timid: yes
    default_action: asis

plugins: [xtractor]
types:
    rating: int
discogs:
    user_token: REDACTED
    source_weight: 0.5
xtractor:
    auto: no
    dry-run: no
    write: yes
    threads: 1
    force: no
    quiet: no
    items_per_run: 5
    keep_output: yes
    keep_profiles: no
    output_path: ~/music/_xtraction_data
    low_level_extractor: /usr/local/bin/essentia_streaming_extractor_music
    high_level_extractor: /usr/local/bin/essentia_streaming_extractor_music_svm
    high_level_profile:
        highlevel:
            svm_models:
            - ~/src/essentia-extractor-models/danceability.history
            - ~/src/essentia-extractor-models/gender.history
            - ~/src/essentia-extractor-models/genre_rosamerica.history
            - ~/src/essentia-extractor-models/mood_acoustic.history
            - ~/src/essentia-extractor-models/mood_aggressive.history
            - ~/src/essentia-extractor-models/mood_electronic.history
            - ~/src/essentia-extractor-models/mood_happy.history
            - ~/src/essentia-extractor-models/mood_party.history
            - ~/src/essentia-extractor-models/mood_relaxed.history
            - ~/src/essentia-extractor-models/mood_sad.history
            - ~/src/essentia-extractor-models/voice_instrumental.history
            compute: 1
        outputFormat: json
    low_level_targets:
        average_loudness:
            path: lowlevel.average_loudness
            type: float
            required: yes
        bpm:
            path: rhythm.bpm
            type: integer
            required: yes
        danceability:
            path: rhythm.danceability
            type: float
        beats_count:
            path: rhythm.beats_count
            type: integer
    high_level_targets:
        danceable:
            path: highlevel.danceability.all.danceable
            type: float
            required: yes
        gender:
            path: highlevel.gender.value
            type: string
            required: yes
        is_male:
            path: highlevel.gender.all.male
            type: float
        is_female:
            path: highlevel.gender.all.female
            type: float
        genre_rosamerica:
            path: highlevel.genre_rosamerica.value
            type: string
            required: yes
        voice_instrumental:
            path: highlevel.voice_instrumental.value
            type: string
            required: yes
        is_voice:
            path: highlevel.voice_instrumental.all.voice
            type: float
        is_instrumental:
            path: highlevel.voice_instrumental.all.instrumental
            type: float
        mood_acoustic:
            path: highlevel.mood_acoustic.all.acoustic
            type: float
            required: yes
        mood_aggressive:
            path: highlevel.mood_aggressive.all.aggressive
            type: float
            required: yes
        mood_electronic:
            path: highlevel.mood_electronic.all.electronic
            type: float
            required: yes
        mood_happy:
            path: highlevel.mood_happy.all.happy
            type: float
            required: yes
        mood_party:
            path: highlevel.mood_party.all.party
            type: float
            required: yes
        mood_relaxed:
            path: highlevel.mood_relaxed.all.relaxed
            type: float
            required: yes
        mood_sad:
            path: highlevel.mood_sad.all.sad
            type: float
            required: yes
    low_level_profile:
        outputFormat: json
        outputFrames: 0
    chromaprint:
        compute: 0

paths:
    default: '%the{$albumartist}/$album%aunique{}/$track $title'
    singleton: Non-Album/$artist/$title
    comp: Compilations/$album%aunique{}/$track $title

My plugin version (output of beet xtractor -v) is:

xtractor: Xtractor(beets-xtractor) plugin for Beets: v0.2.3
adamjakab commented 4 years ago

You are missing the high-level attributes.

Is there any chance you can verify the following?

1) your low-level data is being stored in your output_path 2) your high-level data is being stored in your output_path 3) your low- and high-level extractor paths are correct

Also, in my config for the SVM models I have the expanded path stored in the configuration (/home/jack/... instead of ~/...) - Please try to do the same - the code might be missing the expansion on those (in which case I will label this a bug).

michaeltoohig commented 4 years ago

Thanks, replacing ~ with the full path did work.

Checking my output_path I only had low-level data stored and now I see high-level data in the directory. So low-level works with expansion but high-level does not?

adamjakab commented 4 years ago

Happy to hear that your issue is solved.

So low-level works with expansion but high-level does not?

I'm afraid so. Thanks for reporting this.