DeeeeeeM
commited on
Commit
·
0f42c39
1
Parent(s):
ee711bf
added batch size 16
Browse files
app.py
CHANGED
@@ -30,8 +30,7 @@ def process_media(
|
|
30 |
model = stable_whisper.load_model(model_size, device=device)
|
31 |
|
32 |
try:
|
33 |
-
result = model.transcribe(temp_path, language=source_lang, vad=True, regroup=False, no_speech_threshold=0.9, denoiser="demucs")
|
34 |
-
#remove background music/noise: denoiser="demucs"
|
35 |
#result.save_as_json(word_transcription_path)
|
36 |
except Exception as e:
|
37 |
return None, None, None, None
|
@@ -297,7 +296,8 @@ with gr.Blocks() as interface:
|
|
297 |
choices=WHISPER_LANGUAGES,
|
298 |
label="Source Language",
|
299 |
value="tl",
|
300 |
-
interactive=True
|
|
|
301 |
)
|
302 |
model_type = gr.Dropdown(
|
303 |
choices=["faster whisper", "whisper"],
|
|
|
30 |
model = stable_whisper.load_model(model_size, device=device)
|
31 |
|
32 |
try:
|
33 |
+
result = model.transcribe(temp_path, language=source_lang, vad=True, regroup=False, no_speech_threshold=0.9, denoiser="demucs", batch_size=16)
|
|
|
34 |
#result.save_as_json(word_transcription_path)
|
35 |
except Exception as e:
|
36 |
return None, None, None, None
|
|
|
296 |
choices=WHISPER_LANGUAGES,
|
297 |
label="Source Language",
|
298 |
value="tl",
|
299 |
+
interactive=True,
|
300 |
+
allow_custom_value=False
|
301 |
)
|
302 |
model_type = gr.Dropdown(
|
303 |
choices=["faster whisper", "whisper"],
|