update
Browse files- main.py +1 -1
- toolbox/vad/vad.py +2 -2
main.py
CHANGED
@@ -152,7 +152,7 @@ def main():
|
|
152 |
ring_max_speech_length_s = gr.Slider(minimum=0.0, maximum=10.0, value=2.0, step=0.05, label="max_speech_length_s")
|
153 |
ring_min_speech_length_s = gr.Slider(minimum=0.0, maximum=2.0, value=0.3, step=0.05, label="min_speech_length_s")
|
154 |
|
155 |
-
ring_button = gr.Button("
|
156 |
|
157 |
with gr.Column(scale=1):
|
158 |
ring_image = gr.Image(label="image", height=300, width=720, show_label=False)
|
|
|
152 |
ring_max_speech_length_s = gr.Slider(minimum=0.0, maximum=10.0, value=2.0, step=0.05, label="max_speech_length_s")
|
153 |
ring_min_speech_length_s = gr.Slider(minimum=0.0, maximum=2.0, value=0.3, step=0.05, label="min_speech_length_s")
|
154 |
|
155 |
+
ring_button = gr.Button("run", variant="primary")
|
156 |
|
157 |
with gr.Column(scale=1):
|
158 |
ring_image = gr.Image(label="image", height=300, width=720, show_label=False)
|
toolbox/vad/vad.py
CHANGED
@@ -124,8 +124,8 @@ class Vad(object):
|
|
124 |
self.frame_length = int(sample_rate * (frame_length_ms / 1000.0))
|
125 |
self.frame_step = int(sample_rate * (frame_step_ms / 1000.0))
|
126 |
self.frame_timestamp_s = 0.0
|
127 |
-
|
128 |
-
self.signal_cache = None
|
129 |
|
130 |
# segments
|
131 |
self.num_padding_frames = int(padding_length_ms / frame_step_ms)
|
|
|
124 |
self.frame_length = int(sample_rate * (frame_length_ms / 1000.0))
|
125 |
self.frame_step = int(sample_rate * (frame_step_ms / 1000.0))
|
126 |
self.frame_timestamp_s = 0.0
|
127 |
+
self.signal_cache = np.zeros(shape=(self.frame_length,), dtype=np.int16)
|
128 |
+
# self.signal_cache = None
|
129 |
|
130 |
# segments
|
131 |
self.num_padding_frames = int(padding_length_ms / frame_step_ms)
|