Skip to content

오디오 주석

Potato에서 파형 기반 오디오 주석을 구성합니다. 인터랙티브 재생 컨트롤을 표시하고, 시간 마커를 설정하며, radio, likert, 텍스트 스키마와 결합합니다.

Potato 2.0은 Peaks.js로 구동되는 파형 시각화, 세그먼트 레이블링, 포괄적인 키보드 단축키를 갖춘 강력한 오디오 주석을 제공합니다.

사용 사례

  • 음성 전사 및 검토
  • 화자 분할
  • 음악 분석
  • 오디오 이벤트 감지
  • 음성의 감정 인식
  • 콜센터 품질 보증

오디오 지원 활성화

구성에 audio_annotation 섹션을 추가합니다.

yaml
annotation_schemes:
  - annotation_type: audio
    name: audio_segments
    description: "Segment and label the audio"
    labels:
      - Speech
      - Music
      - Silence
      - Noise

작동 모드

Potato는 세 가지 오디오 주석 모드를 지원합니다.

레이블 모드

오디오를 분할하고 각 세그먼트에 카테고리 레이블을 할당합니다.

yaml
annotation_schemes:
  - annotation_type: audio
    name: speaker_diarization
    mode: label
    description: "Identify speakers in the audio"
    labels:
      - Speaker A
      - Speaker B
      - Overlap
    label_colors:
      "Speaker A": "#3b82f6"
      "Speaker B": "#10b981"
      "Overlap": "#f59e0b"

질문 모드

세그먼트별 주석 질문을 추가합니다.

yaml
annotation_schemes:
  - annotation_type: audio
    name: speech_quality
    mode: questions
    description: "Evaluate speech segments"
    segment_questions:
      - name: clarity
        type: likert
        size: 5
        min_label: "Unclear"
        max_label: "Very clear"
      - name: emotion
        type: radio
        labels: [Neutral, Happy, Sad, Angry]

결합 모드

레이블링과 세그먼트별 질문을 결합합니다.

yaml
annotation_schemes:
  - annotation_type: audio
    name: full_analysis
    mode: both
    description: "Label and analyze audio segments"
    labels:
      - Speech
      - Music
      - Noise
    segment_questions:
      - name: quality
        type: likert
        size: 5

구성 옵션

기본 설정

yaml
annotation_schemes:
  - annotation_type: audio
    name: segments
    description: "Create audio segments"
    labels:
      - Label A
      - Label B
 
    # Optional constraints
    min_segments: 1
    max_segments: 50

키보드 단축키

숫자 키 1-9를 사용하여 레이블을 할당할 수 있습니다.

yaml
annotation_schemes:
  - annotation_type: audio
    name: speakers
    labels:
      - Speaker A  # Press 1
      - Speaker B  # Press 2
      - Overlap    # Press 3

레이블 색상

세그먼트 색상을 사용자 정의합니다.

yaml
annotation_schemes:
  - annotation_type: audio
    name: segments
    labels:
      - Speech
      - Music
      - Silence
    label_colors:
      "Speech": "#3b82f6"
      "Music": "#10b981"
      "Silence": "#6b7280"

파형 성능

긴 오디오 파일에서 최적의 성능을 얻으려면 BBC audiowaveform 도구를 설치하십시오.

bash
# macOS
brew install audiowaveform
 
# Ubuntu/Debian
sudo apt-get install audiowaveform
 
# Or build from source
# https://github.com/bbc/audiowaveform

이를 통해 서버 측 파형 생성이 활성화됩니다. 이 도구가 없으면 클라이언트 측 생성이 사용됩니다(30분 미만 파일에 적합).

파형 캐싱

더 나은 성능을 위해 캐싱을 구성합니다.

yaml
audio_config:
  cache_dir: "audio_cache/"
  precompute_depth: 100  # Pre-generate waveforms for first N items
  client_fallback_max_duration: 1800  # 30 minutes in seconds

데이터 형식

간단한 오디오 참조

json
[
  {"id": "1", "audio_path": "audio/recording_001.wav"},
  {"id": "2", "audio_path": "audio/recording_002.wav"}
]
yaml
data_files:
  - "data/audio_data.json"
 
item_properties:
  id_key: id
  audio_key: audio_path

전사본 포함

json
[
  {
    "id": "1",
    "audio_path": "audio/call_001.wav",
    "transcript": "Hello, how can I help you today?"
  }
]

출력 형식

주석은 세그먼트 타임스탬프와 함께 저장됩니다.

json
{
  "id": "audio_1",
  "annotations": {
    "segments": [
      {
        "start": 0.0,
        "end": 2.5,
        "label": "Speaker A",
        "questions": {
          "clarity": 4,
          "emotion": "Neutral"
        }
      },
      {
        "start": 2.5,
        "end": 5.2,
        "label": "Speaker B"
      }
    ]
  }
}

키보드 단축키

Potato는 효율적인 주석을 위한 다양한 키보드 단축키를 제공합니다.

단축키동작
Space재생/일시정지
[현재 위치에서 세그먼트 시작 설정
]현재 위치에서 세그먼트 끝 설정
1-9현재 세그먼트에 레이블 할당
Delete현재 세그먼트 제거
Left Arrow5초 뒤로 이동
Right Arrow5초 앞으로 이동
Up Arrow확대
Down Arrow축소
Home시작으로 이동
End끝으로 이동
+재생 속도 높이기
-재생 속도 낮추기

구성 예시

화자 분할

yaml
task_name: "Speaker Diarization"
task_dir: "."
port: 8000
 
data_files:
  - "data/recordings.json"
 
item_properties:
  id_key: id
  audio_key: audio_path
 
annotation_schemes:
  - annotation_type: audio
    name: speakers
    mode: label
    description: "Identify who is speaking"
    labels:
      - Speaker 1
      - Speaker 2
      - Speaker 3
      - Overlap
      - Silence
    label_colors:
      "Speaker 1": "#3b82f6"
      "Speaker 2": "#10b981"
      "Speaker 3": "#f59e0b"
      "Overlap": "#ef4444"
      "Silence": "#6b7280"
    min_segments: 1
 
audio_config:
  cache_dir: "audio_cache/"
  precompute_depth: 50
 
output_annotation_dir: "output/"
output_annotation_format: "json"
allow_all_users: true

전사 검토

yaml
task_name: "Transcription Quality Review"
task_dir: "."
port: 8000
 
data_files:
  - "data/transcripts.json"
 
item_properties:
  id_key: id
  text_key: transcript
  audio_key: audio_path
 
annotation_schemes:
  - annotation_type: audio
    name: errors
    mode: questions
    description: "Mark transcription errors"
    segment_questions:
      - name: error_type
        type: radio
        labels:
          - Missing word
          - Wrong word
          - Extra word
          - Spelling error
      - name: severity
        type: likert
        size: 3
        min_label: "Minor"
        max_label: "Major"
 
  - annotation_type: radio
    name: overall_accuracy
    description: "Overall transcript accuracy"
    labels:
      - Accurate
      - Minor errors
      - Major errors
      - Unusable
 
output_annotation_dir: "output/"
output_annotation_format: "json"

콜센터 QA

yaml
task_name: "Call Center Quality Assurance"
task_dir: "."
port: 8000
 
data_files:
  - "data/calls.json"
 
item_properties:
  id_key: call_id
  audio_key: recording_path
 
annotation_schemes:
  # Segment-level annotation
  - annotation_type: audio
    name: conversation
    mode: both
    description: "Segment the conversation"
    labels:
      - Agent
      - Customer
      - Hold
      - Silence
    segment_questions:
      - name: sentiment
        type: radio
        labels: [Positive, Neutral, Negative, Frustrated]
 
  # Call-level assessment
  - annotation_type: likert
    name: professionalism
    description: "Agent professionalism"
    size: 5
    min_label: "Poor"
    max_label: "Excellent"
 
  - annotation_type: likert
    name: resolution
    description: "Issue resolution"
    size: 5
    min_label: "Unresolved"
    max_label: "Fully resolved"
 
  - annotation_type: multiselect
    name: issues
    description: "Select any issues observed"
    labels:
      - Long hold time
      - Agent interrupted
      - Incorrect information
      - Missing greeting
      - Unprofessional language
 
  - annotation_type: text
    name: notes
    description: "Additional observations"
    textarea: true
 
output_annotation_dir: "output/"
output_annotation_format: "json"

지원되는 오디오 형식

  • WAV (최상의 품질을 위해 권장)
  • MP3
  • OGG
  • FLAC
  • M4A
  • WebM

성능 팁

  1. audiowaveform 설치 - 긴 오디오 파일에 필수적입니다
  2. 캐싱 활성화 - cache_dir을 사용하여 미리 생성된 파형을 저장합니다
  3. 품질을 위해 WAV 사용 - 압축 형식은 아티팩트를 유발할 수 있습니다
  4. 오디오 전처리 - 레벨을 정규화하고 불필요한 무음을 잘라냅니다
  5. 파일 크기 고려 - 큰 파일은 로딩 속도를 늦춥니다
  6. precompute 사용 - 초기 인스턴스에 대한 파형을 미리 생성합니다

문제 해결

파형이 로드되지 않음

  • 오디오 파일 경로가 올바른지 확인합니다
  • 파일 형식이 지원되는지 확인합니다
  • 긴 파일의 경우 audiowaveform을 설치합니다
  • 브라우저 콘솔에서 오류를 확인합니다

느린 성능

  • audiowaveform 도구를 설치합니다
  • 파형 캐싱을 활성화합니다
  • 오디오 파일 크기를 줄입니다
  • precompute_depth 설정을 사용합니다

세그먼트가 저장되지 않음

  • 출력 디렉터리에 쓰기 권한이 있는지 확인합니다
  • 주석 형식 구성을 확인합니다
  • 세그먼트에 시작 및 끝 시간이 모두 있는지 확인합니다