Spaces:
Running
on
T4
Running
on
T4
Update VAD/vad_iterator.py
Browse files- VAD/vad_iterator.py +2 -0
VAD/vad_iterator.py
CHANGED
@@ -73,6 +73,7 @@ class VADIterator:
|
|
73 |
self.current_sample += window_size_samples
|
74 |
|
75 |
speech_prob = self.model(x, self.sampling_rate).item()
|
|
|
76 |
|
77 |
if (speech_prob >= self.threshold) and self.temp_end:
|
78 |
self.temp_end = 0
|
@@ -85,6 +86,7 @@ class VADIterator:
|
|
85 |
if not self.temp_end:
|
86 |
self.temp_end = self.current_sample
|
87 |
if self.current_sample - self.temp_end < self.min_silence_samples:
|
|
|
88 |
return None
|
89 |
else:
|
90 |
# end of speak
|
|
|
73 |
self.current_sample += window_size_samples
|
74 |
|
75 |
speech_prob = self.model(x, self.sampling_rate).item()
|
76 |
+
print(speech_prob)
|
77 |
|
78 |
if (speech_prob >= self.threshold) and self.temp_end:
|
79 |
self.temp_end = 0
|
|
|
86 |
if not self.temp_end:
|
87 |
self.temp_end = self.current_sample
|
88 |
if self.current_sample - self.temp_end < self.min_silence_samples:
|
89 |
+
print("yes")
|
90 |
return None
|
91 |
else:
|
92 |
# end of speak
|