From 5777c7d0d736a5a63af760dc564255d56f68d10c Mon Sep 17 00:00:00 2001 From: McCloudS <64094529+McCloudS@users.noreply.github.com> Date: Thu, 19 Oct 2023 16:32:27 -0600 Subject: [PATCH] Update subgen.py --- subgen/subgen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subgen/subgen.py b/subgen/subgen.py index f081f26..4121e5c 100644 --- a/subgen/subgen.py +++ b/subgen/subgen.py @@ -91,7 +91,7 @@ def gen_subtitles(inputvideo): try: print(f"Transcribing file: {inputvideo}") result = model.transcribe_stable(inputvideo) - result.to_srt_vtt(inputvideo.rsplit('.', 1)[0] + ' ' + subextension, word_level=word_level_highlight) + result.to_srt_vtt(inputvideo.rsplit('.', 1)[0] + subextension, word_level=word_level_highlight) print(f"Transcription of {file_path} is completed.") files_to_transcribe.remove(inputvideo) except Exception as e: @@ -104,7 +104,7 @@ def add_file_for_transcription(file_path): if has_subtitle_language(file_path, skipifinternalsublang): print("File already has an internal sub we want, skipping generation") return "File already has an internal sub we want, skipping generation" - elif os.path.exists(file_path.rsplit('.', 1)[0] + ' ' + subextension): + elif os.path.exists(file_path.rsplit('.', 1)[0] + subextension): print("We already have a subgen created for this file, skipping it") return "We already have a subgen created for this file, skipping it"