pc translate sentences
This commit is contained in:
@@ -52,7 +52,7 @@ class SentenceBoundaryDocument(BaseModel):
|
||||
return self
|
||||
|
||||
|
||||
VideoStatus = Literal["uploaded", "processing", "ready", "failed"]
|
||||
VideoStatus = Literal["uploaded", "processing", "ready", "failed", "local_subtitles"]
|
||||
|
||||
|
||||
class VideoSummary(BaseModel):
|
||||
@@ -144,6 +144,16 @@ class SubtitleTranslationResponse(BaseModel):
|
||||
error: Optional[str] = None
|
||||
|
||||
|
||||
class LocalSubtitleTranslationRequest(BaseModel):
|
||||
"""Upload locally generated English subtitles so the server can translate them."""
|
||||
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
duration_ms: int = Field(gt=0)
|
||||
algorithm_version: str = Field(default="local-pc", min_length=1, max_length=64)
|
||||
sentences: List[SentenceBoundary] = Field(min_length=1)
|
||||
|
||||
|
||||
class TranslationTerm(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user