Skip to content
Tutorials5 min read

오디오 이벤트 탐지 및 태깅

음성, 음악, 박수 또는 환경 소음과 같은 특정 소리를 타임스탬프 구간으로 탐지하는 주석 작업을 설정합니다.

Potato Team

오디오 이벤트 탐지는 녹음 안에서 특정 소리를 찾아내는 일입니다. 개가 짖는 소리, 사이렌, 음악 구간, 문이 쾅 닫히는 소리 등이 그 대상입니다. 이 튜토리얼은 소리 인식 모델을 학습시키기 위한 타임스탬프 기반 주석을 다룹니다. 그 이면의 오디오 설정 옵션은 오디오 주석 문서를 참고하시기 바랍니다.

오디오 이벤트 주석의 유형

가장 단순한 형태는 클립 단위 태깅으로, 클립 전체에 그 안에 담긴 소리를 라벨로 붙입니다. 시간 기반 탐지는 한 걸음 더 나아가 각 이벤트의 시작과 끝을 표시합니다. 사람들은 보통 이벤트별 정밀한 타임스탬프를 "강한" 라벨링이라 부르고, 타이밍 없이 존재 여부만 표시하는 것을 "약한" 라벨링이라 부릅니다. 어느 쪽을 원하는지는 모델이 무엇을 학습해야 하는지에 달려 있습니다.

클립 단위 소리 태깅

이벤트가 하나뿐인 짧은 클립의 경우:

yaml
annotation_task_name: "Sound Event Classification"
 
data_files:
  - data/audio_clips.json
 
item_properties:
  audio_path: audio_path
 
annotation_schemes:
  - annotation_type: audio_annotation
    audio_display: waveform
    waveform_color: "#10B981"
    progress_color: "#34D399"
    name: sound_class
    description: "What sound is in this clip?"
    labels:
      - Dog bark
      - Car horn
      - Siren
      - Music
      - Speech
      - Footsteps
      - Door knock
      - Glass breaking
      - Gunshot
      - Baby cry
      - Other
      - Silence/noise only

시간 기반 소리 이벤트 탐지

이벤트가 언제 발생하는지 표시합니다:

yaml
annotation_task_name: "Sound Event Detection"
 
data_files:
  - data/recordings.json
 
item_properties:
  audio_path: audio_path
 
annotation_schemes:
  - annotation_type: audio_annotation
    audio_display: waveform
    height: 150
    waveform_color: "#6366F1"
    progress_color: "#A5B4FC"
    show_timestamps: true
    enable_regions: true
    speed_control: true
    name: events
    description: "Mark all sound events with timestamps"
    labels:
      - name: speech
        color: "#3B82F6"
      - name: music
        color: "#8B5CF6"
      - name: vehicle
        color: "#EF4444"
      - name: animal
        color: "#F59E0B"
      - name: nature
        color: "#10B981"
      - name: mechanical
        color: "#6B7280"
    allow_overlap: true
    min_duration: 0.1

전체 오디오 이벤트 설정

yaml
annotation_task_name: "AudioSet-Style Event Detection"
 
data_files:
  - data/audio_10sec.json
 
item_properties:
  audio_path: audio_url
 
annotation_schemes:
  # Temporal event marking with audio playback
  - annotation_type: audio_annotation
    audio_display: waveform
    waveform_color: "#059669"
    progress_color: "#34D399"
    cursor_color: "#F59E0B"
    height: 128
    show_timestamps: true
    time_format: "ss.ms"
    show_duration: true
    speed_control: true
    speed_options: [0.5, 0.75, 1.0, 1.5]
    enable_regions: true
    region_snap: 0.05
    name: sound_events
    description: "Mark all distinct sound events"
    labels:
      # Human sounds
      - name: Speech
        color: "#3B82F6"
        keyboard_shortcut: "1"
        category: human
      - name: Singing
        color: "#8B5CF6"
        keyboard_shortcut: "2"
        category: human
      - name: Laughter
        color: "#EC4899"
        category: human
      - name: Cough/Sneeze
        color: "#F472B6"
        category: human
 
      # Music
      - name: Music
        color: "#A855F7"
        keyboard_shortcut: "m"
        category: music
      - name: Musical instrument
        color: "#7C3AED"
        category: music
 
      # Animals
      - name: Dog
        color: "#F59E0B"
        keyboard_shortcut: "d"
        category: animal
      - name: Cat
        color: "#FBBF24"
        category: animal
      - name: Bird
        color: "#FCD34D"
        category: animal
 
      # Vehicles
      - name: Car
        color: "#EF4444"
        keyboard_shortcut: "c"
        category: vehicle
      - name: Motorcycle
        color: "#DC2626"
        category: vehicle
      - name: Siren
        color: "#B91C1C"
        category: vehicle
      - name: Aircraft
        color: "#991B1B"
        category: vehicle
 
      # Environment
      - name: Rain
        color: "#06B6D4"
        category: nature
      - name: Thunder
        color: "#0891B2"
        category: nature
      - name: Wind
        color: "#0E7490"
        category: nature
      - name: Water
        color: "#0D9488"
        category: nature
 
      # Domestic
      - name: Door
        color: "#84CC16"
        category: domestic
      - name: Alarm
        color: "#65A30D"
        category: domestic
      - name: Appliance
        color: "#4D7C0F"
        category: domestic
 
      # Other
      - name: Noise/Unknown
        color: "#6B7280"
        keyboard_shortcut: "n"
        category: other
 
    allow_overlap: true
    min_duration: 0.1
    show_labels_on_waveform: true
 
    # Segment attributes
    segment_attributes:
      - name: confidence
        type: radio
        options: [Clear, Moderate, Faint]
      - name: foreground
        type: checkbox
        description: "Is this the main/foreground sound?"
 
  # Clip-level tags (weak labels)
  - annotation_type: multiselect
    name: clip_tags
    description: "What sounds are present anywhere in this clip?"
    labels:
      - Speech
      - Music
      - Vehicle sounds
      - Animal sounds
      - Nature sounds
      - Domestic sounds
      - Silence
    min_selections: 1
 
  # Audio quality
  - annotation_type: radio
    name: quality
    description: "Recording quality"
    labels:
      - Clean (clear sounds)
      - Moderate noise
      - Very noisy
      - Distorted/clipped
 
annotation_guidelines:
  title: "Sound Event Detection Guide"
  content: |
    ## Your Task
    Mark the START and END times of each distinct sound event.
 
    ## Event Detection Rules
    - Mark sounds that are clearly audible
    - Include overlapping sounds (use multiple labels)
    - Short sounds (<100ms) may be a single point
 
    ## Segment Boundaries
    - Start: When sound becomes audible
    - End: When sound fades or stops
 
    ## Confidence Levels
    - Clear: Easily identifiable
    - Moderate: Reasonably sure
    - Faint: Background, hard to identify
 
    ## Foreground vs Background
    - Foreground: Main focus of audio
    - Background: Ambient sounds
 

출력 형식

json
{
  "id": "clip_001",
  "audio_url": "/audio/street_scene.wav",
  "duration": 10.0,
  "annotations": {
    "sound_events": [
      {
        "label": "Speech",
        "start": 0.5,
        "end": 3.2,
        "attributes": {
          "confidence": "Clear",
          "foreground": true
        }
      },
      {
        "label": "Car",
        "start": 1.8,
        "end": 4.5,
        "attributes": {
          "confidence": "Moderate",
          "foreground": false
        }
      },
      {
        "label": "Dog",
        "start": 6.1,
        "end": 6.8,
        "attributes": {
          "confidence": "Clear",
          "foreground": true
        }
      }
    ],
    "clip_tags": ["Speech", "Vehicle sounds", "Animal sounds"],
    "quality": "Moderate noise"
  }
}

탐지기를 활용한 사전 주석

인터페이스에 모델 예측값을 미리 채워 넣으면, 안노테이터는 처음부터 시작하는 대신 수정만 하면 됩니다:

yaml
pre_annotation:
  enabled: true
  field: detected_events
  show_confidence: true
  confidence_threshold: 0.3
  allow_modification: true

오디오 이벤트 주석을 위한 팁

여기서는 좋은 헤드폰이 실질적인 차이를 만듭니다. 많은 이벤트가 희미하기 때문이며, 조용한 방도 도움이 됩니다. 대부분의 안노테이터는 두 번에 걸쳐 작업합니다. 한 번은 이벤트를 찾아내고, 다른 한 번은 타임스탬프를 다듬습니다. 재생 속도를 0.5배로 낮추면 경계를 훨씬 쉽게 잡을 수 있습니다. 무엇을 "들리는 것"으로 볼지 처음에 미리 정해 두어, 모든 사람이 같은 기준으로 선을 긋도록 하시기 바랍니다.

다음 단계


전체 오디오 문서는 /docs/features/audio-annotation에서 확인하실 수 있습니다.