pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
py-silero-vad: Add package
Module Name: pkgsrc-wip
Committed By: Greg Troxel <gdt%lexort.com@localhost>
Pushed By: gdt
Date: Thu Jan 8 11:07:25 2026 -0500
Changeset: 8feba8ff7599dfd3db1dca1ccfb3531c2ae5ae0c
Modified Files:
Makefile
Added Files:
py-silero-vad/COMMIT_MSG
py-silero-vad/DESCR
py-silero-vad/Makefile
py-silero-vad/PLIST
py-silero-vad/TODO
py-silero-vad/distinfo
py-silero-vad/patches/patch-src_ggml_src_ggml-cpu_ops.cpp
Log Message:
py-silero-vad: Add package
This might be ready, but I just asked upstream to apply a fix in
pkgsrc, and there's no rush.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8feba8ff7599dfd3db1dca1ccfb3531c2ae5ae0c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
py-silero-vad/COMMIT_MSG | 1 +
py-silero-vad/DESCR | 2 +
py-silero-vad/Makefile | 19 ++
py-silero-vad/PLIST | 4 +
py-silero-vad/TODO | 2 +
py-silero-vad/distinfo | 6 +
.../patches/patch-src_ggml_src_ggml-cpu_ops.cpp | 325 +++++++++++++++++++++
8 files changed, 360 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 3e775a1517..89f270e79a 100644
--- a/Makefile
+++ b/Makefile
@@ -4737,6 +4737,7 @@ SUBDIR+= py-shp
SUBDIR+= py-shtoom
SUBDIR+= py-shutilwhich
SUBDIR+= py-siginterrupt
+SUBDIR+= py-silero-vad
SUBDIR+= py-sima
SUBDIR+= py-simpleparse-mxtexttools
SUBDIR+= py-simulators
diff --git a/py-silero-vad/COMMIT_MSG b/py-silero-vad/COMMIT_MSG
new file mode 100644
index 0000000000..2e25cae00d
--- /dev/null
+++ b/py-silero-vad/COMMIT_MSG
@@ -0,0 +1 @@
+audio/py-silero-vad: Add version 3.0.1
diff --git a/py-silero-vad/DESCR b/py-silero-vad/DESCR
new file mode 100644
index 0000000000..ad4d73d033
--- /dev/null
+++ b/py-silero-vad/DESCR
@@ -0,0 +1,2 @@
+pysilero-vad is a pre-packaged voice activity detector using
+silero-vad. It is most likely useful with Home Assistant.
diff --git a/py-silero-vad/Makefile b/py-silero-vad/Makefile
new file mode 100644
index 0000000000..17794d468b
--- /dev/null
+++ b/py-silero-vad/Makefile
@@ -0,0 +1,19 @@
+# $NetBSD$
+
+DISTNAME= pysilero_vad-3.0.1
+CATEGORIES= # TODO: add primary category
+MASTER_SITES= ${MASTER_SITE_GITHUB:=rhasspy/}
+GITHUB_PROJECT= pysilero-vad
+GITHUB_RELEASE= v3.0.1
+DIST_SUBDIR= ${GITHUB_PROJECT}
+
+MAINTAINER= gdt%NetBSD.org@localhost
+HOMEPAGE= https://github.com/rhasspy/pysilero-vad/
+COMMENT= Pre-packaged voice activity detector using silero-vad
+LICENSE= mit
+
+USE_LANGUAGES= c c++
+USE_CXX_FEATURES= c++20
+
+.include "../../lang/python/wheel.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/py-silero-vad/PLIST b/py-silero-vad/PLIST
new file mode 100644
index 0000000000..92ba51a2d7
--- /dev/null
+++ b/py-silero-vad/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+@comment TODO: to fill this file with the file listing:
+@comment TODO: 1. run "/usr/bin/make package"
+@comment TODO: 2. run "/usr/bin/make print-PLIST"
diff --git a/py-silero-vad/TODO b/py-silero-vad/TODO
new file mode 100644
index 0000000000..7cc024e4c5
--- /dev/null
+++ b/py-silero-vad/TODO
@@ -0,0 +1,2 @@
+ - update after upstream accepts patch and releases
+ - test?
diff --git a/py-silero-vad/distinfo b/py-silero-vad/distinfo
new file mode 100644
index 0000000000..d05104cfdc
--- /dev/null
+++ b/py-silero-vad/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (pysilero-vad/pysilero_vad-3.0.1.tar.gz) = 9c622231575e16c696b28cd5e356b3a513b2107ce0bf5e83da1de646e1d09087
+SHA512 (pysilero-vad/pysilero_vad-3.0.1.tar.gz) = 036b472a5189c16e009c85ceaeeec7d42d5792644557e47df054fe24ae22e8c94d9b952fb9c739a3168cc8ab86403ffccd7bfe7aa5fb8561c98789f06bfb4f10
+Size (pysilero-vad/pysilero_vad-3.0.1.tar.gz) = 1891026 bytes
+SHA1 (patch-src_ggml_src_ggml-cpu_ops.cpp) = 14135847b994bce4a72dac879f4c9dac5dfcfb46
diff --git a/py-silero-vad/patches/patch-src_ggml_src_ggml-cpu_ops.cpp b/py-silero-vad/patches/patch-src_ggml_src_ggml-cpu_ops.cpp
new file mode 100644
index 0000000000..0d28815178
--- /dev/null
+++ b/py-silero-vad/patches/patch-src_ggml_src_ggml-cpu_ops.cpp
@@ -0,0 +1,325 @@
+$NetBSD$
+
+Fix bare isnan to std::isnan
+
+https://github.com/rhasspy/pysilero-vad/issues/9
+
+--- src/ggml/src/ggml-cpu/ops.cpp.orig 2026-01-08 15:48:03.312828141 +0000
++++ src/ggml/src/ggml-cpu/ops.cpp
+@@ -2123,8 +2123,8 @@ static void ggml_compute_forward_gelu_f3
+ for (int k = 0; k < nc; k++) {
+ const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -2163,8 +2163,8 @@ static void ggml_compute_forward_gelu_f1
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float v = GGML_CPU_FP16_TO_FP32(x);
+ GGML_UNUSED(v);
+- assert(!isnan(v));
+- assert(!isinf(v));
++ assert(!std::isnan(v));
++ assert(!std::isinf(v));
+ }
+ #endif
+ }
+@@ -2303,8 +2303,8 @@ static void ggml_compute_forward_gelu_er
+ for (int k = 0; k < nc; k++) {
+ const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -2343,8 +2343,8 @@ static void ggml_compute_forward_gelu_er
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float v = GGML_CPU_FP16_TO_FP32(x);
+ GGML_UNUSED(v);
+- assert(!isnan(v));
+- assert(!isinf(v));
++ assert(!std::isnan(v));
++ assert(!std::isinf(v));
+ }
+ #endif
+ }
+@@ -2406,8 +2406,8 @@ static void ggml_compute_forward_gelu_qu
+ for (int k = 0; k < nc; k++) {
+ const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -2446,8 +2446,8 @@ static void ggml_compute_forward_gelu_qu
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float v = GGML_CPU_FP16_TO_FP32(x);
+ GGML_UNUSED(v);
+- assert(!isnan(v));
+- assert(!isinf(v));
++ assert(!std::isnan(v));
++ assert(!std::isinf(v));
+ }
+ #endif
+ }
+@@ -2509,8 +2509,8 @@ static void ggml_compute_forward_silu_f3
+ for (int k = 0; k < nc; k++) {
+ const float x = ((float *) ((char *) dst->data + i1*(dst->nb[1])))[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -2549,8 +2549,8 @@ static void ggml_compute_forward_silu_f1
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*(dst->nb[1])))[k];
+ const float v = GGML_CPU_FP16_TO_FP32(x);
+ GGML_UNUSED(v);
+- assert(!isnan(v));
+- assert(!isinf(v));
++ assert(!std::isnan(v));
++ assert(!std::isinf(v));
+ }
+ #endif
+ }
+@@ -2699,8 +2699,8 @@ static void ggml_compute_forward_silu_ba
+ for (int k = 0; k < nc; k++) {
+ const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -2743,8 +2743,8 @@ static void ggml_compute_forward_silu_ba
+ const float x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float v = GGML_CPU_FP16_TO_FP32(x);
+ GGML_UNUSED(v);
+- assert(!isnan(v));
+- assert(!isinf(v));
++ assert(!std::isnan(v));
++ assert(!std::isinf(v));
+ }
+ #endif
+ }
+@@ -2826,8 +2826,8 @@ static void ggml_compute_forward_reglu_f
+ for (int k = 0; k < nc; k++) {
+ const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -2886,8 +2886,8 @@ static void ggml_compute_forward_reglu_f
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float v = GGML_FP16_TO_FP32(x);
+ GGML_UNUSED(v);
+- assert(!isnan(v));
+- assert(!isinf(v));
++ assert(!std::isnan(v));
++ assert(!std::isinf(v));
+ }
+ #endif
+ }
+@@ -2969,8 +2969,8 @@ static void ggml_compute_forward_geglu_f
+ for (int k = 0; k < nc; k++) {
+ const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -3029,8 +3029,8 @@ static void ggml_compute_forward_geglu_f
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float v = GGML_FP16_TO_FP32(x);
+ GGML_UNUSED(v);
+- assert(!isnan(v));
+- assert(!isinf(v));
++ assert(!std::isnan(v));
++ assert(!std::isinf(v));
+ }
+ #endif
+ }
+@@ -3112,8 +3112,8 @@ static void ggml_compute_forward_swiglu_
+ for (int k = 0; k < nc; k++) {
+ const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -3172,8 +3172,8 @@ static void ggml_compute_forward_swiglu_
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float v = GGML_FP16_TO_FP32(x);
+ GGML_UNUSED(v);
+- assert(!isnan(v));
+- assert(!isinf(v));
++ assert(!std::isnan(v));
++ assert(!std::isinf(v));
+ }
+ #endif
+ }
+@@ -3263,8 +3263,8 @@ static void ggml_compute_forward_swiglu_
+ for (int k = 0; k < nc; k++) {
+ const float x = dst_p[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -3342,8 +3342,8 @@ static void ggml_compute_forward_geglu_e
+ for (int k = 0; k < nc; k++) {
+ const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -3402,8 +3402,8 @@ static void ggml_compute_forward_geglu_e
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float v = GGML_FP16_TO_FP32(x);
+ GGML_UNUSED(v);
+- assert(!isnan(v));
+- assert(!isinf(v));
++ assert(!std::isnan(v));
++ assert(!std::isinf(v));
+ }
+ #endif
+ }
+@@ -3485,8 +3485,8 @@ static void ggml_compute_forward_geglu_q
+ for (int k = 0; k < nc; k++) {
+ const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ GGML_UNUSED(x);
+- assert(!isnan(x));
+- assert(!isinf(x));
++ assert(!std::isnan(x));
++ assert(!std::isinf(x));
+ }
+ #endif
+ }
+@@ -3545,8 +3545,8 @@ static void ggml_compute_forward_geglu_q
+ const ggml_fp16_t x = ((ggml_fp16_t *) ((char *) dst->data + i1*( dst->nb[1])))[k];
+ const float v = GGML_FP16_TO_FP32(x);
+ GGML_UNUSED(v);
+- assert(!isnan(v));
+- assert(!isinf(v));
++ assert(!std::isnan(v));
++ assert(!std::isinf(v));
+ }
+ #endif
+ }
+@@ -5237,7 +5237,7 @@ static void ggml_compute_forward_soft_ma
+ #ifndef NDEBUG
+ for (int i = 0; i < ne00; ++i) {
+ //printf("p[%d] = %f\n", i, p[i]);
+- assert(!isnan(wp[i]));
++ assert(!std::isnan(wp[i]));
+ }
+ #endif
+
+@@ -5261,8 +5261,8 @@ static void ggml_compute_forward_soft_ma
+
+ #ifndef NDEBUG
+ for (int i = 0; i < ne00; ++i) {
+- assert(!isnan(dp[i]));
+- assert(!isinf(dp[i]));
++ assert(!std::isnan(dp[i]));
++ assert(!std::isinf(dp[i]));
+ }
+ #endif
+ }
+@@ -5335,8 +5335,8 @@ static void ggml_compute_forward_soft_ma
+ #ifndef NDEBUG
+ for (int i = 0; i < nc; ++i) {
+ //printf("p[%d] = %f\n", i, p[i]);
+- assert(!isnan(dy[i]));
+- assert(!isnan(y[i]));
++ assert(!std::isnan(dy[i]));
++ assert(!std::isnan(y[i]));
+ }
+ #endif
+ // Jii = yi - yi*yi
+@@ -5368,8 +5368,8 @@ static void ggml_compute_forward_soft_ma
+
+ #ifndef NDEBUG
+ for (int i = 0; i < nc; ++i) {
+- assert(!isnan(dx[i]));
+- assert(!isinf(dx[i]));
++ assert(!std::isnan(dx[i]));
++ assert(!std::isinf(dx[i]));
+ }
+ #endif
+ }
+@@ -10040,8 +10040,8 @@ static void ggml_compute_forward_cross_e
+ #ifndef NDEBUG
+ for (int64_t i = 0; i < nc; ++i) {
+ //printf("p[%d] = %f\n", i, p[i]);
+- assert(!isnan(s0[i]));
+- assert(!isnan(s1[i]));
++ assert(!std::isnan(s0[i]));
++ assert(!std::isnan(s1[i]));
+ }
+ #endif
+
+@@ -10059,8 +10059,8 @@ static void ggml_compute_forward_cross_e
+
+ #ifndef NDEBUG
+ for (int64_t i = 0; i < nc; ++i) {
+- assert(!isnan(st[i]));
+- assert(!isinf(st[i]));
++ assert(!std::isnan(st[i]));
++ assert(!std::isinf(st[i]));
+ }
+ #endif
+ }
+@@ -10132,8 +10132,8 @@ static void ggml_compute_forward_cross_e
+ #ifndef NDEBUG
+ for (int64_t i = 0; i < nc; ++i) {
+ //printf("p[%d] = %f\n", i, p[i]);
+- assert(!isnan(s0[i]));
+- assert(!isnan(s1[i]));
++ assert(!std::isnan(s0[i]));
++ assert(!std::isnan(s1[i]));
+ }
+ #endif
+
+@@ -10150,8 +10150,8 @@ static void ggml_compute_forward_cross_e
+
+ #ifndef NDEBUG
+ for (int64_t i = 0; i < nc; ++i) {
+- assert(!isnan(ds0[i]));
+- assert(!isinf(ds0[i]));
++ assert(!std::isnan(ds0[i]));
++ assert(!std::isinf(ds0[i]));
+ }
+ #endif
+ }
Home |
Main Index |
Thread Index |
Old Index