Skip to content
Tutorials4 min read

音楽ジャンル分類アノテーション

波形表示、30秒プレビュー、階層的ジャンルラベルを使った音楽アノテーションタスクの作成方法。

Potato Team·

音楽ジャンル分類アノテーション

音楽ジャンル分類は、レコメンデーションシステム、プレイリスト生成、音楽発見を支えています。本チュートリアルでは、オーディオプレビューと階層的分類体系を使用したジャンルタグ付けのアノテーションインターフェースの構築方法を紹介します。

基本的なジャンル分類

yaml
annotation_task_name: "Music Genre Classification"
 
data_files:
  - data/tracks.json
 
item_properties:
  audio_path: audio_preview
  metadata_fields: [artist, title, album]
 
# Show track metadata
display:
  show_metadata: true
  metadata_template: "{{artist}} - {{title}}"
 
annotation_schemes:
  - annotation_type: audio_annotation
    audio_display: waveform
    waveform_color: "#EC4899"
    progress_color: "#F472B6"
    speed_control: true
    show_duration: true
    name: primary_genre
    description: "Select the primary genre"
    labels:
      - Rock
      - Pop
      - Hip-Hop
      - Electronic
      - Jazz
      - Classical
      - R&B
      - Country
      - Metal
      - Folk

階層的ジャンル分類体系

yaml
annotation_schemes:
  # Top-level genre
  - annotation_type: radio
    name: genre
    description: "Primary genre"
    labels:
      - Rock
      - Electronic
      - Hip-Hop
      - Pop
      - Jazz
      - Classical
 
  # Subgenre (conditional)
  - annotation_type: radio
    name: subgenre
    description: "Subgenre"
    conditional:
      depends_on: genre
      options:
        Rock:
          - Classic Rock
          - Alternative
          - Indie Rock
          - Hard Rock
          - Punk
          - Grunge
        Electronic:
          - House
          - Techno
          - Trance
          - Drum & Bass
          - Ambient
          - Dubstep
        "Hip-Hop":
          - East Coast
          - West Coast
          - Trap
          - Conscious
          - Lo-fi
        Pop:
          - Synth Pop
          - Dance Pop
          - Indie Pop
          - K-Pop
          - Teen Pop
        Jazz:
          - Bebop
          - Smooth Jazz
          - Fusion
          - Big Band
          - Cool Jazz
        Classical:
          - Baroque
          - Romantic
          - Contemporary
          - Opera
          - Chamber

マルチラベルジャンルタグ付け

音楽は複数のジャンルにまたがることがよくあります:

yaml
annotation_schemes:
  - annotation_type: multiselect
    name: genres
    description: "Select ALL applicable genres (up to 3)"
    labels:
      - Rock
      - Pop
      - Electronic
      - Hip-Hop
      - R&B
      - Jazz
      - Classical
      - Country
      - Folk
      - Metal
      - Punk
      - Indie
      - World
      - Latin
    min_selections: 1
    max_selections: 3
 
  - annotation_type: radio
    name: primary_genre
    description: "Which is the PRIMARY genre?"
    dynamic_from: genres  # Only show selected genres as options

完全な音楽アノテーション設定

yaml
annotation_task_name: "Music Tagging and Classification"
 
data_files:
  - data/music_library.json
 
item_properties:
  audio_path: preview_url
  metadata_fields:
    - artist
    - title
    - album
    - year
    - duration
 
display:
  show_metadata: true
  metadata_layout: card
  fields:
    - label: "Artist"
      field: artist
    - label: "Track"
      field: title
    - label: "Album"
      field: album
    - label: "Year"
      field: year
 
annotation_schemes:
  # Audio playback configuration
  - annotation_type: audio_annotation
    audio_display: waveform
    waveform_color: "#8B5CF6"
    progress_color: "#A78BFA"
    cursor_color: "#F59E0B"
    height: 100
    show_duration: true
    show_current_time: true
    speed_control: true
    speed_options: [0.75, 1.0, 1.25, 1.5]
    volume_control: true
    default_volume: 0.7
    autoplay: false
    loop: true
 
  # Genre classification
  - annotation_type: multiselect
    name: genres
    description: "Select all applicable genres"
    labels:
      - Rock
      - Pop
      - Electronic/Dance
      - Hip-Hop/Rap
      - R&B/Soul
      - Jazz
      - Classical
      - Country
      - Folk/Acoustic
      - Metal
      - Punk
      - Indie
      - World/International
      - Latin
      - Blues
      - Reggae
    min_selections: 1
    max_selections: 3
 
  # Mood/Energy
  - annotation_type: multiselect
    name: mood
    description: "Select the mood(s) of this track"
    labels:
      - Happy/Uplifting
      - Sad/Melancholic
      - Energetic
      - Calm/Relaxing
      - Aggressive
      - Romantic
      - Dark/Moody
      - Nostalgic
      - Motivational
    min_selections: 1
 
  # Energy level
  - annotation_type: likert
    name: energy
    description: "Energy level"
    size: 5
    min_label: "Very low energy"
    max_label: "Very high energy"
 
  # Danceability
  - annotation_type: likert
    name: danceability
    description: "How danceable is this track?"
    size: 5
    min_label: "Not danceable"
    max_label: "Very danceable"
 
  # Vocal content
  - annotation_type: radio
    name: vocals
    description: "Vocal content"
    labels:
      - Instrumental only
      - Mostly instrumental
      - Balanced
      - Mostly vocals
      - Vocals dominant
 
  # Era/Style
  - annotation_type: radio
    name: era
    description: "Musical era/style"
    labels:
      - Pre-1970s (Classic)
      - 1970s
      - 1980s
      - 1990s
      - 2000s
      - 2010s
      - 2020s/Current
 
  # Quality flags
  - annotation_type: multiselect
    name: flags
    description: "Special flags (if applicable)"
    labels:
      - Explicit content
      - Live recording
      - Remix/Cover
      - Holiday/Seasonal
      - Soundtrack
      - Spoken word sections
    required: false
 
  # Confidence
  - annotation_type: likert
    name: confidence
    description: "Confidence in your genre classification"
    size: 5
    min_label: "Uncertain"
    max_label: "Very confident"
 
annotation_guidelines:
  title: "Music Tagging Guidelines"
  content: |
    ## ジャンル選択
    - トラックを最もよく表す1〜3つのジャンルを選択
    - 最も具体的に該当するジャンルを選択
    - 迷った場合は、より広いカテゴリを選ぶ
 
    ## ムード評価
    - 全体的な感情的トーンを考慮する
    - トラックは複数のムードを持つことがある
    - 音楽があなたにどう感じさせるかを考える
 
    ## エネルギーとダンサビリティ
    - エネルギー:テンポ、強度、パワー
    - ダンサビリティ:リズム、ビートの明瞭さ、グルーブ
 
    ## リスニングのコツ
    - 少なくとも30秒は聴く
    - ドロップ、変化、トランジションに注目する
    - 楽器編成とプロダクションスタイルを考慮する
 

出力フォーマット

json
{
  "id": "track_001",
  "audio_url": "/audio/preview_001.mp3",
  "metadata": {
    "artist": "The Beatles",
    "title": "Here Comes the Sun",
    "album": "Abbey Road",
    "year": 1969
  },
  "annotations": {
    "genres": ["Rock", "Pop"],
    "mood": ["Happy/Uplifting", "Nostalgic"],
    "energy": 3,
    "danceability": 2,
    "vocals": "Balanced",
    "era": "Pre-1970s (Classic)",
    "flags": [],
    "confidence": 5
  }
}

音楽アノテーションのコツ

  1. 高品質ヘッドフォン: ジャンルのニュアンスに不可欠
  2. 一定の音量: 調整による疲労を避ける
  3. フルプレビュー: 変化を聴き取るのに十分な長さを聴く
  4. ジャンル知識: ジャンルの定義に慣れておく
  5. 休憩を取る: 耳の疲労は判断に影響する

次のステップ


オーディオの完全なドキュメントは/docs/features/audio-annotationをご覧ください。