marquesafonso
commited on
Update src/transcriber.py
Browse files- src/transcriber.py +2 -2
src/transcriber.py
CHANGED
@@ -45,10 +45,10 @@ def write_srt(segments, max_words_per_line, srt_path):
|
|
45 |
|
46 |
def transcriber(video_input:gr.File,
|
47 |
max_words_per_line:int,
|
48 |
-
task:str
|
|
|
49 |
srt_filepath = os.path.normpath(f"{video_input.split('.')[0]}.srt")
|
50 |
audio_input = convert_video_to_audio(video_input)
|
51 |
-
model_version = "large-v3"
|
52 |
model = WhisperModel(model_version, device="cpu", compute_type="int8")
|
53 |
segments, _ = model.transcribe(
|
54 |
audio_input,
|
|
|
45 |
|
46 |
def transcriber(video_input:gr.File,
|
47 |
max_words_per_line:int,
|
48 |
+
task:str,
|
49 |
+
model_version:str):
|
50 |
srt_filepath = os.path.normpath(f"{video_input.split('.')[0]}.srt")
|
51 |
audio_input = convert_video_to_audio(video_input)
|
|
|
52 |
model = WhisperModel(model_version, device="cpu", compute_type="int8")
|
53 |
segments, _ = model.transcribe(
|
54 |
audio_input,
|