Source code for whisper_smith.models
from dataclasses import dataclass
[docs]
@dataclass(slots=True)
class TranscriptSegment:
start: float
end: float
text: str
speaker: str | None = None
[docs]
@dataclass(slots=True)
class TranscriptResult:
segments: list[TranscriptSegment]
text: str = ""
def __post_init__(self) -> None:
if not self.text:
self.text = "\n".join(segment.text for segment in self.segments)
[docs]
@dataclass(slots=True)
class DiarizationSegment:
start: float
end: float
speaker: str
[docs]
@dataclass(slots=True)
class DiarizationResult:
segments: list[DiarizationSegment]