Github messages for voidlinux
 help / color / mirror / Atom feed
From: JohnGebbie <JohnGebbie@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: vosk-api-0.3.43
Date: Sat, 03 Sep 2022 22:52:27 +0200	[thread overview]
Message-ID: <20220903205227.6PlQS0EvizlofVel0GFxuHvdDOkdrMSs7LxOZTSXy-I@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39015@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 745 bytes --]

There is an updated pull request by JohnGebbie against master on the void-packages repository

https://github.com/JohnGebbie/void-packages libvosk
https://github.com/void-linux/void-packages/pull/39015

New package: vosk-api-0.3.43
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)

Closes https://github.com/void-linux/void-packages/issues/39009


A patch file from https://github.com/void-linux/void-packages/pull/39015.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libvosk-39015.patch --]
[-- Type: text/x-diff, Size: 4204 bytes --]

From 9df768c9fdd3f04276e23e765bed26c0e7a71041 Mon Sep 17 00:00:00 2001
From: John Gebbie <me@johngebbie.com>
Date: Sat, 3 Sep 2022 13:02:48 +0100
Subject: [PATCH] New package: vosk-api-0.3.43

---
 srcpkgs/vosk-api/template      | 79 ++++++++++++++++++++++++++++++++++
 srcpkgs/vosk-model-small-en-us |  1 +
 2 files changed, 80 insertions(+)
 create mode 100644 srcpkgs/vosk-api/template
 create mode 120000 srcpkgs/vosk-model-small-en-us

diff --git a/srcpkgs/vosk-api/template b/srcpkgs/vosk-api/template
new file mode 100644
index 000000000000..99c712e74194
--- /dev/null
+++ b/srcpkgs/vosk-api/template
@@ -0,0 +1,79 @@
+# Template file for 'vosk-api'
+pkgname=vosk-api
+version=0.3.43
+revision=1
+_openblas_ver=0.3.20
+_clapack_ver=3.2.1
+_openfst_commit=7dfd808194105162f20084bb4d8e4ee4b65266d5
+_kaldi_commit=76cd51d44c0a61e3905c35cadb2ec5f54f3e42d1
+build_style="gnu-makefile"
+make_use_env=yes
+make_build_args="-C src KALDI_ROOT=../../kaldi-${_kaldi_commit}
+	OPENFST_ROOT=../../kaldi-${_kaldi_commit}/tools/openfst
+	OPENBLAS_ROOT=../../kaldi-${_kaldi_commit}/tools/OpenBLAS/install"
+hostmakedepends="autoconf automake cmake libtool"
+short_desc="Offline speech recognition toolkit"
+maintainer="John Gebbie <me@johngebbie.com>"
+license="Apache-2.0"
+homepage="https://alphacephei.com/vosk"
+distfiles="https://github.com/alphacep/vosk-api/archive/v$version/vosk-api-$version.tar.gz
+https://github.com/xianyi/OpenBLAS/archive/v${_openblas_ver}/openblas-${_openblas_ver}.tar.gz
+https://github.com/alphacep/clapack/archive/v${_clapack_ver}/clapack-${_clapack_ver}.tar.gz
+https://github.com/alphacep/kaldi/archive/$_kaldi_commit.tar.gz
+https://github.com/alphacep/openfst/archive/$_openfst_commit.tar.gz
+https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip"
+checksum="50fa82bfbfe3fc5be868237c84ac180eb55da0b65b1803bf022899673afda024
+8495c9affc536253648e942908e88e097f2ec7753ede55aca52e5dead3029e3c
+8d8ff8259454cae392bb58bc4971fef1db632c9fb5cdf61255cd495bd6d6ac4d
+4f50b51d0596970b0c1e1356c6a3e791810d1fbc75f2024cd30e818b7b299382
+a7bac90acb9a12fdfe50c240c9bb730a7bcb5c3b3ac32017c4d27177b059680a
+30f26242c4eb449f948e42cb302dd7a686cb29a3423a8367f99ff41780942498"
+
+# I tried using the openblas package (version 0.3.21) but it was incompatible.
+
+pre_build() {
+	cd "$XBPS_BUILDDIR"
+	ln -sf "../../OpenBLAS-${_openblas_ver}" "kaldi-${_kaldi_commit}/tools/OpenBLAS"
+	ln -sf "../../clapack-${_clapack_ver}" "kaldi-${_kaldi_commit}/tools/clapack"
+	ln -sf "../../openfst-${_openfst_commit}" "kaldi-${_kaldi_commit}/tools/openfst"
+	autoreconf -fi "openfst-${_openfst_commit}"
+
+	make -C "OpenBLAS-${_openblas_ver}" ONLY_CBLAS=1 DYNAMIC_ARCH=1 TARGET=NEHALEM USE_LOCKING=1 USE_THREAD=0 all
+	make -C "OpenBLAS-${_openblas_ver}" PREFIX="${XBPS_BUILDDIR}/OpenBLAS-${_openblas_ver}/install" install
+
+	cmake -S "clapack-${_clapack_ver}" -B "build-clapack-${_clapack_ver}"
+	make -C "build-clapack-${_clapack_ver}/F2CLIBS"
+	make -C "build-clapack-${_clapack_ver}/BLAS"
+	make -C "build-clapack-${_clapack_ver}/SRC"
+	find "build-clapack-${_clapack_ver}" -name "*.a" | xargs cp -t "${XBPS_BUILDDIR}/OpenBLAS-${_openblas_ver}/install/lib"
+
+	cd "${XBPS_BUILDDIR}/openfst-${_openfst_commit}"
+	./configure \
+		--prefix="${XBPS_BUILDDIR}/kaldi-${_kaldi_commit}/tools/openfst" \
+		--enable-static \
+		--enable-shared \
+		--enable-far \
+		--enable-ngram-fsts \
+		--enable-lookahead-fsts \
+		--with-pic \
+		--disable-bin
+	make
+	make install
+
+	cd "${XBPS_BUILDDIR}/kaldi-${_kaldi_commit}/src"
+	./configure --mathlib=OPENBLAS_CLAPACK --shared --use-cuda=no
+	make online2 lm rnnlm
+}
+
+do_install() {
+	vinstall src/vosk_api.h 644 usr/include
+	vinstall src/libvosk.so 644 usr/lib
+}
+
+vosk-model-small-en-us_package() {
+	short_desc="Lightweight english language model"
+	pkg_install() {
+		vmkdir usr/share/vosk-models
+		mv "${XBPS_BUILDDIR}/vosk-model-small-en-us-0.15" "${PKGDESTDIR}/usr/share/vosk-models/small-en-us"
+	}
+}
diff --git a/srcpkgs/vosk-model-small-en-us b/srcpkgs/vosk-model-small-en-us
new file mode 120000
index 000000000000..db9953d33676
--- /dev/null
+++ b/srcpkgs/vosk-model-small-en-us
@@ -0,0 +1 @@
+vosk-api
\ No newline at end of file

  parent reply	other threads:[~2022-09-03 20:52 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 21:38 [PR PATCH] New package: libvosk-0.3.43 JohnGebbie
2022-09-02  7:33 ` JohnGebbie
2022-09-02  9:01 ` JohnGebbie
2022-09-02 18:59 ` JohnGebbie
2022-09-03 12:04 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-03 12:11 ` New package: vosk-api-0.3.43 JohnGebbie
2022-09-03 14:11 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-03 14:12 ` JohnGebbie
2022-09-03 14:13 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-03 14:14 ` JohnGebbie
2022-09-03 14:14 ` JohnGebbie
2022-09-03 20:52 ` JohnGebbie [this message]
2022-09-04  8:26 ` JohnGebbie
2022-09-17 13:05 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-17 13:09 ` JohnGebbie
2022-09-18 11:00 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-21 15:53 ` JohnGebbie
2022-09-22  8:53 ` JohnGebbie
2022-09-22  9:26 ` [PR REVIEW] " paper42
2022-09-22  9:26 ` paper42
2022-09-22 14:39 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-22 14:43 ` JohnGebbie
2022-09-22 15:19 ` [PR REVIEW] " JohnGebbie
2022-09-22 18:16 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-22 19:32 ` JohnGebbie
2022-09-22 19:38 ` JohnGebbie
2022-09-22 20:31 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-22 20:33 ` JohnGebbie
2022-09-22 20:50 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-22 20:50 ` JohnGebbie
2022-09-23  8:55 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-23  9:14 ` JohnGebbie
2022-09-23 11:30 ` JohnGebbie
2022-09-23 17:21 ` JohnGebbie
2022-09-23 18:23 ` JohnGebbie
2022-09-26 22:16 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-26 22:18 ` JohnGebbie
2022-09-28 15:44 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-28 15:44 ` JohnGebbie
2022-09-28 15:53 ` JohnGebbie
2022-09-29 20:24 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-29 20:30 ` JohnGebbie
2022-09-30  9:15 ` JohnGebbie
2022-09-30 14:27 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-30 14:27 ` JohnGebbie
2022-09-30 14:30 ` JohnGebbie
2022-09-30 19:14 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-30 19:21 ` JohnGebbie
2022-09-30 19:47 ` JohnGebbie
2022-09-30 19:54 ` [PR PATCH] [Updated] " JohnGebbie
2022-09-30 21:15 ` JohnGebbie
2022-10-01 10:26 ` JohnGebbie
2022-10-02 16:27 ` JohnGebbie
2022-10-03 11:19 ` [PR PATCH] [Updated] " JohnGebbie
2022-10-03 11:21 ` JohnGebbie
2022-10-03 12:39 ` JohnGebbie
2022-10-04 19:17 ` JohnGebbie
2022-10-08 12:13 ` [PR PATCH] [Updated] " JohnGebbie
2022-10-08 12:15 ` JohnGebbie
2022-10-08 12:21 ` JohnGebbie
2022-10-08 14:32 ` [PR PATCH] [Updated] " JohnGebbie
2022-10-08 15:52 ` JohnGebbie
2022-10-08 16:24 ` [PR PATCH] [Updated] " JohnGebbie
2022-10-08 16:25 ` JohnGebbie
2022-10-08 16:33 ` JohnGebbie
2022-10-09 10:37 ` [PR PATCH] [Updated] " JohnGebbie
2022-10-09 10:38 ` JohnGebbie
2022-10-09 10:46 ` JohnGebbie
2022-10-26 15:57 ` JohnGebbie
2022-10-26 15:57 ` JohnGebbie
2022-10-26 15:57 ` JohnGebbie
2022-10-26 15:58 ` JohnGebbie
2022-10-26 15:58 ` JohnGebbie
2022-10-26 15:58 ` JohnGebbie
2022-10-26 15:59 ` JohnGebbie
2022-10-26 15:59 ` JohnGebbie
2022-10-26 15:59 ` JohnGebbie
2022-10-26 16:00 ` JohnGebbie
2022-10-26 16:00 ` JohnGebbie
2022-10-26 16:00 ` JohnGebbie
2022-10-26 16:01 ` JohnGebbie
2022-10-27  9:59 ` [PR PATCH] [Updated] " JohnGebbie
2022-10-27 10:18 ` JohnGebbie
2022-10-27 21:37 ` JohnGebbie
2022-10-28  8:33 ` JohnGebbie
2022-10-28  9:43 ` JohnGebbie
2022-10-28 17:01 ` [PR PATCH] [Updated] " JohnGebbie
2022-10-28 18:49 ` JohnGebbie
2022-10-28 20:15 ` JohnGebbie
2022-10-28 20:45 ` JohnGebbie
2022-10-28 21:42 ` JohnGebbie
2022-10-29  8:41 ` JohnGebbie
2022-10-29 11:45 ` JohnGebbie
2022-10-29 12:07 ` JohnGebbie
2022-10-29 14:09 ` JohnGebbie
2022-11-09 17:33 ` JohnGebbie
2022-11-14 22:54 ` [PR REVIEW] " paper42
2022-11-14 22:54 ` paper42
2022-11-14 22:54 ` paper42
2022-11-14 22:54 ` paper42
2022-11-14 22:54 ` paper42
2022-11-14 22:54 ` paper42
2022-11-14 22:54 ` paper42
2022-11-15 11:04 ` JohnGebbie
2022-11-15 13:38 ` [PR PATCH] [Updated] " JohnGebbie
2022-11-15 14:23 ` [PR REVIEW] " JohnGebbie
2022-11-15 14:24 ` JohnGebbie
2022-11-15 14:44 ` [PR PATCH] [Updated] " JohnGebbie
2022-11-15 14:54 ` [PR REVIEW] " JohnGebbie
2022-12-03 18:32 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-03 18:37 ` JohnGebbie
2022-12-03 18:38 ` [PR REVIEW] " JohnGebbie
2022-12-03 18:43 ` JohnGebbie
2022-12-03 18:44 ` JohnGebbie
2022-12-03 18:47 ` JohnGebbie
2022-12-03 18:48 ` JohnGebbie
2022-12-03 20:52 ` JohnGebbie
2022-12-03 21:22 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-03 21:26 ` JohnGebbie
2022-12-04  8:19 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-04  8:21 ` JohnGebbie
2022-12-04 10:25 ` JohnGebbie
2022-12-04 12:46 ` [PR REVIEW] " paper42
2022-12-04 12:46 ` paper42
2022-12-04 12:46 ` paper42
2022-12-04 12:46 ` paper42
2022-12-04 12:46 ` paper42
2022-12-04 13:52 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-04 13:55 ` [PR REVIEW] " JohnGebbie
2022-12-04 14:04 ` paper42
2022-12-04 14:33 ` [PR PATCH] [Updated] " JohnGebbie
2022-12-04 16:09 ` JohnGebbie
2022-12-04 16:10 ` [PR PATCH] [Merged]: " paper42
2022-12-04 16:11 ` JohnGebbie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220903205227.6PlQS0EvizlofVel0GFxuHvdDOkdrMSs7LxOZTSXy-I@z \
    --to=johngebbie@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).