Spaces:
Sleeping
Sleeping
update
Browse files
main.py
CHANGED
@@ -58,7 +58,7 @@ def run_nx_vad(filename: str, silence_time: float = 0.3, longest_activate: float
|
|
58 |
|
59 |
vad_timestamps: str = json.dumps(vad_timestamps, ensure_ascii=False, indent=2)
|
60 |
|
61 |
-
return
|
62 |
|
63 |
|
64 |
def run_silero_vad(filename: str, silence_time: float = 0.3, longest_activate: float = 3.0) -> Tuple[str, str]:
|
@@ -78,7 +78,7 @@ def run_silero_vad(filename: str, silence_time: float = 0.3, longest_activate: f
|
|
78 |
|
79 |
vad_timestamps: str = json.dumps(vad_timestamps, ensure_ascii=False, indent=2)
|
80 |
|
81 |
-
return
|
82 |
|
83 |
|
84 |
def shell(cmd: str):
|
@@ -118,8 +118,8 @@ def main():
|
|
118 |
uploaded_silence_time = gr.Slider(minimum=0.0, maximum=1.0, value=0.3, step=0.01, label="silence time")
|
119 |
uploaded_longest_activate = gr.Slider(minimum=0.0, maximum=20.0, value=3.0, step=0.1, label="longest activate")
|
120 |
upload_button = gr.Button("Run VAD", variant="primary")
|
121 |
-
uploaded_raw_vad_result = gr.Textbox(label="raw_vad_result")
|
122 |
uploaded_vad_timestamps = gr.Textbox(label="vad_timestamps")
|
|
|
123 |
|
124 |
gr.Examples(
|
125 |
examples=examples,
|
@@ -130,8 +130,8 @@ def main():
|
|
130 |
uploaded_longest_activate,
|
131 |
],
|
132 |
outputs=[
|
133 |
-
uploaded_raw_vad_result,
|
134 |
uploaded_vad_timestamps,
|
|
|
135 |
],
|
136 |
fn=process_uploaded_file
|
137 |
)
|
@@ -145,8 +145,8 @@ def main():
|
|
145 |
uploaded_longest_activate,
|
146 |
],
|
147 |
outputs=[
|
148 |
-
uploaded_raw_vad_result,
|
149 |
uploaded_vad_timestamps,
|
|
|
150 |
],
|
151 |
)
|
152 |
with gr.TabItem("shell"):
|
|
|
58 |
|
59 |
vad_timestamps: str = json.dumps(vad_timestamps, ensure_ascii=False, indent=2)
|
60 |
|
61 |
+
return vad_timestamps, raw_vad_result
|
62 |
|
63 |
|
64 |
def run_silero_vad(filename: str, silence_time: float = 0.3, longest_activate: float = 3.0) -> Tuple[str, str]:
|
|
|
78 |
|
79 |
vad_timestamps: str = json.dumps(vad_timestamps, ensure_ascii=False, indent=2)
|
80 |
|
81 |
+
return vad_timestamps, raw_vad_result
|
82 |
|
83 |
|
84 |
def shell(cmd: str):
|
|
|
118 |
uploaded_silence_time = gr.Slider(minimum=0.0, maximum=1.0, value=0.3, step=0.01, label="silence time")
|
119 |
uploaded_longest_activate = gr.Slider(minimum=0.0, maximum=20.0, value=3.0, step=0.1, label="longest activate")
|
120 |
upload_button = gr.Button("Run VAD", variant="primary")
|
|
|
121 |
uploaded_vad_timestamps = gr.Textbox(label="vad_timestamps")
|
122 |
+
uploaded_raw_vad_result = gr.Textbox(label="raw_vad_result")
|
123 |
|
124 |
gr.Examples(
|
125 |
examples=examples,
|
|
|
130 |
uploaded_longest_activate,
|
131 |
],
|
132 |
outputs=[
|
|
|
133 |
uploaded_vad_timestamps,
|
134 |
+
uploaded_raw_vad_result,
|
135 |
],
|
136 |
fn=process_uploaded_file
|
137 |
)
|
|
|
145 |
uploaded_longest_activate,
|
146 |
],
|
147 |
outputs=[
|
|
|
148 |
uploaded_vad_timestamps,
|
149 |
+
uploaded_raw_vad_result,
|
150 |
],
|
151 |
)
|
152 |
with gr.TabItem("shell"):
|