Files
Personal-API/app/models/srt_translation.py
2026-05-05 15:28:08 +07:00

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