diff --git a/modules/whisper/data_classes.py b/modules/whisper/data_classes.py index 878aaf1..247a62e 100644 --- a/modules/whisper/data_classes.py +++ b/modules/whisper/data_classes.py @@ -16,6 +16,15 @@ class WhisperImpl(Enum): INSANELY_FAST_WHISPER = "insanely_fast_whisper" +class Segment(BaseModel): + text: Optional[str] = Field(default=None, + description="Transcription text of the segment") + start: Optional[float] = Field(default=None, + description="Start time of the segment") + end: Optional[float] = Field(default=None, + description="End time of the segment") + + class BaseParams(BaseModel): model_config = ConfigDict(protected_namespaces=())