Update src/transcriber.py
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 |
-
|
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
|
|
|
44 |
return result, srt_path, " ".join(result_clean)
|
45 |
|
46 |
def transcriber(file_input:gr.File,
|
47 |
+
file_type: str,
|
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 file_type == "video" :
|
53 |
audio_input = convert_video_to_audio(file_input)
|
54 |
else:
|
55 |
audio_input = file_input
|