From patchwork Thu Sep 29 09:02:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 43044 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 237E927BBEA; Thu, 29 Sep 2022 10:09:19 +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 DB2E727BBE9 for ; Thu, 29 Sep 2022 10:09:18 +0100 (BST) Received: from localhost ([::1]:58886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odpXg-00050o-BZ for patchwork@mira.cbaines.net; Thu, 29 Sep 2022 05:09:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odpRe-00008D-Uo for guix-patches@gnu.org; Thu, 29 Sep 2022 05:03:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36883) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odpRe-0004wQ-5b for guix-patches@gnu.org; Thu, 29 Sep 2022 05:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odpRe-00031f-0x for guix-patches@gnu.org; Thu, 29 Sep 2022 05:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58140] [PATCH v4 1/2] gnu: Add nerd-dictation. 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: Thu, 29 Sep 2022 09:03: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.166444213611524 (code B ref 58140); Thu, 29 Sep 2022 09:03:01 +0000 Received: (at 58140) by debbugs.gnu.org; 29 Sep 2022 09:02:16 +0000 Received: from localhost ([127.0.0.1]:35951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odpQt-0002zn-Rz for submit@debbugs.gnu.org; Thu, 29 Sep 2022 05:02:16 -0400 Received: from 5.mo583.mail-out.ovh.net ([87.98.173.103]:52843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odpQr-0002zd-Ba for 58140@debbugs.gnu.org; Thu, 29 Sep 2022 05:02:14 -0400 Received: from player770.ha.ovh.net (unknown [10.110.115.139]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id CDFC320AC7 for <58140@debbugs.gnu.org>; Thu, 29 Sep 2022 09:02:11 +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 player770.ha.ovh.net (Postfix) with ESMTPSA id 08F402F270FDC; Thu, 29 Sep 2022 09:02:09 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-110S0046fa90ab2-ac5e-4203-8f12-9a6f8b15f722, B0E8D5270CD01EFF20DD9E8B4F81152F34611B42) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 Date: Thu, 29 Sep 2022 11:02:02 +0200 Message-Id: <20220929090203.6672-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Ovh-Tracer-Id: 6850819460587774690 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfeehtddguddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepteeffefhfffhjeevleeuvdehgffgveekheeuhfekhfehuefgheffhedugfegleeinecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkpheptddrtddrtddrtddpvddufedrgeegrdduiedurdegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrjeejtddrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeehkedugedtseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeef 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 (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 34b82aa101..f2c9b8dace 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -3602,3 +3602,37 @@ (define-public python-vosk "from .vosk_cffi import ffi, lib") (("_c\\.") "lib."))))))))) + +(define-public nerd-dictation + (let* ((commit "53ab129a5ee0f8b5df284e8cf2229219b732c59e") + (revision "0")) + (package + (name "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 21:30:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 43033 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 4ABBC27BBE9; Wed, 28 Sep 2022 22:32:01 +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 A345A27BBEA for ; Wed, 28 Sep 2022 22:32:00 +0100 (BST) Received: from localhost ([::1]:41416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odeet-00039O-Qc for patchwork@mira.cbaines.net; Wed, 28 Sep 2022 17:31:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odedz-00038S-7A for guix-patches@gnu.org; Wed, 28 Sep 2022 17:31:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odedy-0000jd-SH for guix-patches@gnu.org; Wed, 28 Sep 2022 17:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odedy-0007KW-EX for guix-patches@gnu.org; Wed, 28 Sep 2022 17:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58140] [PATCH 6/6 v2] gnu: Add python-nerd-dictation/wayland. 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 21:31: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 Received: via spool by 58140-submit@debbugs.gnu.org id=B58140.166440061222011 (code B ref 58140); Wed, 28 Sep 2022 21:31:02 +0000 Received: (at 58140) by debbugs.gnu.org; 28 Sep 2022 21:30:12 +0000 Received: from localhost ([127.0.0.1]:35056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odedA-0005i1-0Q for submit@debbugs.gnu.org; Wed, 28 Sep 2022 17:30:12 -0400 Received: from 6.mo584.mail-out.ovh.net ([188.165.36.253]:45723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oded5-0005Kx-Aw for 58140@debbugs.gnu.org; Wed, 28 Sep 2022 17:30:10 -0400 Received: from player693.ha.ovh.net (unknown [10.108.16.222]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 30BD42392D for <58140@debbugs.gnu.org>; Wed, 28 Sep 2022 21:30:04 +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 player693.ha.ovh.net (Postfix) with ESMTPSA id 021E12F10D4F1 for <58140@debbugs.gnu.org>; Wed, 28 Sep 2022 21:30:03 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-105G00628fa5831-cb3f-4f95-8847-bfad89fe074f, 2B1CDF40D044B9F32984F3463F9CE740A2E71E25) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 Date: Wed, 28 Sep 2022 23:30:02 +0200 Message-ID: <87bkqzfaqt.fsf@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13608752174313693710 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfeegkedgudeihecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvufffkfggtgesthdtredttddttdenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeeujeelieeljeffhfelteejtdeljeehveduffelvefgudefkeehgfdvvdevgeevfeenucfkpheptddrtddrtddrtddpvddufedrgeegrdduiedurdegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrieelfedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeehkedugedtseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeeg 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 | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) -- 2.37.3 <#secure method=pgpmime mode=sign> -- Best regards, Nicolas Graves diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 3fec07e6a1..4846a9103e 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,35 @@ (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 +if [ \"$1\" = begin ] + then + exec ~a $@ --input=SOX --simulate-input-tool=YDOTOOL + else + exec ~a $@ +fi" + #$(file-append bash-minimal "/bin/bash") + #$(file-append python-nerd-dictation + "/bin/nerd-dictation") + #$(file-append python-nerd-dictation + "/bin/nerd-dictation")))) + (chmod exe #o555)))))))