Update modules/whisper/whisper_base.py
Browse files213 unmodified lines21421521621721821922017 unmodified lines23823924024124224324424583 unmodified lines329330331332333334335213 unmodified linestranslate_output: bool = False,translate_model: str = "",target_lang: str = "",preview_output: bool = False,progress=gr.Progress(),*whisper_params,) -> list:17 unmodified linesTranslation model to usetarget_lang: strTarget language to usepreview_output: boolPreview optionprogress: gr.ProgressIndicator to show progress directly in gradio.*whisper_params: tuple83 unmodified linesfile_name, file_ext = os.path.splitext(os.path.basename(file))## With or without timestampsif preview_output:subtitle = get_txt(transcribed_segments)else:subtitle = get_plaintext(transcribed_segments)213 unmodified lines21421521621721821922017 unmodified lines23823924024124224324424583 unmodified lines329330331332333334335213 unmodified linestranslate_output: bool = False,translate_model: str = "",target_lang: str = "",add_timestamp_preview: bool = False,progress=gr.Progress(),*whisper_params,) -> list:17 unmodified linesTranslation model to usetarget_lang: strTarget language to useadd_timestamp_preview: boolBoolean value from gr.Checkbox() that determines whether to add a timestamp to output previewprogress: gr.ProgressIndicator to show progress directly in gradio.*whisper_params: tuple83 unmodified linesfile_name, file_ext = os.path.splitext(os.path.basename(file))## With or without timestampsif add_timestamp_preview:subtitle = get_txt(transcribed_segments)else:subtitle = get_plaintext(transcribed_segments)
modules/whisper/whisper_base.py+4-4