about summary refs log tree commit diff stats
path: root/modules/home.legacy/conf/beets/plugins/xtractor/default.nix
blob: d4582c5fdc2eb2098339b925881dce340288794b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
  lib,
  pkgs,
  config,
  ...
}: {
  programs.beets.settings = {
    xtractor = {
      # This option is not yet implemented, thus requiring the hook
      auto = true;

      dry-run = false;
      # Writes the bpm key to the media files
      write = true;
      threads = 0;
      # Also run for files, which already have the required keys
      force = true;
      quiet = false;
      keep_output = true;
      keep_profiles = true;
      output_path = "${config.xdg.dataHome}/beets/xtactor";
      essentia_extractor = "${lib.getExe pkgs.essentia-extractor}";
      extractor_profile = {
        highlevel = {
          svm_models = let
            m = pkgs.beetsExtraPlugins.xtractor.models;
          in [
            "${m}/danceability.history"
            "${m}/danceability.history.param"
            "${m}/danceability.history.results.html"
            "${m}/gender.history"
            "${m}/gender.history.param"
            "${m}/gender.history.results.html"
            "${m}/genre_dortmund.history"
            "${m}/genre_dortmund.history.param"
            "${m}/genre_dortmund.history.results.html"
            "${m}/genre_electronic.history"
            "${m}/genre_electronic.history.param"
            "${m}/genre_electronic.history.results.html"
            "${m}/genre_rosamerica.history"
            "${m}/genre_rosamerica.history.param"
            "${m}/genre_rosamerica.history.results.html"
            "${m}/genre_tzanetakis.history"
            "${m}/genre_tzanetakis.history.param"
            "${m}/genre_tzanetakis.history.results.html"
            "${m}/ismir04_rhythm.history"
            "${m}/ismir04_rhythm.history.param"
            "${m}/ismir04_rhythm.history.results.html"
            "${m}/mood_acoustic.history"
            "${m}/mood_acoustic.history.param"
            "${m}/mood_acoustic.history.results.html"
            "${m}/mood_aggressive.history"
            "${m}/mood_aggressive.history.param"
            "${m}/mood_aggressive.history.results.html"
            "${m}/mood_electronic.history"
            "${m}/mood_electronic.history.param"
            "${m}/mood_electronic.history.results.html"
            "${m}/mood_happy.history"
            "${m}/mood_happy.history.param"
            "${m}/mood_happy.history.results.html"
            "${m}/mood_party.history"
            "${m}/mood_party.history.param"
            "${m}/mood_party.history.results.html"
            "${m}/mood_relaxed.history"
            "${m}/mood_relaxed.history.param"
            "${m}/mood_relaxed.history.results.html"
            "${m}/mood_sad.history"
            "${m}/mood_sad.history.param"
            "${m}/mood_sad.history.results.html"
            "${m}/moods_mirex.history"
            "${m}/moods_mirex.history.param"
            "${m}/moods_mirex.history.results.html"
            "${m}/timbre.history"
            "${m}/timbre.history.param"
            "${m}/timbre.history.results.html"
            "${m}/tonal_atonal.history"
            "${m}/tonal_atonal.history.param"
            "${m}/tonal_atonal.history.results.html"
            "${m}/voice_instrumental.history"
            "${m}/voice_instrumental.history.param"
            "${m}/voice_instrumental.history.results.html"
          ];
        };
      };
    };
    hook = {
      hooks = [
        {
          event = "import";
          command = "echo Remember to run 'beet xtractor'!";
        }
      ];
    };
  };
}