19 lines
474 B
Python
19 lines
474 B
Python
from pydantic import BaseModel
|
|
from typing import List, Optional
|
|
|
|
class SRTSubtitle(BaseModel):
|
|
index: int
|
|
timestamp: str
|
|
japanese_text: str
|
|
english_translation: Optional[str] = None
|
|
|
|
class SRTTranslationRequest(BaseModel):
|
|
input_path: str
|
|
output_path: Optional[str] = None
|
|
target_language: str = "en" # Default to English
|
|
|
|
class SRTTranslationResponse(BaseModel):
|
|
success: bool
|
|
message: str
|
|
output_path: str
|
|
total_subtitles: int |