add video (bool) arg
Browse files- src/transcriber.py +2 -2
src/transcriber.py
CHANGED
@@ -44,12 +44,12 @@ def write_srt(segments, max_words_per_line, srt_path):
|
|
44 |
return result, srt_path, " ".join(result_clean)
|
45 |
|
46 |
def transcriber(file_input:gr.File,
|
|
|
47 |
max_words_per_line:int,
|
48 |
task:str,
|
49 |
model_version:str):
|
50 |
-
print(file_input.split('.')[0])
|
51 |
srt_filepath = os.path.normpath(f"{file_input.split('.')[0]}.srt")
|
52 |
-
if
|
53 |
audio_input = convert_video_to_audio(file_input)
|
54 |
else:
|
55 |
audio_input = file_input
|
|
|
44 |
return result, srt_path, " ".join(result_clean)
|
45 |
|
46 |
def transcriber(file_input:gr.File,
|
47 |
+
video: bool,
|
48 |
max_words_per_line:int,
|
49 |
task:str,
|
50 |
model_version:str):
|
|
|
51 |
srt_filepath = os.path.normpath(f"{file_input.split('.')[0]}.srt")
|
52 |
+
if video:
|
53 |
audio_input = convert_video_to_audio(file_input)
|
54 |
else:
|
55 |
audio_input = file_input
|