From patchwork Wed Sep 28 11:57:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 43016 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0119827BBEB; Wed, 28 Sep 2022 14:38:04 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A0AA127BBEA for ; Wed, 28 Sep 2022 14:38:04 +0100 (BST) Received: from localhost ([::1]:36202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odXGF-0003yo-Pm for patchwork@mira.cbaines.net; Wed, 28 Sep 2022 09:38:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odViQ-0003Ca-6Z for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odViP-0001Mm-Ts for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odViP-0001Gp-PM for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58140] [PATCH 1/6] gnu: Add openfst-for-vosk. References: <875yh7bulf.fsf@ngraves.fr> In-Reply-To: <875yh7bulf.fsf@ngraves.fr> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Sep 2022 11:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58140 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 58140@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 58140-submit@debbugs.gnu.org id=B58140.16643662974764 (code B ref 58140); Wed, 28 Sep 2022 11:59:01 +0000 Received: (at 58140) by debbugs.gnu.org; 28 Sep 2022 11:58:17 +0000 Received: from localhost ([127.0.0.1]:60419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhh-0001Em-Au for submit@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:17 -0400 Received: from 8.mo576.mail-out.ovh.net ([46.105.56.233]:36721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhf-0001Eb-5b for 58140@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:16 -0400 Received: from player788.ha.ovh.net (unknown [10.108.1.239]) by mo576.mail-out.ovh.net (Postfix) with ESMTP id 71C2325E14 for <58140@debbugs.gnu.org>; Wed, 28 Sep 2022 11:58:12 +0000 (UTC) Received: from ngraves.fr (met42-h01-213-44-161-47.dsl.sta.abo.bbox.fr [213.44.161.47]) (Authenticated sender: ngraves@ngraves.fr) by player788.ha.ovh.net (Postfix) with ESMTPSA id 69D0C2F1255FA; Wed, 28 Sep 2022 11:58:10 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-107S001acdb5f6c-1a87-4c3d-babb-b9d58ac420f4, 2B1CDF40D044B9F32984F3463F9CE740A2E71E25) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 Date: Wed, 28 Sep 2022 13:57:50 +0200 Message-Id: <20220928115755.6292-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Ovh-Tracer-Id: 3950501300847502050 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfeegkedggeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdelgeevtdeitdeftddttdevjeeujeefueefleehveejtedvudfhveduheefheejnecuffhomhgrihhnpehophgvnhhfshhtrdhorhhgnecukfhppedtrddtrddtrddtpddvudefrdeggedrudeiuddrgeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehplhgrhigvrhejkeekrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepheekudegtdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheejie X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves X-getmail-retrieved-from-mailbox: Patches * gnu/packages/machine-learning.scm (openfst-for-vosk): New variable. --- gnu/packages/machine-learning.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index e702e499fc..3ad907e0c9 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -583,6 +583,22 @@ (define-public openfst-1.7.3 (arguments '(#:configure-flags '("--enable-ngram-fsts" "CXXFLAGS=-std=c++14") #:make-flags '("CXXFLAGS=-std=c++14"))))) +(define openfst-for-vosk + (package + (inherit openfst) + (version "1.8.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.openfst.org/twiki/pub/FST/" + "FstDownload/openfst-" version ".tar.gz")) + (sha256 + (base32 "0h2lfhhihg63b804hrcljnkggijbjmp84i5g8q735wb09y9z2c4p")))) + (arguments + '(#:configure-flags + '("--enable-shared" "--enable-far" "--enable-ngram-fsts" + "--enable-lookahead-fsts" "--with-pic" "--disable-bin"))))) + (define-public shogun (package (name "shogun") From patchwork Wed Sep 28 11:57:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 43022 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 797AA27BBEA; Wed, 28 Sep 2022 16:16:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5F7BD27BBE9 for ; Wed, 28 Sep 2022 16:16:06 +0100 (BST) Received: from localhost ([::1]:33620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odYn7-0003RY-8T for patchwork@mira.cbaines.net; Wed, 28 Sep 2022 11:16:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odViQ-0003E9-MV for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33124) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odViQ-0001N1-DE for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odViQ-0001Gw-8O for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58140] [PATCH 2/6] gnu: Add kaldi-for-vosk. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Sep 2022 11:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58140 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 58140@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 58140-submit@debbugs.gnu.org id=B58140.16643663034786 (code B ref 58140); Wed, 28 Sep 2022 11:59:02 +0000 Received: (at 58140) by debbugs.gnu.org; 28 Sep 2022 11:58:23 +0000 Received: from localhost ([127.0.0.1]:60422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhm-0001F8-LH for submit@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:23 -0400 Received: from 4.mo575.mail-out.ovh.net ([46.105.59.63]:57251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhi-0001Eu-NG for 58140@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:19 -0400 Received: from player758.ha.ovh.net (unknown [10.108.1.202]) by mo575.mail-out.ovh.net (Postfix) with ESMTP id 097B6255CD for <58140@debbugs.gnu.org>; Wed, 28 Sep 2022 11:58:16 +0000 (UTC) Received: from ngraves.fr (met42-h01-213-44-161-47.dsl.sta.abo.bbox.fr [213.44.161.47]) (Authenticated sender: ngraves@ngraves.fr) by player758.ha.ovh.net (Postfix) with ESMTPSA id 3B76F2F133AF6; Wed, 28 Sep 2022 11:58:15 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-104R005a285ad8d-e66e-4b54-9132-a506f6a5f29d, 2B1CDF40D044B9F32984F3463F9CE740A2E71E25) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 Date: Wed, 28 Sep 2022 13:57:51 +0200 Message-Id: <20220928115755.6292-2-ngraves@ngraves.fr> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220928115755.6292-1-ngraves@ngraves.fr> References: <20220928115755.6292-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 3951908675544212194 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfeegkedggeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdehleeiffehtedvlefhffffjeefgfduhfetkeevheeiteduiedugfekuedtheejnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkpheptddrtddrtddrtddpvddufedrgeegrdduiedurdegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrjeehkedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeehkedugedtseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehjeeh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves X-getmail-retrieved-from-mailbox: Patches * gnu/packages/machine-learning.scm (kaldi-for-vosk): New variable. --- gnu/packages/machine-learning.scm | 98 +++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 3ad907e0c9..9b2e01c102 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1596,6 +1596,104 @@ (define-public kaldi written in C++.") (license license:asl2.0)))) +(define kaldi-for-vosk + (let* ((commit "6417ac1dece94783e80dfbac0148604685d27579") + (revision "0") + (openfst openfst-for-vosk)) + (package + (inherit kaldi) + (name "kaldi") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/alphacep/kaldi") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "04xw2dpfvpla8skpk08azmgr9k97cd8hn83lj4l85q165gbzql4s")))) + (inputs + (list alsa-lib + ;; `(,gfortran "lib") ;; replaced by lapack + lapack + glib + gstreamer + jack-1 + openblas + openfst + portaudio + python)) + (arguments + (list + #:test-target "test" + #:make-flags ''("online2" "lm" "rnnlm") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "src") #t)) + (replace 'configure + (lambda* (#:key build system inputs outputs #:allow-other-keys) + (when (not (or (string-prefix? "x86_64" system) + (string-prefix? "i686" system))) + (substitute* "makefiles/linux_openblas.mk" + (("-msse -msse2") ""))) + (substitute* "makefiles/default_rules.mk" + (("/bin/bash") (which "bash"))) + (substitute* "Makefile" + (("ext_depend: check_portaudio") + "ext_depend:")) + (substitute* '("online/Makefile" + "onlinebin/Makefile" + "gst-plugin/Makefile") + (("../../tools/portaudio/install") + (assoc-ref inputs "portaudio"))) + (substitute* "matrix/Makefile" ;temporary test bypass + (("matrix-lib-test sparse-matrix-test") "")) + + ;; This `configure' script doesn't support variables passed as + ;; arguments, nor does it support "prefix". + (let ((out (assoc-ref outputs "out"))) + (substitute* "configure" + (("check_for_slow_expf;") "") + ;; This affects the RPATH and also serves as the installation + ;; directory. + (("KALDILIBDIR=`pwd`/lib") + (string-append "KALDILIBDIR=" out "/lib")) + (("OPENBLASROOT=\\\"\\$\\(rel2abs ..\\/tools\\/OpenBLAS\\/install\\)\\\"") + (string-append "OPENBLASROOT=\"" #$openblas "\"")) + (("-L\\$OPENBLASLIBDIR -l:libopenblas.a -l:libblas.a -l:liblapack.a -l:libf2c.a") + (string-append "-L$OPENBLASLIBDIR -lopenblas " + "-L" #$lapack "/lib -lblas -llapack"))) + (mkdir-p out) ; must exist + (setenv "CONFIG_SHELL" (which "bash")) + (setenv "OPENFST_VER" #$(package-version openfst)) + (invoke "./configure" + "--use-cuda=no" + "--mathlib=OPENBLAS_CLAPACK" + "--shared" + (string-append "--fst-root=" #$openfst))))) + (add-after 'configure 'optimize-build + (lambda _ (substitute* "kaldi.mk" ((" -O1") " -O3")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (inc (string-append out "/include")) + (lib (string-append out "/lib"))) + (mkdir-p lib) + ;; The build phase installed symlinks to the actual + ;; libraries. Install the actual targets. + (for-each (lambda (file) + (let ((target (readlink file))) + (delete-file file) + (install-file target lib))) + (find-files lib "\\.so")) + ;; Install headers + (for-each (lambda (file) + (let ((target-dir (string-append inc "/" (dirname file)))) + (install-file file target-dir))) + (find-files "." "\\.h"))))))))))) + (define-public gst-kaldi-nnet2-online (let ((commit "cb227ef43b66a9835c14eb0ad39e08ee03c210ad") (revision "2")) From patchwork Wed Sep 28 11:57:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 43018 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4EDCA27BBEA; Wed, 28 Sep 2022 14:42:35 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B778627BBE9 for ; Wed, 28 Sep 2022 14:42:34 +0100 (BST) Received: from localhost ([::1]:36886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odXKa-0008J9-JI for patchwork@mira.cbaines.net; Wed, 28 Sep 2022 09:42:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odViS-0003Ir-H4 for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33126) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odViS-0001ND-8n for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odViR-0001HB-3h for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58140] [PATCH 3/6] gnu: Add vosk-api. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Sep 2022 11:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58140 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 58140@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 58140-submit@debbugs.gnu.org id=B58140.16643663134834 (code B ref 58140); Wed, 28 Sep 2022 11:59:03 +0000 Received: (at 58140) by debbugs.gnu.org; 28 Sep 2022 11:58:33 +0000 Received: from localhost ([127.0.0.1]:60430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhw-0001Ft-G6 for submit@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:32 -0400 Received: from 10.mo584.mail-out.ovh.net ([188.165.33.109]:57183) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhn-0001F5-DS for 58140@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:25 -0400 Received: from player787.ha.ovh.net (unknown [10.108.4.215]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 4CE8D2566F for <58140@debbugs.gnu.org>; Wed, 28 Sep 2022 11:58:21 +0000 (UTC) Received: from ngraves.fr (met42-h01-213-44-161-47.dsl.sta.abo.bbox.fr [213.44.161.47]) (Authenticated sender: ngraves@ngraves.fr) by player787.ha.ovh.net (Postfix) with ESMTPSA id 9CBBA2F48C4C3; Wed, 28 Sep 2022 11:58:18 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-98R002f85f79f6-ff41-4f62-a1e3-8af5360bf812, 2B1CDF40D044B9F32984F3463F9CE740A2E71E25) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 Date: Wed, 28 Sep 2022 13:57:52 +0200 Message-Id: <20220928115755.6292-3-ngraves@ngraves.fr> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220928115755.6292-1-ngraves@ngraves.fr> References: <20220928115755.6292-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 3953034575818515170 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfeegkedggeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepudeivdeggeduudehheevjeeufffgueffkeelvdevffdvjefgueekkefhjeejiefhnecuffhomhgrihhnpehgihhthhhusgdrtghomhdprghlphhhrggtvghphhgvihdrtghomhenucfkpheptddrtddrtddrtddpvddufedrgeegrdduiedurdegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrjeekjedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeehkedugedtseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeeg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves X-getmail-retrieved-from-mailbox: Patches * gnu/packages/machine-learning.scm (vosk-api): New variable. --- gnu/packages/machine-learning.scm | 74 +++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 9b2e01c102..df91a3a2ac 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -3485,3 +3485,77 @@ (define-public python-pyro-ppl "This package provides a Python library for probabilistic modeling and inference.") (license license:asl2.0))) + +(define-public vosk-api + (let* ((openfst openfst-for-vosk) + (kaldi kaldi-for-vosk)) + (package + (name "vosk-api") + (version "0.3.43") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/alphacep/vosk-api") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0xmp8i140c2hd3rj9dap8a2rnsvzb1k9hnqm12xzbaxrw73rkc29")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "src") #t)) + (replace 'configure + (lambda _ + (substitute* "./Makefile" + (("USE_SHARED\\?=0") + "USE_SHARED?=1") + (("-DFST_NO_DYNAMIC_LINKING") + "") + (("-lopenblas -llapack -lblas -lf2c") + (string-append + "-L" #$openblas "/lib " "-lopenblas " + "-L" #$lapack "/lib " "-llapack -lblas ")) + (("-lfst -lfstngram") + (string-append + "-L" #$openfst "/lib " "-lfst -lfstngram ")) + (("\\$\\(HOME\\)\\/travis\\/kaldi") + #$(file-append kaldi "/include")) + (("\\$\\(KALDI_ROOT\\)\\/tools\\/openfst") + #$openfst) + (("\\$\\(KALDI_ROOT\\)\\/tools\\/OpenBLAS\\/install") + #$openblas) + (("\\$\\(KALDI_ROOT\\)\\/libs") + #$(file-append kaldi "/lib"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (src (string-append out "/src"))) + (mkdir-p lib) + (mkdir-p src) + (install-file "libvosk.so" lib) + (for-each + (lambda (x) (install-file x src)) + (find-files "." "\\.h$")))))))) + (inputs (list kaldi openfst lapack openblas)) + (home-page "https://alphacephei.com/vosk") + (synopsis "Speech recognition toolkit based on @code{kaldi}") + (description "\ +This package provides a speech recognition toolkit based on @code{kaldi}. It +supports more than 20 languages and dialects - English, Indian English, +German, French, Spanish, Portuguese, Chinese, Russian, Turkish, Vietnamese, +Italian, Dutch, Catalan, Arabic, Greek, Farsi, Filipino, Ukrainian, Kazakh, +Swedish, Japanese, Esperanto, Hindi, Czech, Polish. The program works offline, +even on lightweight devices. Portable per-language models are about 50Mb each, +and there are much bigger and precise models available. + +Vosk API provides a streaming API allowing to use it `on-the-fly' and bindings +for different programming languages. It allows quick reconfiguration of +vocabulary for better accuracy, and supports speaker identification beside +simple speech recognition.") + (license license:asl2.0)))) From patchwork Wed Sep 28 11:57:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 43013 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C006527BBEA; Wed, 28 Sep 2022 13:32:41 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6A52E27BBE9 for ; Wed, 28 Sep 2022 13:32:41 +0100 (BST) Received: from localhost ([::1]:46546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odWEy-00050A-FR for patchwork@mira.cbaines.net; Wed, 28 Sep 2022 08:32:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odViR-0003G3-5p for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odViQ-0001N8-T2 for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odViQ-0001H4-OA for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58140] [PATCH 4/6] gnu: Add python-vosk. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Sep 2022 11:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58140 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 58140@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 58140-submit@debbugs.gnu.org id=B58140.16643663064808 (code B ref 58140); Wed, 28 Sep 2022 11:59:02 +0000 Received: (at 58140) by debbugs.gnu.org; 28 Sep 2022 11:58:26 +0000 Received: from localhost ([127.0.0.1]:60426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhq-0001FU-3l for submit@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:26 -0400 Received: from 1.mo582.mail-out.ovh.net ([46.105.56.136]:56579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVho-0001FG-Pc for 58140@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:25 -0400 Received: from player760.ha.ovh.net (unknown [10.108.20.204]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id A89B8255CF for <58140@debbugs.gnu.org>; Wed, 28 Sep 2022 11:58:23 +0000 (UTC) Received: from ngraves.fr (met42-h01-213-44-161-47.dsl.sta.abo.bbox.fr [213.44.161.47]) (Authenticated sender: ngraves@ngraves.fr) by player760.ha.ovh.net (Postfix) with ESMTPSA id EF1AD2F15032F; Wed, 28 Sep 2022 11:58:21 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-100R0035436a0d4-7230-4f12-b850-49cd4a525d85, 2B1CDF40D044B9F32984F3463F9CE740A2E71E25) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 Date: Wed, 28 Sep 2022 13:57:53 +0200 Message-Id: <20220928115755.6292-4-ngraves@ngraves.fr> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220928115755.6292-1-ngraves@ngraves.fr> References: <20220928115755.6292-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 3953879001560965858 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfeegkedggeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppedtrddtrddtrddtpddvudefrdeggedrudeiuddrgeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehplhgrhigvrhejiedtrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepheekudegtdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekvd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves X-getmail-retrieved-from-mailbox: Patches * gnu/packages/machine-learning.scm (python-vosk): New variable. --- gnu/packages/machine-learning.scm | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index df91a3a2ac..cbbc80db1c 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -3559,3 +3559,43 @@ (define-public vosk-api vocabulary for better accuracy, and supports speaker identification beside simple speech recognition.") (license license:asl2.0)))) + +(define-public python-vosk + (package + (inherit vosk-api) + (name "python-vosk") + (build-system python-build-system) + (propagated-inputs + (list python-cffi python-requests python-tqdm python-srt python-websockets)) + (inputs (list vosk-api)) + (arguments + (list + #:tests? #f ;; TODO There are tests but not run through Makefile. + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'config + (lambda _ + (chdir "python") + (setenv "VOSK_SOURCE" #$vosk-api))) + (add-before 'build 'from-abi-to-api + (lambda _ + (substitute* "vosk_builder.py" + (("ffibuilder\\.set_source\\(\"vosk.vosk_cffi\", None\\)") + (string-append + "ffibuilder.set_source(\"vosk.vosk_cffi\", " + "r\"\"\"\n#include\n#include\"\"\",\n\t" + "library_dirs=[" + "'" #$vosk-api "/lib'" + "],\n\t" + "libraries=['vosk', 'python3.9'],\n\t" + "include_dirs=[" + "'" #$vosk-api "/src'" "])"))) + (substitute* "vosk/__init__.py" + (("_c = open_dll\\(\\)") + "") + (("_ffi") + "ffi") + (("from \\.vosk_cffi import ffi as ffi") + "from .vosk_cffi import ffi, lib") + (("_c\\.") + "lib."))))))))) From patchwork Wed Sep 28 11:57:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 43017 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 771F027BBEA; Wed, 28 Sep 2022 14:38:57 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3AEE627BBE9 for ; Wed, 28 Sep 2022 14:38:57 +0100 (BST) Received: from localhost ([::1]:36574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odXH6-0004Rs-Bf for patchwork@mira.cbaines.net; Wed, 28 Sep 2022 09:38:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odViR-0003HC-SS for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odViR-0001NG-Jj for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odViR-0001HI-Ff for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58140] [PATCH 5/6] gnu: Add python-nerd-dictation. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Sep 2022 11:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58140 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 58140@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 58140-submit@debbugs.gnu.org id=B58140.16643663134841 (code B ref 58140); Wed, 28 Sep 2022 11:59:03 +0000 Received: (at 58140) by debbugs.gnu.org; 28 Sep 2022 11:58:33 +0000 Received: from localhost ([127.0.0.1]:60432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhw-0001Fw-VE for submit@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:33 -0400 Received: from 14.mo583.mail-out.ovh.net ([188.165.51.82]:41949) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhs-0001Fc-HS for 58140@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:29 -0400 Received: from player691.ha.ovh.net (unknown [10.108.1.93]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id 0163B25786 for <58140@debbugs.gnu.org>; Wed, 28 Sep 2022 11:58:26 +0000 (UTC) Received: from ngraves.fr (met42-h01-213-44-161-47.dsl.sta.abo.bbox.fr [213.44.161.47]) (Authenticated sender: ngraves@ngraves.fr) by player691.ha.ovh.net (Postfix) with ESMTPSA id 2872F2F280004; Wed, 28 Sep 2022 11:58:25 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-102R004b180b25b-489b-4478-957a-48c20fb11214, 2B1CDF40D044B9F32984F3463F9CE740A2E71E25) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 Date: Wed, 28 Sep 2022 13:57:54 +0200 Message-Id: <20220928115755.6292-5-ngraves@ngraves.fr> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220928115755.6292-1-ngraves@ngraves.fr> References: <20220928115755.6292-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 3954723424091235042 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfeegkedggeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdehleeiffehtedvlefhffffjeefgfduhfetkeevheeiteduiedugfekuedtheejnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkpheptddrtddrtddrtddpvddufedrgeegrdduiedurdegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrieeluddrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeehkedugedtseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeef X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves X-getmail-retrieved-from-mailbox: Patches * gnu/packages/machine-learning.scm (python-nerd-dictation): New variable. --- gnu/packages/machine-learning.scm | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index cbbc80db1c..3fec07e6a1 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -3599,3 +3599,37 @@ (define-public python-vosk "from .vosk_cffi import ffi, lib") (("_c\\.") "lib."))))))))) + +(define-public python-nerd-dictation + (let* ((commit "53ab129a5ee0f8b5df284e8cf2229219b732c59e") + (revision "0")) + (package + (name "python-nerd-dictation") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ideasman42/nerd-dictation") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "184qijiva1h1x00dzicik0yzgh78pq2lqr5fkgicgp26mkarlyhc")))) + (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "package/python")))))) + (propagated-inputs (list python-vosk)) + (inputs (list pulseaudio xdotool)) + (home-page "https://github.com/ideasman42/nerd-dictation") + (synopsis "Offline speech-to-text for desktop Linux") + (description "\ +This package provides simple access speech to text for using in +Linux without being tied to a desktop environment, using the @code{vosk-api}. +The user configuration lets you manipulate text using Python string +operations. It has zero overhead, as this relies on manual activation and +there are no background processes. Dictation is accessed manually with +@code{nerd-dictation begin} and @code{nerd-dictation end} commands.") + (license license:gpl3+)))) From patchwork Wed Sep 28 11:57:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 43023 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0ABC627BBEA; Wed, 28 Sep 2022 16:17:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C654527BBE9 for ; Wed, 28 Sep 2022 16:17:20 +0100 (BST) Received: from localhost ([::1]:34994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odYoJ-00047X-Us for patchwork@mira.cbaines.net; Wed, 28 Sep 2022 11:17:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odViS-0003IM-Bx for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odViS-0001NM-34 for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odViR-0001HQ-VC for guix-patches@gnu.org; Wed, 28 Sep 2022 07:59:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58140] [PATCH 6/6] gnu: Add python-nerd-dictation/wayland. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Sep 2022 11:59:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58140 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 58140@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 58140-submit@debbugs.gnu.org id=B58140.16643663134848 (code B ref 58140); Wed, 28 Sep 2022 11:59:03 +0000 Received: (at 58140) by debbugs.gnu.org; 28 Sep 2022 11:58:33 +0000 Received: from localhost ([127.0.0.1]:60434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhx-0001G2-9B for submit@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:33 -0400 Received: from 17.mo582.mail-out.ovh.net ([46.105.36.150]:48597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odVhu-0001Fk-Ql for 58140@debbugs.gnu.org; Wed, 28 Sep 2022 07:58:31 -0400 Received: from player699.ha.ovh.net (unknown [10.110.171.173]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id C505225730 for <58140@debbugs.gnu.org>; Wed, 28 Sep 2022 11:58:29 +0000 (UTC) Received: from ngraves.fr (met42-h01-213-44-161-47.dsl.sta.abo.bbox.fr [213.44.161.47]) (Authenticated sender: ngraves@ngraves.fr) by player699.ha.ovh.net (Postfix) with ESMTPSA id 3AD1B2EFBC320; Wed, 28 Sep 2022 11:58:28 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-105G0063fca2208-48f8-4917-b453-37a1e4ac4652, 2B1CDF40D044B9F32984F3463F9CE740A2E71E25) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 Date: Wed, 28 Sep 2022 13:57:55 +0200 Message-Id: <20220928115755.6292-6-ngraves@ngraves.fr> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220928115755.6292-1-ngraves@ngraves.fr> References: <20220928115755.6292-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 3955567848602329826 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfeegkedggeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppedtrddtrddtrddtpddvudefrdeggedrudeiuddrgeejnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehplhgrhigvrheileelrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepheekudegtdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekvd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves X-getmail-retrieved-from-mailbox: Patches * gnu/packages/machine-learning.scm (python-nerd-dictation/wayland): New variable. --- gnu/packages/machine-learning.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 3fec07e6a1..12c5586aa8 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -45,6 +45,7 @@ (define-module (gnu packages machine-learning) #:use-module (guix build-system ocaml) #:use-module (guix build-system python) #:use-module (guix build-system r) + #:use-module (guix build-system trivial) #:use-module (guix git-download) #:use-module (gnu packages) #:use-module (gnu packages adns) @@ -103,6 +104,7 @@ (define-module (gnu packages machine-learning) #:use-module (gnu packages video) #:use-module (gnu packages web) #:use-module (gnu packages xml) + #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) #:use-module (ice-9 match)) @@ -3633,3 +3635,28 @@ (define-public python-nerd-dictation there are no background processes. Dictation is accessed manually with @code{nerd-dictation begin} and @code{nerd-dictation end} commands.") (license license:gpl3+)))) + +(define-public python-nerd-dictation/wayland + (package + (inherit python-nerd-dictation) + (name "python-nerd-dictation-wayland") + (inputs (list bash-minimal python-nerd-dictation sox ydotool)) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let* ((out (assoc-ref %outputs "out")) + (exe (string-append out "/bin/nerd-dictation"))) + + (mkdir-p (dirname exe)) + (call-with-output-file exe + (lambda (port) + (format port "#!~a +exec ~a $@ --input=SOX --simulate-input-tool=YDOTOOL" + #$(file-append bash-minimal "/bin/bash") + #$(file-append python-nerd-dictation + "/bin/nerd-dictation")))) + (chmod exe #o555)))))))