GNU bug report logs - #52321
festival can't do text-to-speech (Linux: can't open /dev/dsp)

Previous Next

Package: guix;

Reported by: Luis Felipe <luis.felipe.la <at> protonmail.com>

Date: Sun, 5 Dec 2021 23:21:02 UTC

Severity: normal

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

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 52321 in the body.
You can then email your comments to 52321 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 bug-guix <at> gnu.org:
bug#52321; Package guix. (Sun, 05 Dec 2021 23:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Luis Felipe <luis.felipe.la <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 05 Dec 2021 23:21:02 GMT) Full text and rfc822 format available.

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

From: Luis Felipe <luis.felipe.la <at> protonmail.com>
To: "bug-guix <at> gnu.org" <bug-guix <at> gnu.org>
Subject: festival can't do text-to-speech (Linux: can't open /dev/dsp)
Date: Sun, 05 Dec 2021 23:20:45 +0000
[Message part 1 (text/plain, inline)]
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/
[publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#52321; Package guix. (Mon, 06 Dec 2021 13:42:01 GMT) Full text and rfc822 format available.

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

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Luis Felipe <luis.felipe.la <at> protonmail.com>
Cc: bug-guix <at> gnu.org, 52321 <at> debbugs.gnu.org
Subject: Re: bug#52321: festival can't do text-to-speech (Linux: can't open
 /dev/dsp)
Date: Mon, 06 Dec 2021 14:10:42 +0100
[Message part 1 (text/plain, inline)]
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

[0001-gnu-festival-Support-ALSA-output.patch (text/x-patch, inline)]
From 75c12a0838f4355c99ae3ee7f2bf8809be988f9f Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me <at> 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

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

Information forwarded to bug-guix <at> gnu.org:
bug#52321; Package guix. (Mon, 06 Dec 2021 13:42:02 GMT) Full text and rfc822 format available.

Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Wed, 15 Dec 2021 05:06:01 GMT) Full text and rfc822 format available.

Notification sent to Luis Felipe <luis.felipe.la <at> protonmail.com>:
bug acknowledged by developer. (Wed, 15 Dec 2021 05:06:01 GMT) Full text and rfc822 format available.

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

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 52321-done <at> debbugs.gnu.org
Subject: Re: festival can't do text-to-speech (Linux: can't open /dev/dsp)
Date: Wed, 15 Dec 2021 06:04:53 +0100
[Message part 1 (text/plain, inline)]
Pushed as 13f769c165c06b97472f61902d491c8910e86f8b.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 12 Jan 2022 12:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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