Spaces:
Running
Running
jhj0517
commited on
Commit
·
a46b091
1
Parent(s):
899eb46
update name
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
import argparse
|
|
|
4 |
|
5 |
from modules.whisper_Inference import WhisperInference
|
6 |
from modules.faster_whisper_inference import FasterWhisperInference
|
@@ -60,8 +61,8 @@ class App:
|
|
60 |
cb_translate = gr.Checkbox(value=False, label="Translate to English?", interactive=True)
|
61 |
with gr.Row():
|
62 |
cb_timestamp = gr.Checkbox(value=True, label="Add a timestamp to the end of the filename", interactive=True)
|
63 |
-
with gr.Accordion("
|
64 |
-
cb_vad_filter = gr.Checkbox(label="Enable VAD Filter", value=False, interactive=True)
|
65 |
sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
|
66 |
nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
|
67 |
nb_max_speech_duration_s = gr.Number(label="Maximum Speech Duration (s)", value=9999)
|
@@ -134,8 +135,8 @@ class App:
|
|
134 |
with gr.Row():
|
135 |
cb_timestamp = gr.Checkbox(value=True, label="Add a timestamp to the end of the filename",
|
136 |
interactive=True)
|
137 |
-
with gr.Accordion("
|
138 |
-
cb_vad_filter = gr.Checkbox(label="Enable VAD Filter", value=False, interactive=True)
|
139 |
sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
|
140 |
nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
|
141 |
nb_max_speech_duration_s = gr.Number(label="Maximum Speech Duration (s)", value=9999)
|
@@ -200,8 +201,8 @@ class App:
|
|
200 |
dd_file_format = gr.Dropdown(["SRT", "WebVTT", "txt"], value="SRT", label="File Format")
|
201 |
with gr.Row():
|
202 |
cb_translate = gr.Checkbox(value=False, label="Translate to English?", interactive=True)
|
203 |
-
with gr.Accordion("
|
204 |
-
cb_vad_filter = gr.Checkbox(label="Enable VAD Filter", value=False, interactive=True)
|
205 |
sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
|
206 |
nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
|
207 |
nb_max_speech_duration_s = gr.Number(label="Maximum Speech Duration (s)", value=9999)
|
@@ -324,6 +325,7 @@ class App:
|
|
324 |
launch_args['server_port'] = self.args.server_port
|
325 |
if self.args.username and self.args.password:
|
326 |
launch_args['auth'] = (self.args.username, self.args.password)
|
|
|
327 |
self.app.queue(api_open=False).launch(**launch_args)
|
328 |
|
329 |
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
import argparse
|
4 |
+
import webbrowser
|
5 |
|
6 |
from modules.whisper_Inference import WhisperInference
|
7 |
from modules.faster_whisper_inference import FasterWhisperInference
|
|
|
61 |
cb_translate = gr.Checkbox(value=False, label="Translate to English?", interactive=True)
|
62 |
with gr.Row():
|
63 |
cb_timestamp = gr.Checkbox(value=True, label="Add a timestamp to the end of the filename", interactive=True)
|
64 |
+
with gr.Accordion("VAD Options", open=False):
|
65 |
+
cb_vad_filter = gr.Checkbox(label="Enable Silero VAD Filter", value=False, interactive=True)
|
66 |
sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
|
67 |
nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
|
68 |
nb_max_speech_duration_s = gr.Number(label="Maximum Speech Duration (s)", value=9999)
|
|
|
135 |
with gr.Row():
|
136 |
cb_timestamp = gr.Checkbox(value=True, label="Add a timestamp to the end of the filename",
|
137 |
interactive=True)
|
138 |
+
with gr.Accordion("VAD Options", open=False):
|
139 |
+
cb_vad_filter = gr.Checkbox(label="Enable Silero VAD Filter", value=False, interactive=True)
|
140 |
sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
|
141 |
nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
|
142 |
nb_max_speech_duration_s = gr.Number(label="Maximum Speech Duration (s)", value=9999)
|
|
|
201 |
dd_file_format = gr.Dropdown(["SRT", "WebVTT", "txt"], value="SRT", label="File Format")
|
202 |
with gr.Row():
|
203 |
cb_translate = gr.Checkbox(value=False, label="Translate to English?", interactive=True)
|
204 |
+
with gr.Accordion("VAD Options", open=False):
|
205 |
+
cb_vad_filter = gr.Checkbox(label="Enable Silero VAD Filter", value=False, interactive=True)
|
206 |
sd_threshold = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label="Speech Threshold", value=0.5)
|
207 |
nb_min_speech_duration_ms = gr.Number(label="Minimum Speech Duration (ms)", precision=0, value=250)
|
208 |
nb_max_speech_duration_s = gr.Number(label="Maximum Speech Duration (s)", value=9999)
|
|
|
325 |
launch_args['server_port'] = self.args.server_port
|
326 |
if self.args.username and self.args.password:
|
327 |
launch_args['auth'] = (self.args.username, self.args.password)
|
328 |
+
|
329 |
self.app.queue(api_open=False).launch(**launch_args)
|
330 |
|
331 |
|