pysilero-vad 2.0.1__py3-none-any.whl → 2.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pysilero_vad/__init__.py +11 -0
- {pysilero_vad-2.0.1.dist-info → pysilero_vad-2.1.0.dist-info}/METADATA +4 -3
- pysilero_vad-2.1.0.dist-info/RECORD +9 -0
- {pysilero_vad-2.0.1.dist-info → pysilero_vad-2.1.0.dist-info}/WHEEL +1 -1
- pysilero_vad-2.0.1.dist-info/RECORD +0 -9
- {pysilero_vad-2.0.1.dist-info → pysilero_vad-2.1.0.dist-info/licenses}/LICENSE.md +0 -0
- {pysilero_vad-2.0.1.dist-info → pysilero_vad-2.1.0.dist-info}/top_level.txt +0 -0
- {pysilero_vad-2.0.1.dist-info → pysilero_vad-2.1.0.dist-info}/zip-safe +0 -0
pysilero_vad/__init__.py
CHANGED
@@ -73,6 +73,17 @@ class SileroVoiceActivityDetector:
|
|
73
73
|
|
74
74
|
audio_array = np.frombuffer(audio, dtype=np.int16).astype(np.float32) / _MAX_WAV
|
75
75
|
|
76
|
+
return self.process_array(audio_array)
|
77
|
+
|
78
|
+
def process_array(self, audio_array: np.ndarray) -> float:
|
79
|
+
"""Return probability of speech [0-1] in a single audio chunk.
|
80
|
+
|
81
|
+
Audio *must* be 512 float samples [0-1] of 16Khz mono.
|
82
|
+
"""
|
83
|
+
if len(audio_array) != _CHUNK_SAMPLES:
|
84
|
+
# Window size is fixed at 512 samples in v5
|
85
|
+
raise InvalidChunkSizeError
|
86
|
+
|
76
87
|
# Add batch dimension and context
|
77
88
|
audio_array = np.concatenate(
|
78
89
|
(self._context, audio_array[np.newaxis, :]), axis=1
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: pysilero_vad
|
3
|
-
Version: 2.0
|
3
|
+
Version: 2.1.0
|
4
4
|
Summary: Pre-packaged voice activity detector using silero-vad
|
5
5
|
Author-email: Michael Hansen <mike@rhasspy.org>
|
6
6
|
License: MIT
|
@@ -21,7 +21,8 @@ Requires-Python: >=3.8.0
|
|
21
21
|
Description-Content-Type: text/markdown
|
22
22
|
License-File: LICENSE.md
|
23
23
|
Requires-Dist: onnxruntime<2,>=1.18.0
|
24
|
-
Requires-Dist: numpy
|
24
|
+
Requires-Dist: numpy
|
25
|
+
Dynamic: license-file
|
25
26
|
|
26
27
|
# pySilero VAD
|
27
28
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
pysilero_vad/__init__.py,sha256=mq_sBAonBDol7f3TMeYUofUTk3ZPESGdolsAiDWzIJU,3835
|
2
|
+
pysilero_vad/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
+
pysilero_vad/models/silero_vad.onnx,sha256=a5nL_Tkka2cG-Y7BPHxQxrKZGB8kdPoFy8gEaswnQ5Y,2313101
|
4
|
+
pysilero_vad-2.1.0.dist-info/licenses/LICENSE.md,sha256=E3RtUJ105V6iJl--8gS7fNv4SoMVsCB-mIMmy1Q4cCg,1071
|
5
|
+
pysilero_vad-2.1.0.dist-info/METADATA,sha256=Odwa6zy58E5aXb4n94GcjDKdPEPtgDGkxigblW3yeEc,1430
|
6
|
+
pysilero_vad-2.1.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
7
|
+
pysilero_vad-2.1.0.dist-info/top_level.txt,sha256=QQlOVbq_uDMukkVxjBFRi8eOwSrzJDrbP8YY1MCeMIs,13
|
8
|
+
pysilero_vad-2.1.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
9
|
+
pysilero_vad-2.1.0.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
pysilero_vad/__init__.py,sha256=_QtP_z0JjpOkSHMaqRFuSI9Bf0oL-k8IJE0hmZdZDLk,3433
|
2
|
-
pysilero_vad/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
pysilero_vad/models/silero_vad.onnx,sha256=a5nL_Tkka2cG-Y7BPHxQxrKZGB8kdPoFy8gEaswnQ5Y,2313101
|
4
|
-
pysilero_vad-2.0.1.dist-info/LICENSE.md,sha256=E3RtUJ105V6iJl--8gS7fNv4SoMVsCB-mIMmy1Q4cCg,1071
|
5
|
-
pysilero_vad-2.0.1.dist-info/METADATA,sha256=l2Xc-Dw2iaRvnXJ0e9lb69cUGn4LJAamNx138UAQh_A,1410
|
6
|
-
pysilero_vad-2.0.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
7
|
-
pysilero_vad-2.0.1.dist-info/top_level.txt,sha256=QQlOVbq_uDMukkVxjBFRi8eOwSrzJDrbP8YY1MCeMIs,13
|
8
|
-
pysilero_vad-2.0.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
9
|
-
pysilero_vad-2.0.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|