Update modules/vad/silero_vad.py
Browse files
modules/vad/silero_vad.py
CHANGED
@@ -89,7 +89,7 @@ class SileroVAD:
|
|
89 |
vad_options = VadOptions(**kwargs)
|
90 |
|
91 |
threshold = vad_options.threshold
|
92 |
-
neg_threshold =
|
93 |
min_speech_duration_ms = vad_options.min_speech_duration_ms
|
94 |
max_speech_duration_s = vad_options.max_speech_duration_s
|
95 |
min_silence_duration_ms = vad_options.min_silence_duration_ms
|
@@ -116,9 +116,6 @@ class SileroVAD:
|
|
116 |
speeches = []
|
117 |
current_speech = {}
|
118 |
|
119 |
-
if neg_threshold is None:
|
120 |
-
neg_threshold = max(threshold - 0.15, 0.01)
|
121 |
-
|
122 |
# to save potential segment end (and tolerate some silence)
|
123 |
temp_end = 0
|
124 |
# to save potential segment limits in case of maximum segment size reached
|
|
|
89 |
vad_options = VadOptions(**kwargs)
|
90 |
|
91 |
threshold = vad_options.threshold
|
92 |
+
neg_threshold = max(threshold - 0.15, 0.01)
|
93 |
min_speech_duration_ms = vad_options.min_speech_duration_ms
|
94 |
max_speech_duration_s = vad_options.max_speech_duration_s
|
95 |
min_silence_duration_ms = vad_options.min_silence_duration_ms
|
|
|
116 |
speeches = []
|
117 |
current_speech = {}
|
118 |
|
|
|
|
|
|
|
119 |
# to save potential segment end (and tolerate some silence)
|
120 |
temp_end = 0
|
121 |
# to save potential segment limits in case of maximum segment size reached
|