"""Core data structures for audio transcription"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/core.ipynb.

# %% auto 0
__all__ = ['AudioData', 'TranscriptionResult']

# %% ../nbs/core.ipynb 3
from abc import ABC, abstractmethod
from typing import Optional, Dict, Any, List
from pathlib import Path
import numpy as np
from dataclasses import dataclass, field

# %% ../nbs/core.ipynb 4
@dataclass
class AudioData:
    """Container for audio data and metadata."""
    samples: np.ndarray  # Audio sample data as a numpy array
    sample_rate: int  # Sample rate in Hz (e.g., 16000, 44100)
    duration: float  # Duration of the audio in seconds
    filepath: Optional[Path] = None  # Audio file path
    metadata: Dict[str, Any] = field(default_factory=dict)  # Additional metadata

# %% ../nbs/core.ipynb 5
@dataclass
class TranscriptionResult:
    """Standardized transcription output."""
    text: str  # The transcribed text
    confidence: Optional[float] = None  # Overall confidence score (0.0 to 1.0)
    segments: Optional[List[Dict]] = field(default_factory=list)  # List of transcription segments with timestamps and text
    metadata: Optional[Dict] = field(default_factory=dict)  # Transcription metadata
