INNER CODE UNIT · Python
download_subtitle
Kabanosk/whisper-website · src/api/transcription.py:21
def download_subtitle(
request: Request,
file: bytes = File(),
model_type: WhisperModelType = Form(WhisperModelType.TINY),
timestamps: bool = Form(False),
filename: str = Form("subtitles"),
file_type: SubtitleFileType = Form(SubtitleFileType.SRT),
max_characters: int = Form(DEFAULT_MAX_CHARACTERS),
translate_to: str = Form("no_translation"),
):
transcription = TranscriptionRequest(
model_type=model_type,
timestamps=timestamps,
filename=filename,
file_type=file_type,
max_characters=max_characters,
translate_to=translate_to,
)