* gnu/packages/audio.scm (espeak): New variable. --- gnu/packages/audio.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 111a82d..2f679b7 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -2057,3 +2057,55 @@ Sonic can also be used by the sighted. For example, Sonic can improve the experience of listening to an audio book on an Android phone.") (home-page "https://github.com/waywardgeek/sonic") (license license:asl2.0))) + +(define-public espeak + (package + (name "espeak") + (version "1.48.04") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/project/espeak/espeak" + "/espeak-" (version-major+minor version) + "/espeak-" version "-source.zip")) + (sha256 + (base32 + "0n86gwh9pw0jqqpdz7mxggllfr8k0r7pc67ayy7w5z6z79kig6mz")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no test suite + #:make-flags (let ((out (assoc-ref %outputs "out"))) + (list "--directory=src" + ;; 'runtime' uses PulseAudio if it is running, else + ;; it uses PortAudio. + "AUDIO=runtime" + ;; Add the 'lib' dir to the RUNPATH of the + ;; binaries. + (string-append "LDFLAGS=-Wl,-rpath=" out "/lib") + (string-append "DATADIR=" out "/share/espeak-data") + (string-append "PREFIX=" out))) + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-makefile + (lambda _ + (substitute* "src/Makefile" + (("LN_SF = /bin/ln -sf") "LN_SF = ln -sf")))) + ;; The program supports portaudio versions 18 and 19. We + ;; package 19, so we select it here. + (add-after 'unpack 'pick-portaudio-version + (lambda _ + (copy-file "src/portaudio19.h" "src/portaudio.h"))) + (delete 'configure)))) + (native-inputs + `(("unzip" ,unzip))) + (inputs + `(("sonic" ,sonic) + ("pulseaudio" ,pulseaudio) + ("portaudio" ,portaudio))) + (synopsis "Software speech synthesizer") + (description "eSpeak is a compact software speech synthesizer for +English and other languages, for Linux and Windows. eSpeak uses a +formant synthesis method. This allows many languages to be provided in +a small size. The speech is clear, and can be used at high speeds, but +is not as natural or smooth as larger synthesizers which are based on +human speech recordings.") + (home-page "http://espeak.sourceforge.net/") + (license license:gpl3+))) -- 2.6.4