Spaces:
Sleeping
Sleeping
File size: 651 Bytes
d7efa84 | 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 | """Data models for the Audio Labeling Tool."""
from dataclasses import dataclass
from typing import TypedDict
class LabelRow(TypedDict):
"""TypedDict representing a single row in the metadata CSV."""
source: str # Audio filename only (e.g., "clip_001.wav")
transcription: str # Corrected transcription text
gender: str # "male" or "female"
pii: str # "True" or "False" (string representation in CSV)
labeler: str # Username of the labeler
@dataclass
class LabelRecord:
"""Dataclass for constructing a label before saving."""
source: str
transcription: str
gender: str
pii: bool
labeler: str
|