Skip to content
Tutorials4 min read

設定音訊轉寫稽核任務

配置波形視覺化、播放控制和文本校正介面,用於音訊轉寫任務。

Potato Team

轉寫稽核對於高品質的 ASR 訓練資料至關重要。本教程展示如何構建一個介面,讓標註者可以聽取音訊、檢視波形並校正機器生成的轉寫文本。

我們要構建的內容

一個包含以下功能的介面:

  • 波形視覺化
  • 播放控制(播放、暫停、速度調節)
  • 可編輯的轉寫文本
  • 音訊品質評分
  • 不確定片段的置信度標記

基本配置

yaml
annotation_task_name: "Transcription Review"
 
data_files:
  - "data/transcripts.json"
 
item_properties:
  id_key: id
  text_key: asr_transcript
 
annotation_schemes:
  # Audio playback
  - annotation_type: audio_annotation
    name: audio_player
 
  # Corrected transcript
  - annotation_type: text
    name: corrected_transcript
    description: "Edit the transcript to match what you hear"
    rows: 4
    placeholder: "Type the corrected transcript..."
    label_requirement:
      required: true
 
  # Quality rating
  - annotation_type: radio
    name: audio_quality
    description: "Rate the audio quality"
    labels:
      - Clear
      - Slightly noisy
      - Very noisy
      - Unintelligible

示例資料格式

建立 data/transcripts.json

json
{"id": "audio_001", "audio_path": "/audio/recording_001.wav", "asr_transcript": "Hello how are you doing today"}
{"id": "audio_002", "audio_path": "/audio/recording_002.wav", "asr_transcript": "The weather is nice outside"}
{"id": "audio_003", "audio_path": "/audio/recording_003.wav", "asr_transcript": "Please call me back when your free"}

音訊標註設定

Potato 中的音訊標註使用標註方案中的 audio_annotation 類型。音訊播放器自動提供波形視覺化和播放控制。

yaml
annotation_schemes:
  - annotation_type: audio_annotation
    name: audio_player
    description: "Listen to the audio recording"

音訊播放器包含內建的播放/暫停、定位和速度調節控制。

綜合轉寫介面

yaml
annotation_task_name: "ASR Correction and Annotation"
 
data_files:
  - "data/asr_output.json"
 
item_properties:
  id_key: id
  text_key: hypothesis
 
annotation_schemes:
  # Audio player
  - annotation_type: audio_annotation
    name: audio_player
 
  # Main transcript correction
  - annotation_type: text
    name: transcript
    description: "Correct the transcript below"
    rows: 4
    rows: 4
    label_requirement:
      required: true
 
  # Speaker identification
  - annotation_type: radio
    name: num_speakers
    description: "How many speakers are in this recording?"
    labels:
      - "1 speaker"
      - "2 speakers"
      - "3+ speakers"
      - "Cannot determine"
 
  # Audio quality
  - annotation_type: radio
    name: quality
    description: "Overall audio quality"
    labels:
      - name: Excellent
        description: "Crystal clear, studio quality"
      - name: Good
        description: "Clear speech, minor background noise"
      - name: Fair
        description: "Understandable but noisy"
      - name: Poor
        description: "Very difficult to understand"
      - name: Unusable
        description: "Cannot transcribe accurately"
 
  # Issues checklist
  - annotation_type: multiselect
    name: issues
    description: "Select all issues present (if any)"
    labels:
      - Background noise
      - Overlapping speech
      - Accented speech
      - Fast speech
      - Mumbling/unclear
      - Technical audio issues
      - Non-English words
      - Profanity present
      - None
 
  # Confidence
  - annotation_type: likert
    name: confidence
    description: "How confident are you in your transcription?"
    size: 5
    min_label: "Guessing"
    max_label: "Certain"
 
annotation_guidelines:
  title: "Transcription Guidelines"
  content: |
    ## Your Task
    Listen to the audio and correct the ASR transcript.
 
    ## Transcription Rules
    - Transcribe exactly what is said
    - Include filler words (um, uh, like)
    - Use proper punctuation and capitalization
    - Mark unintelligible sections with [unintelligible]
    - Mark uncertain words with [word?]
 
    ## Special Notations
    - [unintelligible] - Cannot understand
    - [word?] - Uncertain about word
    - [crosstalk] - Overlapping speech
    - [noise] - Non-speech sound
    - [pause] - Significant silence

詞級標註

對於詳細的詞級校正,可以在文本欄位旁使用 span 標註:

yaml
annotation_schemes:
  - annotation_type: audio_annotation
    name: audio_player
 
  - annotation_type: text
    name: transcript
    rows: 4
 
  - annotation_type: span
    name: word_corrections
    description: "Mark words that needed correction"
    title: transcript
    labels:
      - name: corrected
        color: "#FCD34D"
        description: "Word was changed"
      - name: inserted
        color: "#4ADE80"
        description: "Word was added"
      - name: uncertain
        color: "#F87171"
        description: "Still not sure"

分段轉寫

對於長音訊檔案,可以將資料準備為帶有時間資訊的片段:

yaml
data_files:
  - "data/segments.json"
 
item_properties:
  id_key: id
  text_key: asr_text
 
annotation_schemes:
  - annotation_type: audio_annotation
    name: audio_player
 
  - annotation_type: text
    name: transcript
    rows: 4
    description: "Correct the transcript for this segment"

帶有分段時間的資料格式:

json
{
  "id": "seg_001",
  "audio_path": "/audio/long_recording.wav",
  "start_time": 0.0,
  "end_time": 5.5,
  "asr_text": "Welcome to today's presentation"
}

輸出格式

json
{
  "id": "audio_001",
  "audio_path": "/audio/recording_001.wav",
  "original_transcript": "Hello how are you doing today",
  "annotations": {
    "transcript": "Hello, how are you doing today?",
    "num_speakers": "1 speaker",
    "quality": "Good",
    "issues": ["None"],
    "confidence": 5
  },
  "annotator": "transcriber_01",
  "time_spent_seconds": 45
}

品質控制

Potato 自動跟蹤標註時間。對於品質控制,可以考慮在資料檔案中包含注意力檢測項目——即包含已知正確答案的項目,用於驗證標註者的準確性。

可以配置輸出設定來跟蹤標註:

yaml
output_annotation_dir: "annotation_output"
export_annotation_format: "json"

轉寫任務技巧

  1. 好的耳機:準確性的必備工具
  2. 安靜的環境:減少疲勞
  3. 速度調節:困難片段時放慢速度
  4. 多次聆聽:先聽一遍,轉寫,然後驗證
  5. 定期休息:轉寫工作對腦力消耗很大

下一步


完整音訊文件請參閱 音訊標註