Spaces:
Running
Running
jhj0517
commited on
Commit
·
78d8e18
1
Parent(s):
0184fe2
Add Segment model
Browse files
modules/whisper/data_classes.py
CHANGED
|
@@ -16,6 +16,15 @@ class WhisperImpl(Enum):
|
|
| 16 |
INSANELY_FAST_WHISPER = "insanely_fast_whisper"
|
| 17 |
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
class BaseParams(BaseModel):
|
| 20 |
model_config = ConfigDict(protected_namespaces=())
|
| 21 |
|
|
|
|
| 16 |
INSANELY_FAST_WHISPER = "insanely_fast_whisper"
|
| 17 |
|
| 18 |
|
| 19 |
+
class Segment(BaseModel):
|
| 20 |
+
text: Optional[str] = Field(default=None,
|
| 21 |
+
description="Transcription text of the segment")
|
| 22 |
+
start: Optional[float] = Field(default=None,
|
| 23 |
+
description="Start time of the segment")
|
| 24 |
+
end: Optional[float] = Field(default=None,
|
| 25 |
+
description="End time of the segment")
|
| 26 |
+
|
| 27 |
+
|
| 28 |
class BaseParams(BaseModel):
|
| 29 |
model_config = ConfigDict(protected_namespaces=())
|
| 30 |
|