pysilero-vad 2.0.1__py3-none-any.whl → 2.1.1__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 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.2
1
+ Metadata-Version: 2.4
2
2
  Name: pysilero_vad
3
- Version: 2.0.1
3
+ Version: 2.1.1
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,16 @@ 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<2
24
+ Requires-Dist: numpy
25
+ Provides-Extra: dev
26
+ Requires-Dist: black==25.1.0; extra == "dev"
27
+ Requires-Dist: flake8==7.3.0; extra == "dev"
28
+ Requires-Dist: isort==6.0.1; extra == "dev"
29
+ Requires-Dist: mypy==1.17.0; extra == "dev"
30
+ Requires-Dist: pylint==3.3.7; extra == "dev"
31
+ Requires-Dist: pytest==8.4.1; extra == "dev"
32
+ Requires-Dist: build==1.2.2; extra == "dev"
33
+ Dynamic: license-file
25
34
 
26
35
  # pySilero VAD
27
36
 
@@ -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.1.dist-info/licenses/LICENSE.md,sha256=E3RtUJ105V6iJl--8gS7fNv4SoMVsCB-mIMmy1Q4cCg,1071
5
+ pysilero_vad-2.1.1.dist-info/METADATA,sha256=hPt2AQBcQFy1xev-yQfAc_3P5hchaUVXV2-JeSFf9aY,1762
6
+ pysilero_vad-2.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ pysilero_vad-2.1.1.dist-info/top_level.txt,sha256=QQlOVbq_uDMukkVxjBFRi8eOwSrzJDrbP8YY1MCeMIs,13
8
+ pysilero_vad-2.1.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9
+ pysilero_vad-2.1.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -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,,