From eaf633ec9d6594544707c6ea21cedcf9558cb1a3 Mon Sep 17 00:00:00 2001 From: adamnsandle Date: Mon, 25 Nov 2024 13:54:46 +0000 Subject: [PATCH] fx negative ths bug --- src/silero_vad/utils_vad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/silero_vad/utils_vad.py b/src/silero_vad/utils_vad.py index 75d725f..9a64717 100644 --- a/src/silero_vad/utils_vad.py +++ b/src/silero_vad/utils_vad.py @@ -308,7 +308,7 @@ def get_speech_timestamps(audio: torch.Tensor, current_speech = {} if neg_threshold is None: - neg_threshold = threshold - 0.15 + neg_threshold = max(threshold - 0.15, 0.01) temp_end = 0 # to save potential segment end (and tolerate some silence) prev_end = next_start = 0 # to save potential segment limits in case of maximum segment size reached