summaryrefslogtreecommitdiff
path: root/gnu/packages/speech.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/speech.scm')
-rw-r--r--gnu/packages/speech.scm101
1 files changed, 95 insertions, 6 deletions
diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index 065aa81543..2d6c63e3f9 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -1,8 +1,9 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 David Thompson <davet@gnu.org>
-;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,17 +24,101 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages compression)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages textutils))
+(define-public espeak
+ (package
+ (name "espeak")
+ (version "1.48.04")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/espeak/espeak/"
+ "espeak-" (version-major+minor version)
+ "/espeak-" version "-source.zip"))
+ (sha256
+ (base32
+ "0n86gwh9pw0jqqpdz7mxggllfr8k0r7pc67ayy7w5z6z79kig6mz"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; remove prebuilt binaries
+ '(begin
+ (delete-file-recursively "linux_32bit")
+ #t))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ (string-append "DATADIR="
+ (assoc-ref %outputs "out")
+ "/share/espeak-data")
+ (string-append "LDFLAGS=-Wl,-rpath="
+ (assoc-ref %outputs "out")
+ "/lib")
+ "AUDIO=pulseaudio")
+ #:tests? #f ; no check target
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (chdir "src")
+ ;; We use version 19 of the PortAudio library, so we must copy the
+ ;; corresponding file to be sure that espeak compiles correctly.
+ (copy-file "portaudio19.h" "portaudio.h")
+ (substitute* "Makefile"
+ (("/bin/ln") "ln"))
+ #t)))))
+ (inputs
+ `(("portaudio" ,portaudio)
+ ("pulseaudio" ,pulseaudio)))
+ (native-inputs `(("unzip" ,unzip)))
+ (home-page "http://espeak.sourceforge.net/")
+ (synopsis "Software speech synthesizer")
+ (description "eSpeak is a software speech synthesizer for English and
+other languages. 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.")
+ (license license:gpl3+)))
+
+(define-public espeak-ng
+ (package
+ (name "espeak-ng")
+ (version "1.49.2")
+ (home-page "https://github.com/espeak-ng/espeak-ng")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append home-page "/releases/download/" version
+ "/espeak-ng-" version ".tar.gz"))
+ (sha256
+ (base32 "1d10x9rbvqi2zwcz65fxh04k0x0scnk7732l37laz6xra1ldhzng"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags '("--disable-static")
+ ;; Building in parallel triggers a race condition in 1.49.2.
+ #:parallel-build? #f
+ ;; XXX: Some tests require an audio device.
+ #:tests? #f))
+ (inputs
+ `(("libcap" ,libcap)
+ ("pcaudiolib" ,pcaudiolib)))
+ (synopsis "Software speech synthesizer")
+ (description
+ "eSpeak NG is a software speech synthesizer for more than 100 languages.
+It is based on the eSpeak engine and supports spectral and Klatt formant
+synthesis, and the ability to use MBROLA voices.")
+ (license license:gpl3+)))
+
(define-public mitlm
(package
(name "mitlm")
@@ -60,22 +145,26 @@ efficiency through the use of a compact vector representation of n-grams.")
(define-public speech-dispatcher
(package
(name "speech-dispatcher")
- (version "0.8.5")
+ (version "0.9.0")
(source (origin
(method url-fetch)
- (uri (string-append "https://devel.freebsoft.org/pub/"
- "projects/speechd/speech-dispatcher-"
+ (uri (string-append "https://github.com/brailcom/speechd/releases"
+ "/download/" version "/speech-dispatcher-"
version ".tar.gz"))
(sha256
(base32
- "18jlxnhlahyi6njc6l6576hfvmzivjjgfjyd2n7vvrvx9inphjrb"))))
+ "1yd2rb02565picga4gh2a0bvfxbhdyaj0cv9aaj5a8fc5zs29fbk"))))
(build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags '("--disable-static"
+ ;; Disable support for proprietary TTS engines.
+ "--with-kali=no" "--with-baratinoo=no")))
(native-inputs
`(("intltool" ,intltool)
("pkg-config" ,pkg-config)))
(inputs
`(("dotconf" ,dotconf)
- ("espeak" ,espeak)
+ ("espeak" ,espeak-ng)
("glib" ,glib)
("libltdl" ,libltdl)
("libsndfile" ,libsndfile)