Skip to content

Commit

Permalink
Add Segment model
Browse files Browse the repository at this point in the history
  • Loading branch information
jhj0517 committed Oct 29, 2024
1 parent 2d14a2b commit 95073dd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/whisper/data_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=())

Expand Down

0 comments on commit 95073dd

Please sign in to comment.