all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#52321: festival can't do text-to-speech (Linux: can't open /dev/dsp)
@ 2021-12-05 23:20 Luis Felipe via Bug reports for GNU Guix
  2021-12-06 13:10 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2021-12-15  5:04 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  0 siblings, 2 replies; 3+ messages in thread
From: Luis Felipe via Bug reports for GNU Guix @ 2021-12-05 23:20 UTC (permalink / raw)
  To: 52321


[-- Attachment #1.1: Type: text/plain, Size: 600 bytes --]

STEPS TO REPRODUCE

1. guix shell festival
2. echo Hello speech | festival --tts

EXPECTED RESULT

You can hear festival utters "Hello speech".

UNEXPECTED RESULT

There is no speech, and the following error is printed:

  Linux: can't open /dev/dsp

ADDITIONAL INFORMATION

Using flite, a synthesizer based on festival, just works. Also, following the steps in Debian produce the expected result.

SYSTEM INFORMATION

OS: Guix System f52719dfad7b7d3beb2b1211b6846196f3590823 x86_64 

Kernel: 5.13.15-gnu1 



---
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/

[-- Attachment #1.2: publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc --]
[-- Type: application/pgp-keys, Size: 1815 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 509 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#52321: festival can't do text-to-speech (Linux: can't open /dev/dsp)
  2021-12-05 23:20 bug#52321: festival can't do text-to-speech (Linux: can't open /dev/dsp) Luis Felipe via Bug reports for GNU Guix
@ 2021-12-06 13:10 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  2021-12-15  5:04 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  1 sibling, 0 replies; 3+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2021-12-06 13:10 UTC (permalink / raw)
  To: Luis Felipe; +Cc: 52321


[-- Attachment #1.1: Type: text/plain, Size: 1117 bytes --]

Luis Felipe,

Luis Felipe via Bug reports for GNU Guix 写道:
> UNEXPECTED RESULT
>
> There is no speech, and the following error is printed:
>
>   Linux: can't open /dev/dsp

Attached is a patch that makes Festival work with Linux (ALSA) by 
default… but it's a bit odd that we'd've been shipping a ‘broken’ 
Festival from day 0?

(TIL that our default Linux-Libre configurations enable legacy OSS 
emulation so this could probably be made to work with the right 
modprobes.  Still, this should not be required without good 
reason, and plenty of OSS-free kernels exist.)

I'd like to hear from existing Festival/Guix users if any actually 
do.

Until then, you can easily hack around it:

  $ cat <<EOF > ~/.festivalrc
  (Parameter.set 'Audio_Method 'Audio_Command)
  (Parameter.set 'Audio_Command
    "aplay -q -c 1 -t raw -f s16 -r \$SR \$FILE")
  EOF
  $ echo sup | festival --tts

From [0] of all places.  aplay is part of alsa-utils.

Kind regards,

T G-R

[0]: 
https://web.archive.org/web/20110522202347/http://ubuntuforums.org/showthread.php?t=171182&page=3


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-festival-Support-ALSA-output.patch --]
[-- Type: text/x-patch, Size: 1407 bytes --]

From 75c12a0838f4355c99ae3ee7f2bf8809be988f9f Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Mon, 6 Dec 2021 14:25:08 +0100
Subject: [PATCH] gnu: festival: Support ALSA output.

* gnu/packages/speech.scm (festival)[arguments]: Add "LINUXAUDIO=alsa"
to #:make-flags.
[inputs]: Add alsa-lib.
---
 gnu/packages/speech.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index cbc46b32b4..bb1a7b8187 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -347,7 +347,8 @@ (define-public festival
                             "/bin/rm")
              (string-append "ECHO_N="
                             (assoc-ref %build-inputs "coreutils")
-                            "/bin/printf \"%s\""))
+                            "/bin/printf \"%s\"")
+             "LINUXAUDIO=alsa")
        #:parallel-build? #f ; not supported
        #:modules ((guix build gnu-build-system)
                   (guix build utils)
@@ -505,7 +506,8 @@ (define-public festival
          (add-before 'configure 'bootstrap
            (lambda _ (invoke "autoreconf" "-vif"))))))
     (inputs
-     `(("ncurses" ,ncurses)))
+     `(("alsa-lib" ,alsa-lib)
+       ("ncurses" ,ncurses)))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)
-- 
2.34.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#52321: festival can't do text-to-speech (Linux: can't open /dev/dsp)
  2021-12-05 23:20 bug#52321: festival can't do text-to-speech (Linux: can't open /dev/dsp) Luis Felipe via Bug reports for GNU Guix
  2021-12-06 13:10 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2021-12-15  5:04 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
  1 sibling, 0 replies; 3+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2021-12-15  5:04 UTC (permalink / raw)
  To: 52321-done

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

Pushed as 13f769c165c06b97472f61902d491c8910e86f8b.

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-15  5:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-05 23:20 bug#52321: festival can't do text-to-speech (Linux: can't open /dev/dsp) Luis Felipe via Bug reports for GNU Guix
2021-12-06 13:10 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2021-12-15  5:04 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.