GNU bug report logs - #58140
Simple offline text-to-speech incoming !

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Wed, 28 Sep 2022 11:36:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Nicolas Graves <ngraves <at> ngraves.fr>, 58140 <at> debbugs.gnu.org
Subject: Re: [bug#58140] [PATCH 2/6] gnu: Add kaldi-for-vosk.
Date: Wed, 28 Sep 2022 23:05:26 +0200
[Message part 1 (text/plain, inline)]
>+            (add-after 'unpack 'chdir
>+              (lambda _ (chdir "src") #t))

Trailing #t haven't been required since a long time.

On 28-09-2022 13:57, Nicolas Graves via Guix-patches via wrote:
> +                (when (not (or (string-prefix? "x86_64" system)
> +                               (string-prefix? "i686" system)))
> +                  (substitute* "makefiles/linux_openblas.mk"
> +                    (("-msse -msse2") "")))

You are testing for the system it is being compiled on ('system'), not 
the system it is being compiled for ('target').  For cross-compilation, 
usually the latter is required.  You may find
#$@(if (target-x86?) #~((substitute* ...) #~())
useful, it automatically handles cross-compilation, both 32-bit and 
64-bit, a hypothetical i786 it it ever starts existing, i586 if we ever 
lower the requirements ...

> +                     (string-append "OPENBLASROOT=\"" #$openblas "\""))

#$PACKAGE does not compose with --with-input.  I recommend doing 
something like
(dirname (dirname (search-input-file inputs "lib/libblas.so")))
instead.  Likewise for other uses of #$PACKAGE.

> +                  (setenv "OPENFST_VER" #$(package-version openfst))

I recommend referring to 'openfst' with 'this-package-input', that way 
when --with-input or --with-latest is used to change it to something 
with a different version, the version should still be detetcxed properly.

> +                (substitute* "./Makefile"
> +                  (("USE_SHARED\\?=0")
> +                   "USE_SHARED?=1")

IIUC, ?=0 means that 0 is the default, you can override it by setting 
#:make-flags.

> dialects - English, 

I think one of the special dashes (en dashes, em dashes, figure dash? 
Don't know which one) would be appropriate here.

> +(define-public python-nerd-dictation
> +  (let* ((commit "53ab129a5ee0f8b5df284e8cf2229219b732c59e")
> +         (revision "0"))
> +    (package
> +      (name "python-nerd-dictation")
> +      (version (git-version "0" revision commit))

Going by <https://github.com/ideasman42/nerd-dictation>, 'python-' is 
not part of its name, you can drop the prefix AFAICT.

> +      (synopsis "Offline speech-to-text for desktop Linux")

If it's Linux only, you can use the 'supported-systems' field for that, 
see (gnu packages linux) for examples.

> +                        #$(file-append bash-minimal "/bin/bash")

You can use 'search-input-file' to avoid depending on input labels.

> +          (let* ((out (assoc-ref %outputs "out"))

If you are using G-exps, you can replace (assoc-ref %outputs "out") with 
its G-exp equivalent #$output.

> +(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"))))

Why select an older version?  Would keeping the original (and more 
up-to-date) version work?  To avoid a name conflict between the openfst 
(which would be inconvenient for "guix show", "guix install", "guix 
shell"), you can override the 'name' field.

Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

This bug report was last modified 2 years and 278 days ago.

Previous Next


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