Merge pull request #332 from snakers4/adamnsandle

fx https://github.com/snakers4/silero-vad/pull/329 bug
This commit is contained in:
Dimitrii Voronin
2023-04-28 14:54:44 +03:00
committed by GitHub
2 changed files with 4 additions and 5 deletions

Binary file not shown.

View File

@@ -34,7 +34,7 @@ class OnnxWrapper():
if sr != 16000 and (sr % 16000 == 0):
step = sr // 16000
x = x[::step]
x = x[:, ::step]
sr = 16000
if sr not in self.sample_rates:
@@ -310,7 +310,6 @@ def get_speech_timestamps(audio: torch.Tensor,
triggered = False
continue
if (speech_prob < neg_threshold) and triggered:
if not temp_end:
temp_end = window_size_samples * i