GNU bug report logs - #39721
[WIP PATCH] Parlatype

Previous Next

Package: guix-patches;

Reported by: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Date: Fri, 21 Feb 2020 18:46:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39721 in the body.
You can then email your comments to 39721 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#39721; Package guix-patches. (Fri, 21 Feb 2020 18:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 21 Feb 2020 18:46:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: guix-patches <at> gnu.org
Subject: [WIP PATCH] Parlatype
Date: Fri, 21 Feb 2020 19:44:55 +0100
[Message part 1 (text/plain, inline)]
Hello,

I've been sitting on this patch for a few months now, but I'm stuck at
this point. 

So, this package is about Parlatype. It compiles fine, but doesn't
start, complaining about a missing Gstreamer dependency. As one can tell
from the FIXME, I attempted to fix it without much success. I think
fresh eyes are required.

Thank you for any love you'll give to that package.

Regards,

-- 
Nicolas Goaziou
[0001-gnu-Add-parlatype.patch (text/x-diff, inline)]
From 5ac3fda0fcc7ce24d6f0ce023f2ba3919c4100b2 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Fri, 21 Feb 2020 09:40:03 +0100
Subject: [PATCH] gnu: Add parlatype.

* gnu/packages/speech.scm (sphinxbase, pocketsphinx, parlatype): New variables.
---
 gnu/packages/speech.scm | 121 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 121 insertions(+)

diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index 21ad6f8928..44d3e3948d 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -28,18 +28,28 @@
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #:use-module (gnu packages)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages emacs)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gstreamer)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages textutils))
 
@@ -461,3 +471,114 @@ The system is written in C++ and uses the Edinburgh Speech Tools Library for
 low level architecture and has a Scheme (SIOD) based command interpreter for
 control.")
     (license (license:non-copyleft "file://COPYING"))))
+
+(define-public sphinxbase
+  (package
+    (name "sphinxbase")
+    (version "5prealpha")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/cmusphinx/"
+                           "sphinxbase/" version "/"
+                           "sphinxbase-" version ".tar.gz"))
+       (sha256
+        (base32 "0vr4k8pv5a8nvq9yja7kl13b5lh0f9vha8fc8znqnm8bwmcxnazp"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:parallel-tests? #f))           ;tests fail otherwise
+    (native-inputs
+     `(("bison" ,bison)
+       ("doxygen" ,doxygen)
+       ("perl" ,perl)                   ;for tests
+       ("python" ,python)))
+    (inputs
+     `(("pulseaudio" ,pulseaudio)
+       ("swig" ,swig)))
+    (home-page "https://cmusphinx.github.io/")
+    (synopsis "Support library required by Pocketsphinx and Sphinxtrain")
+    (description "This package contains the basic libraries shared by
+the CMU Sphinx trainer and all the Sphinx decoders (Sphinx-II,
+Sphinx-III, and PocketSphinx), as well as some common utilities for
+manipulating acoustic feature and audio files.")
+    (license license:bsd-4)))
+
+(define-public pocketsphinx
+  (package
+    (name "pocketsphinx")
+    (version "5prealpha")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/cmusphinx/"
+                           "pocketsphinx/" version "/"
+                           "pocketsphinx-" version ".tar.gz"))
+       (sha256
+        (base32 "1n9yazzdgvpqgnfzsbl96ch9cirayh74jmpjf7svs4i7grabanzg"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("perl" ,perl)                   ;for tests
+       ("python" ,python)))
+    (inputs
+     `(("gstreamer" ,gstreamer)
+       ("libcap" ,libcap)
+       ("pulseaudio" ,pulseaudio)
+       ("sphinxbase" ,sphinxbase)
+       ("swig" ,swig)))
+    (home-page "https://cmusphinx.github.io/")
+    (synopsis "Recognizer library written in C")
+    (description "PocketSphinx is one of Carnegie Mellon University's
+large vocabulary, speaker-independent continuous speech recognition
+engine.")
+    (license license:bsd-2)))
+
+(define-public parlatype
+  (package
+    (name "parlatype")
+    (version "1.6.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/gkarsay/parlatype.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1nbn939cramizbyp2s57hmlb3hpr02i0az2f1z570mjc7jqgd8g8"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:tests? #f                      ;require internet access
+       #:configure-flags (list "-Dlibreoffice=false")
+       #:phases
+       (modify-phases %standard-phases
+         ;; FIXME: The following doesn't work; at runtime, parlatype
+         ;; executable cannot find gstreamer good plugin (playbin).
+         (add-after 'install 'wrap-parlatype
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
+               (wrap-program (string-append out "/bin/parlatype")
+                 `("GST_PLUGIN_SYSTEM_PATH" ":" = (,gst-plugin-path))))
+             #t)))))
+    (native-inputs
+     `(("appstream-glib" ,appstream-glib)
+       ("desktop-file-utils" ,desktop-file-utils) ;for desktop-file-validate
+       ("gettext" ,gettext-minimal)
+       ("glib" ,glib "bin")             ;for glib-compile-resources
+       ("pkg-config" ,pkg-config)
+       ("yelp-tools" ,yelp-tools)))
+    (inputs
+     `(("gst-plugins-base" ,gst-plugins-base)
+       ("gst-plugins-good" ,gst-plugins-good)
+       ("gstreamer" ,gstreamer)
+       ("gtk+" ,gtk+)
+       ("pocketsphinx" ,pocketsphinx)
+       ("pulseaudio" ,pulseaudio)
+       ("sphinxbase" ,sphinxbase)))
+    (home-page "http://gkarsay.github.io/parlatype/")
+    (synopsis "GNOME audio player for transcription")
+    (description "Parlatype is an audio player for the GNOME desktop
+environment.  Its main purpose is the manual transcription of spoken
+audio files.")
+    (license license:gpl3+)))
-- 
2.25.0


Information forwarded to guix-patches <at> gnu.org:
bug#39721; Package guix-patches. (Fri, 20 Mar 2020 09:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 39721 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: 39721 <at> debbugs.gnu.org
Subject: Re: [bug#39721] [WIP PATCH] Parlatype (v2)
Date: Fri, 20 Mar 2020 10:56:51 +0100
[Message part 1 (text/plain, inline)]
Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes:

> I've been sitting on this patch for a few months now, but I'm stuck at
> this point. 
>
> So, this package is about Parlatype. It compiles fine, but doesn't
> start, complaining about a missing Gstreamer dependency. As one can tell
> from the FIXME, I attempted to fix it without much success. I think
> fresh eyes are required.

Gentle bump.

I'm sending a rebased version of the patch.

The executable complains that "parlasphinx" plugin is missing from the
good gstreamer plugins. Yet, "libgstparlasphinx.so" is correctly
installed in "$out/lib/gstreamer-1.0/".

Any clue ?

Thanks!

[0001-gnu-Add-parlatype.patch (text/x-diff, inline)]
From f9bb2ed8fa47fae8d5b154fdd8cdf6d9176a26f0 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Fri, 21 Feb 2020 09:40:03 +0100
Subject: [PATCH] gnu: Add parlatype.

* gnu/packages/speech.scm (sphinxbase, pocketsphinx, parlatype): New variables.
---
 gnu/packages/speech.scm | 121 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 121 insertions(+)

diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index 5fdf2cdbd8..1fbdd5d501 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -28,19 +28,29 @@
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #:use-module (gnu packages)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)            ;for 'which'
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages emacs)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gstreamer)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages textutils))
 
@@ -471,3 +481,114 @@ The system is written in C++ and uses the Edinburgh Speech Tools Library for
 low level architecture and has a Scheme (SIOD) based command interpreter for
 control.")
     (license (license:non-copyleft "file://COPYING"))))
+
+(define-public sphinxbase
+  (package
+    (name "sphinxbase")
+    (version "5prealpha")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/cmusphinx/"
+                           "sphinxbase/" version "/"
+                           "sphinxbase-" version ".tar.gz"))
+       (sha256
+        (base32 "0vr4k8pv5a8nvq9yja7kl13b5lh0f9vha8fc8znqnm8bwmcxnazp"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:parallel-tests? #f))           ;tests fail otherwise
+    (native-inputs
+     `(("bison" ,bison)
+       ("doxygen" ,doxygen)
+       ("perl" ,perl)                   ;for tests
+       ("python" ,python)))
+    (inputs
+     `(("pulseaudio" ,pulseaudio)
+       ("swig" ,swig)))
+    (home-page "https://cmusphinx.github.io/")
+    (synopsis "Support library required by Pocketsphinx and Sphinxtrain")
+    (description "This package contains the basic libraries shared by
+the CMU Sphinx trainer and all the Sphinx decoders (Sphinx-II,
+Sphinx-III, and PocketSphinx), as well as some common utilities for
+manipulating acoustic feature and audio files.")
+    (license license:bsd-4)))
+
+(define-public pocketsphinx
+  (package
+    (name "pocketsphinx")
+    (version "5prealpha")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/cmusphinx/"
+                           "pocketsphinx/" version "/"
+                           "pocketsphinx-" version ".tar.gz"))
+       (sha256
+        (base32 "1n9yazzdgvpqgnfzsbl96ch9cirayh74jmpjf7svs4i7grabanzg"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("perl" ,perl)                   ;for tests
+       ("python" ,python)))
+    (inputs
+     `(("gstreamer" ,gstreamer)
+       ("libcap" ,libcap)
+       ("pulseaudio" ,pulseaudio)
+       ("sphinxbase" ,sphinxbase)
+       ("swig" ,swig)))
+    (home-page "https://cmusphinx.github.io/")
+    (synopsis "Recognizer library written in C")
+    (description "PocketSphinx is one of Carnegie Mellon University's
+large vocabulary, speaker-independent continuous speech recognition
+engine.")
+    (license license:bsd-2)))
+
+(define-public parlatype
+  (package
+    (name "parlatype")
+    (version "1.6.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/gkarsay/parlatype.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1nbn939cramizbyp2s57hmlb3hpr02i0az2f1z570mjc7jqgd8g8"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:tests? #f                      ;require internet access
+       #:configure-flags (list "-Dlibreoffice=false")
+       #:phases
+       (modify-phases %standard-phases
+         ;; FIXME: The following doesn't work; at runtime, parlatype cannot
+         ;; find gstreamer good plugin (parlasphinx).
+         (add-after 'install 'wrap-parlatype
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
+               (wrap-program (string-append out "/bin/parlatype")
+                 `("GST_PLUGIN_SYSTEM_PATH" ":" = (,gst-plugin-path))))
+             #t)))))
+    (native-inputs
+     `(("appstream-glib" ,appstream-glib)
+       ("desktop-file-utils" ,desktop-file-utils) ;for desktop-file-validate
+       ("gettext" ,gettext-minimal)
+       ("glib" ,glib "bin")             ;for glib-compile-resources
+       ("pkg-config" ,pkg-config)
+       ("yelp-tools" ,yelp-tools)))
+    (inputs
+     `(("gst-plugins-base" ,gst-plugins-base)
+       ("gst-plugins-good" ,gst-plugins-good)
+       ("gstreamer" ,gstreamer)
+       ("gtk+" ,gtk+)
+       ("pocketsphinx" ,pocketsphinx)
+       ("pulseaudio" ,pulseaudio)
+       ("sphinxbase" ,sphinxbase)))
+    (home-page "http://gkarsay.github.io/parlatype/")
+    (synopsis "GNOME audio player for transcription")
+    (description "Parlatype is an audio player for the GNOME desktop
+environment.  Its main purpose is the manual transcription of spoken
+audio files.")
+    (license license:gpl3+)))
-- 
2.25.1


Information forwarded to guix-patches <at> gnu.org:
bug#39721; Package guix-patches. (Fri, 20 Mar 2020 16:35:02 GMT) Full text and rfc822 format available.

Message #11 received at 39721 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>, 39721 <at> debbugs.gnu.org
Subject: Re: [bug#39721] [WIP PATCH] Parlatype (v2)
Date: Fri, 20 Mar 2020 17:34:17 +0100
[Message part 1 (text/plain, inline)]
Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes:

> Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes:
>
>> I've been sitting on this patch for a few months now, but I'm stuck at
>> this point. 
>>
>> So, this package is about Parlatype. It compiles fine, but doesn't
>> start, complaining about a missing Gstreamer dependency. As one can tell
>> from the FIXME, I attempted to fix it without much success. I think
>> fresh eyes are required.
>
> Gentle bump.
>
> I'm sending a rebased version of the patch.
>
> The executable complains that "parlasphinx" plugin is missing from the
> good gstreamer plugins. Yet, "libgstparlasphinx.so" is correctly
> installed in "$out/lib/gstreamer-1.0/".
>
> Any clue ?

Maybe you need to add $out/lib/gstreamer-1.0 to the wrapped
GST_PLUGIN_SYSTEM_PATH variable.  Currently it will only get wrapped
with the gstreamer plugins added as inputs, and not itself, IIUC.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39721; Package guix-patches. (Sat, 21 Mar 2020 16:35:01 GMT) Full text and rfc822 format available.

Message #14 received at 39721 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 39721 <at> debbugs.gnu.org
Subject: [bug#39721] [PATCH] Parlatype (v3) (was: Re: [WIP PATCH] Parlatype
 (v2))
Date: Sat, 21 Mar 2020 17:34:17 +0100
[Message part 1 (text/plain, inline)]
Hello,

Marius Bakke <mbakke <at> fastmail.com> writes:

> Maybe you need to add $out/lib/gstreamer-1.0 to the wrapped
> GST_PLUGIN_SYSTEM_PATH variable.  Currently it will only get wrapped
> with the gstreamer plugins added as inputs, and not itself, IIUC.

That was it. Thank you!

Here are the patches, now for real submission.

I'm not sure about the location for parlatype. I added it to
"speech.scm" because it is mainly used for audio transcription, but it
can read any audio file. It has apparently some video support, too, but
I didn't try (and it may be missing some plugins).

Regards,

-- 
Nicolas Goaziou
[0001-gnu-Add-sphinxbase.patch (text/x-diff, inline)]
From 3e0151bbc9ad3171371142c9b793f48cc7583979 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Sat, 21 Mar 2020 14:17:52 +0100
Subject: [PATCH 1/3] gnu: Add sphinxbase.

* gnu/packages/speech.scm (sphinxbase): New variable.
---
 gnu/packages/speech.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index 5fdf2cdbd8..41010cb1dc 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2016 Kei Kebreau <kkebreau <at> posteo.net>
 ;;; Copyright © 2019 Ricardo Wurmus <rekado <at> elephly.net>
+;;; Copyright © 2020 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,15 +33,19 @@
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)            ;for 'which'
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages textutils))
 
@@ -471,3 +476,34 @@ The system is written in C++ and uses the Edinburgh Speech Tools Library for
 low level architecture and has a Scheme (SIOD) based command interpreter for
 control.")
     (license (license:non-copyleft "file://COPYING"))))
+
+(define-public sphinxbase
+  (package
+    (name "sphinxbase")
+    (version "5prealpha")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/cmusphinx/"
+                           "sphinxbase/" version "/"
+                           "sphinxbase-" version ".tar.gz"))
+       (sha256
+        (base32 "0vr4k8pv5a8nvq9yja7kl13b5lh0f9vha8fc8znqnm8bwmcxnazp"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:parallel-tests? #f))           ;tests fail otherwise
+    (native-inputs
+     `(("bison" ,bison)
+       ("doxygen" ,doxygen)
+       ("perl" ,perl)                   ;for tests
+       ("python" ,python)
+       ("swig" ,swig)))
+    (inputs
+     `(("pulseaudio" ,pulseaudio)))
+    (home-page "https://cmusphinx.github.io/")
+    (synopsis "Support library required by Pocketsphinx and Sphinxtrain")
+    (description "This package contains the basic libraries shared by
+the CMU Sphinx trainer and all the Sphinx decoders (Sphinx-II,
+Sphinx-III, and PocketSphinx), as well as some common utilities for
+manipulating acoustic feature and audio files.")
+    (license license:bsd-4)))
-- 
2.25.1

[0002-gnu-Add-pocketsphinx.patch (text/x-diff, inline)]
From c413571972b51c97c5432f0428b64f492adb4ff1 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Sat, 21 Mar 2020 15:59:01 +0100
Subject: [PATCH 2/3] gnu: Add pocketsphinx.

* gnu/packages/speech.scm (pocketsphinx): New variable.
---
 gnu/packages/speech.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index 41010cb1dc..8ee6fbfdc4 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -39,6 +39,7 @@
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
@@ -507,3 +508,33 @@ the CMU Sphinx trainer and all the Sphinx decoders (Sphinx-II,
 Sphinx-III, and PocketSphinx), as well as some common utilities for
 manipulating acoustic feature and audio files.")
     (license license:bsd-4)))
+
+(define-public pocketsphinx
+  (package
+    (name "pocketsphinx")
+    (version "5prealpha")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/cmusphinx/"
+                           "pocketsphinx/" version "/"
+                           "pocketsphinx-" version ".tar.gz"))
+       (sha256
+        (base32 "1n9yazzdgvpqgnfzsbl96ch9cirayh74jmpjf7svs4i7grabanzg"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("perl" ,perl)                   ;for tests
+       ("python" ,python)
+       ("swig" ,swig)))
+    (inputs
+     `(("gstreamer" ,gstreamer)
+       ("libcap" ,libcap)
+       ("pulseaudio" ,pulseaudio)
+       ("sphinxbase" ,sphinxbase)))
+    (home-page "https://cmusphinx.github.io/")
+    (synopsis "Recognizer library written in C")
+    (description "PocketSphinx is one of Carnegie Mellon University's
+large vocabulary, speaker-independent continuous speech recognition
+engine.")
+    (license license:bsd-2)))
-- 
2.25.1

[0003-gnu-Add-parlatype.patch (text/x-diff, inline)]
From 9e6789d0b075d8881c6e10f2fb56d7bc56cd0907 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Date: Sat, 21 Mar 2020 17:19:15 +0100
Subject: [PATCH 3/3] gnu: Add parlatype.

* gnu/packages/speech.scm (parlatype): New variable.
---
 gnu/packages/speech.scm | 62 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index 8ee6fbfdc4..64616d1484 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -29,6 +29,7 @@
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system meson)
   #:use-module (gnu packages)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages autotools)
@@ -37,9 +38,13 @@
   #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages emacs)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages gnome)
   #:use-module (gnu packages gstreamer)
+  #:use-module (gnu packages gtk)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
@@ -538,3 +543,60 @@ manipulating acoustic feature and audio files.")
 large vocabulary, speaker-independent continuous speech recognition
 engine.")
     (license license:bsd-2)))
+
+(define-public parlatype
+  ;; This is one commit away from 2.0, because the latter introduced
+  ;; a regression in ASR.
+  (let ((commit "7d22ead13ef7578f99d24146663cc1bdb7d8c2a9")
+        (revision "1"))
+    (package
+      (name "parlatype")
+      (version (git-version "2.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/gkarsay/parlatype.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0r3k3qczbzi7bs5s1rddhpsnadyr805df40bqkx0srlxgh5mfghf"))))
+      (build-system meson-build-system)
+      (arguments
+       `(#:glib-or-gtk? #t
+         #:tests? #f                    ;require internet access
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'wrap-parlatype
+             ;; Add gstreamer plugin provided in this packages to system's
+             ;; plugins.
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (gst-plugin-path (string-append
+                                        out "/lib/gstreamer-1.0/"
+                                        ":"
+                                        (getenv "GST_PLUGIN_SYSTEM_PATH"))))
+                 (wrap-program (string-append out "/bin/parlatype")
+                   `("GST_PLUGIN_SYSTEM_PATH" ":" = (,gst-plugin-path))))
+               #t)))))
+      (native-inputs
+       `(("appstream-glib" ,appstream-glib)
+         ("desktop-file-utils" ,desktop-file-utils) ;for desktop-file-validate
+         ("gettext" ,gettext-minimal)
+         ("glib" ,glib "bin")           ;for glib-compile-resources
+         ("pkg-config" ,pkg-config)
+         ("yelp-tools" ,yelp-tools)))
+      (inputs
+       `(("gst-plugins-base" ,gst-plugins-base)
+         ("gst-plugins-good" ,gst-plugins-good)
+         ("gstreamer" ,gstreamer)
+         ("gtk+" ,gtk+)
+         ("pocketsphinx" ,pocketsphinx)
+         ("pulseaudio" ,pulseaudio)
+         ("sphinxbase" ,sphinxbase)))
+      (home-page "http://gkarsay.github.io/parlatype/")
+      (synopsis "GNOME audio player for transcription")
+      (description "Parlatype is an audio player for the GNOME desktop
+environment.  Its main purpose is the manual transcription of spoken
+audio files.")
+      (license license:gpl3+))))
-- 
2.25.1


Information forwarded to guix-patches <at> gnu.org:
bug#39721; Package guix-patches. (Sun, 29 Mar 2020 18:56:02 GMT) Full text and rfc822 format available.

Message #17 received at 39721 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 39721 <at> debbugs.gnu.org
Subject: Re: [bug#39721] [PATCH] Parlatype (v3) (was: Re: [WIP PATCH]
 Parlatype (v2))
Date: Sun, 29 Mar 2020 20:55:34 +0200
[Message part 1 (text/plain, inline)]
Nicolas Goaziou <mail <at> nicolasgoaziou.fr> writes:

> Hello,
>
> Marius Bakke <mbakke <at> fastmail.com> writes:
>
>> Maybe you need to add $out/lib/gstreamer-1.0 to the wrapped
>> GST_PLUGIN_SYSTEM_PATH variable.  Currently it will only get wrapped
>> with the gstreamer plugins added as inputs, and not itself, IIUC.
>
> That was it. Thank you!
>
> Here are the patches, now for real submission.
>
> I'm not sure about the location for parlatype. I added it to
> "speech.scm" because it is mainly used for audio transcription, but it
> can read any audio file. It has apparently some video support, too, but
> I didn't try (and it may be missing some plugins).

The patches LGTM.  Perhaps Parlatype fits in gnome.scm?  That way we
don't have to include that module in speech.scm.

Thanks!
[signature.asc (application/pgp-signature, inline)]

Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Sun, 29 Mar 2020 20:43:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
bug acknowledged by developer. (Sun, 29 Mar 2020 20:43:02 GMT) Full text and rfc822 format available.

Message #22 received at 39721-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: 39721-done <at> debbugs.gnu.org
Subject: Re: [bug#39721] [PATCH] Parlatype (v3)
Date: Sun, 29 Mar 2020 22:42:45 +0200
Hello,

Marius Bakke <mbakke <at> fastmail.com> writes:

> The patches LGTM.  Perhaps Parlatype fits in gnome.scm?  That way we
> don't have to include that module in speech.scm.

Fair enough.

I applied the three patches as 337fc72228df2b01f024c1276703ea4369cee37d,
9e9dd4098f7a2de658625a0e803d4955ce6ba8fd and
1a17d21b24f56a02282821fc04cca54637d84170.

Thank you!

Regards,

-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 27 Apr 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.