gnu: libdvdcss: Update to 1.4.3.
[jackhill/guix/guix.git] / gnu / packages / speech.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
3 ;;; Copyright © 2016, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
4 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
5 ;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
7 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
8 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
9 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2021 qblade <qblade@protonmail.com>
11 ;;;
12 ;;; This file is part of GNU Guix.
13 ;;;
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
18 ;;;
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
23 ;;;
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27 (define-module (gnu packages speech)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix utils)
33 #:use-module (guix build-system gnu)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages audio)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages base) ;for 'which'
38 #:use-module (gnu packages bison)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages documentation)
41 #:use-module (gnu packages emacs)
42 #:use-module (gnu packages gcc)
43 #:use-module (gnu packages glib)
44 #:use-module (gnu packages gstreamer)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages ncurses)
47 #:use-module (gnu packages perl)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages pulseaudio)
50 #:use-module (gnu packages python)
51 #:use-module (gnu packages swig)
52 #:use-module (gnu packages texinfo)
53 #:use-module (gnu packages textutils))
54
55 (define-public flite
56 (package
57 (name "flite")
58 (version "2.2")
59 (source
60 (origin
61 (method git-fetch)
62 (uri (git-reference
63 (url "https://github.com/festvox/flite")
64 (commit (string-append "v" version))))
65 (file-name (git-file-name name version))
66 (sha256
67 (base32 "1n0p81jzndzc1rzgm66kw9ls189ricy5v1ps11y0p2fk1p56kbjf"))))
68 (build-system gnu-build-system)
69 (arguments
70 ;; XXX:
71 ;; There numerous issues with the testsuite.
72 ;; Enable all of them once they are fixed in upstream.
73 `(#:tests? #f
74 #:configure-flags
75 (list
76 "--enable-shared"
77 (string-append "LDFLAGS=-Wl,-rpath="
78 (assoc-ref %outputs "out")
79 "/lib"))
80 #:phases
81 (modify-phases %standard-phases
82 (add-after 'unpack 'patch-rpath
83 (lambda _
84 (substitute* "main/Makefile"
85 (("flite_LIBS_flags \\+= -Wl,-rpath [^ ]*")
86 "flite_LIBS_flags +="))
87 #t))
88 (delete 'check)
89 ;; Modifying testsuite/Makefile is not done in favor of
90 ;; overriding 'check.
91 ;; The path not taken would be:
92 ;; test:\n\t$(foreach x,$(subst tris1,,$(subst dcoffset_wave,,$(subst flite_test,,$(subst by_word,,$(subst bin2ascii,,$(subst lpc_resynth,,$(subst rfc,,$(subst compare_wave,,$(subst record_in_noise,,$(subst combine_waves,,$(patsubst play_%,,$(subst record_wave,,$(subst lex_lookup,,$(patsubst lpc_test%,,$(patsubst asciiS2U%,,$(patsubst asciiU2S%,,$(ALL))))))))))))))))),echo TEST $x && ./$x data.one && ) true
93 (add-after 'install 'check
94 (lambda _
95 (invoke "make" "-C" "testsuite")
96 (with-directory-excursion "testsuite"
97 (invoke "./token_test")
98 (invoke "./hrg_test")
99 (invoke "./regex_test")
100 (invoke "./nums_test")
101 (invoke "./lex_test")
102 (invoke "./utt_test")
103 (invoke "./multi_thread"))
104 #t))
105 (add-after 'install 'remove-static-libs
106 (lambda* (#:key outputs #:allow-other-keys)
107 (let* ((out (assoc-ref outputs "out")))
108 (for-each delete-file
109 (find-files out "\\.a$"))
110 #t))))))
111 (native-inputs
112 `(("perl" ,perl)))
113 (inputs
114 `(("alsa" ,alsa-lib)))
115 (synopsis "Speech synthesis system")
116 (description "Flite (festival-lite) is a small, fast run-time text to speech
117 synthesis engine developed at CMU and primarily designed for small embedded
118 machines and/or large servers. It is designed as an alternative text to speech
119 synthesis engine to Festival for voices built using the FestVox suite of voice
120 building tools.")
121 (home-page "http://www.festvox.org/flite/index.html")
122 (license (license:non-copyleft "file:///COPYING"))))
123
124 (define-public espeak
125 (package
126 (name "espeak")
127 (version "1.48.04")
128 (source (origin
129 (method url-fetch)
130 (uri (string-append "mirror://sourceforge/espeak/espeak/"
131 "espeak-" (version-major+minor version)
132 "/espeak-" version "-source.zip"))
133 (sha256
134 (base32
135 "0n86gwh9pw0jqqpdz7mxggllfr8k0r7pc67ayy7w5z6z79kig6mz"))
136 (modules '((guix build utils)))
137 (snippet
138 ;; remove prebuilt binaries
139 '(begin
140 (delete-file-recursively "linux_32bit")
141 #t))))
142 (build-system gnu-build-system)
143 (arguments
144 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
145 (string-append "DATADIR="
146 (assoc-ref %outputs "out")
147 "/share/espeak-data")
148 (string-append "LDFLAGS=-Wl,-rpath="
149 (assoc-ref %outputs "out")
150 "/lib")
151 ;; The package fails to build with newer C++ standards.
152 "CXXFLAGS=-std=c++98"
153 "AUDIO=pulseaudio")
154 #:tests? #f ; no check target
155 #:phases
156 (modify-phases %standard-phases
157 (replace 'configure
158 (lambda _
159 (chdir "src")
160 ;; We use version 19 of the PortAudio library, so we must copy the
161 ;; corresponding file to be sure that espeak compiles correctly.
162 (copy-file "portaudio19.h" "portaudio.h")
163 (substitute* "Makefile"
164 (("/bin/ln") "ln"))
165 #t)))))
166 (inputs
167 `(("portaudio" ,portaudio)
168 ("pulseaudio" ,pulseaudio)))
169 (native-inputs `(("unzip" ,unzip)))
170 (home-page "http://espeak.sourceforge.net/")
171 (synopsis "Software speech synthesizer")
172 (description "eSpeak is a software speech synthesizer for English and
173 other languages. eSpeak uses a \"formant synthesis\" method. This allows many
174 languages to be provided in a small size. The speech is clear, and can be used
175 at high speeds, but is not as natural or smooth as larger synthesizers which are
176 based on human speech recordings.")
177 (license license:gpl3+)))
178
179 (define-public espeak-ng
180 (package
181 (name "espeak-ng")
182 (version "1.50")
183 (home-page "https://github.com/espeak-ng/espeak-ng")
184 ;; Note: eSpeak NG publishes release tarballs, but the 1.50 tarball is
185 ;; broken: <https://github.com/espeak-ng/espeak-ng/issues/683>.
186 ;; Download the raw repository to work around it; remove 'native-inputs'
187 ;; below when switching back to the release tarball.
188 (source (origin
189 (method git-fetch)
190 (uri (git-reference (url home-page) (commit version)))
191 (file-name (git-file-name name version))
192 (sha256
193 (base32 "0jkqhf2h94vbqq7mg7mmm23bq372fa7mdk941my18c3vkldcir1b"))))
194 (build-system gnu-build-system)
195 (arguments
196 `(#:configure-flags '("--disable-static")
197 ;; Building in parallel triggers a race condition in 1.49.2.
198 #:parallel-build? #f
199 ;; XXX: Some tests require an audio device.
200 #:tests? #f))
201 (native-inputs
202 `(("autoconf" ,autoconf)
203 ("automake" ,automake)
204 ("libtool" ,libtool)
205 ("which" ,which)))
206 (inputs
207 `(("libcap" ,libcap)
208 ("pcaudiolib" ,pcaudiolib)))
209 (synopsis "Software speech synthesizer")
210 (description
211 "eSpeak NG is a software speech synthesizer for more than 100 languages.
212 It is based on the eSpeak engine and supports spectral and Klatt formant
213 synthesis, and the ability to use MBROLA voices.")
214 (license license:gpl3+)))
215
216 (define-public mitlm
217 (package
218 (name "mitlm")
219 (version "0.4.2")
220 (source (origin
221 (method url-fetch)
222 (uri (string-append "https://github.com/mitlm/mitlm/releases/"
223 "download/v" version "/"
224 name "-" version ".tar.xz"))
225 (sha256
226 (base32
227 "09fv4fcpmw9g1j0zml0k5kk1lgjw2spr8gn51llbkaaph6v8d62a"))))
228 (build-system gnu-build-system)
229 (native-inputs
230 `(("gfortran" ,gfortran)))
231 (synopsis "The MIT Language Modeling toolkit")
232 (description "The MIT Language Modeling (MITLM) toolkit is a set of
233 tools designed for the efficient estimation of statistical n-gram language
234 models involving iterative parameter estimation. It achieves much of its
235 efficiency through the use of a compact vector representation of n-grams.")
236 (home-page "https://github.com/mitlm/mitlm")
237 (license license:expat)))
238
239 (define-public speech-dispatcher
240 (package
241 (name "speech-dispatcher")
242 (version "0.9.1")
243 (source (origin
244 (method url-fetch)
245 (uri (string-append "https://github.com/brailcom/speechd/releases"
246 "/download/" version "/speech-dispatcher-"
247 version ".tar.gz"))
248 (sha256
249 (base32
250 "16bg52hnkrsrs7kgbzanb34b9zb6fqxwj0a9bmsxmj1skkil1h1p"))))
251 (build-system gnu-build-system)
252 (arguments
253 `(#:configure-flags '("--disable-static"
254
255 ;; Disable support for proprietary TTS engines.
256 "--with-ibmtts=no"
257 "--with-kali=no" "--with-baratinoo=no")))
258 (native-inputs
259 `(("intltool" ,intltool)
260 ("pkg-config" ,pkg-config)))
261 (inputs
262 `(("dotconf" ,dotconf)
263 ("espeak" ,espeak-ng)
264 ("glib" ,glib)
265 ("libltdl" ,libltdl)
266 ("libsndfile" ,libsndfile)
267 ("pulseaudio" ,pulseaudio)
268 ("python" ,python)))
269 (synopsis "Common interface to speech synthesizers")
270 (description "The Speech Dispatcher project provides a high-level
271 device independent layer for access to speech synthesis through a simple,
272 stable and well documented interface.")
273 (home-page "https://devel.freebsoft.org/speechd")
274 ;; The software is distributed under GPL2+, but includes a number
275 ;; of files covered by other licenses. Note: in practice, this
276 ;; is linked against dotconf, which is LGPL 2.1 only.
277 (license (list license:gpl2+
278 license:fdl1.2+ ; Most files in doc/ are dual gpl2+/fdl1.2+.
279 license:lgpl2.1+
280 (license:non-copyleft
281 ;; festival_client.{c,h} carries an expat-style license.
282 "See src/modules/festival_client.c in the distribution.")
283 license:gpl3+)))) ; doc/texinfo.tex -- with TeX exception.
284
285 (define-public sonic
286 (package
287 (name "sonic")
288 (version "0.2.0")
289 (source (origin
290 (method git-fetch)
291 (uri (git-reference
292 (url "https://github.com/waywardgeek/sonic")
293 (commit (string-append "release-" version))))
294 (file-name (git-file-name name version))
295 (sha256
296 (base32
297 "08xwnpw9cnaix1n1i7gvpq5hrfrqc2z1snjhjapfam506hrc77g4"))))
298 (build-system gnu-build-system)
299 (arguments
300 `(#:tests? #f ; no test suite
301 #:make-flags
302 (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
303 (string-append "LDFLAGS=-Wl,-rpath="
304 (assoc-ref %outputs "out") "/lib"))
305 #:phases
306 (modify-phases %standard-phases
307 (add-after 'unpack 'respect-LDFLAGS
308 (lambda _
309 (substitute* "Makefile"
310 ((" -o sonic " match)
311 (string-append " $(LDFLAGS)" match)))
312 #t))
313 (delete 'configure)))) ; no ./configure script
314 (synopsis "Speed up or slow down speech")
315 (description "Sonic implements a simple algorithm for speeding up or slowing
316 down speech. However, it's optimized for speed ups of over 2X, unlike previous
317 algorithms for changing speech rate. Sonic is a C library designed to be easily
318 integrated into streaming voice applications such as text-to-speech (TTS) back
319 ends.
320
321 The primary motivation behind Sonic is to enable the blind and visually impaired
322 to improve their productivity with speech engines, like eSpeak. Sonic can also
323 be used by the sighted.")
324 (home-page "https://github.com/waywardgeek/sonic")
325 (license license:asl2.0)))
326
327 (define-public festival
328 (package
329 (name "festival")
330 (version "2.5.0")
331 (source (origin
332 (method url-fetch)
333 (uri (string-append "http://festvox.org/packed/festival/"
334 (version-major+minor version)
335 "/festival-" version "-release.tar.gz"))
336 (sha256
337 (base32
338 "1d5415nckiv19adxisxfm1l1xxfyw88g87ckkmcr0lhjdd10g42c"))))
339 (build-system gnu-build-system)
340 (arguments
341 `(#:tests? #f ; there is no test target
342 #:make-flags
343 (list (string-append "RM="
344 (assoc-ref %build-inputs "coreutils")
345 "/bin/rm")
346 (string-append "ECHO_N="
347 (assoc-ref %build-inputs "coreutils")
348 "/bin/printf \"%s\""))
349 #:parallel-build? #f ; not supported
350 #:modules ((guix build gnu-build-system)
351 (guix build utils)
352 (guix build emacs-utils))
353 #:imported-modules (,@%gnu-build-system-modules
354 (guix build emacs-utils))
355 #:phases
356 (modify-phases %standard-phases
357 (add-after 'unpack 'unpack-and-patch-speech-tools
358 (lambda* (#:key inputs #:allow-other-keys)
359 (invoke "tar" "-C" ".."
360 "-xf" (assoc-ref inputs "speech-tools"))
361 (with-directory-excursion "../speech_tools"
362 (substitute* '("config/rules/modules.mak"
363 "config/rules/test_make_rules.mak"
364 "config/make_system.mak")
365 (("/bin/sh") (which "sh"))))
366 #t))
367 (add-after 'unpack 'patch-/bin/sh
368 (lambda _
369 (substitute* '("config/test_make_rules"
370 "config/make_system.mak")
371 (("/bin/sh") (which "sh")))
372 #t))
373 (add-before 'build 'build-speech-tools
374 (lambda* (#:key configure-flags make-flags #:allow-other-keys)
375 (with-directory-excursion "../speech_tools"
376 (apply invoke "sh" "configure"
377 (string-append "CONFIG_SHELL=" (which "sh"))
378 (string-append "SHELL=" (which "sh"))
379 configure-flags)
380 (apply invoke "make" make-flags))))
381 (add-after 'build 'build-documentation
382 (lambda _
383 (with-directory-excursion "doc"
384 (invoke "make" "festival.info"))))
385 (add-after 'unpack 'set-installation-directories
386 (lambda* (#:key outputs #:allow-other-keys)
387 (let ((out (assoc-ref outputs "out")))
388 (substitute* "config/project.mak"
389 (("^FTLIBDIR.*")
390 (string-append "FTLIBDIR=" out "/share/festival/lib")))
391 (substitute* "config/systems/default.mak"
392 (("^INSTALL_PREFIX.*")
393 (string-append "INSTALL_PREFIX=" out)))
394 #t)))
395 (add-after 'install 'actually-install
396 (lambda* (#:key inputs outputs #:allow-other-keys)
397 (let ((out (assoc-ref outputs "out")))
398 ;; Install Speech Tools first
399 (with-directory-excursion "../speech_tools"
400 ;; Target directories
401 (for-each (lambda (dir)
402 (mkdir-p (string-append out dir)))
403 '("/bin"
404 "/lib"
405 "/include/speech_tools/"
406 "/include/speech_tools/instantiate"
407 "/include/speech_tools/ling_class"
408 "/include/speech_tools/rxp"
409 "/include/speech_tools/sigpr"
410 "/include/speech_tools/unix"))
411 ;; Install binaries
412 (for-each (lambda (file)
413 (install-file file (string-append out "/bin")))
414 (find-files "bin" ".*"))
415 (for-each (lambda (file)
416 (delete-file (string-append out "/bin/" file)))
417 '("est_gdb" "est_examples" "est_program"))
418 ;; Install libraries
419 (for-each (lambda (file)
420 (install-file file (string-append out "/lib")))
421 (find-files "lib" "lib.*\\.so.*"))
422
423 ;; Install headers
424 (for-each
425 (lambda (dir)
426 (for-each
427 (lambda (header)
428 (install-file header
429 (string-append out "/include/speech_tools/" dir)))
430 (find-files (string-append "include/" dir)
431 "\\.h$")))
432 '("." "instantiate" "ling_class" "rxp" "sigpr" "unix")))
433
434 ;; Unpack files that will be installed together with the
435 ;; Festival libraries.
436 (invoke "tar" "--strip-components=1"
437 "-xvf" (assoc-ref inputs "festvox-cmu"))
438 (invoke "tar" "--strip-components=1"
439 "-xvf" (assoc-ref inputs "festvox-poslex"))
440 (invoke "tar" "--strip-components=1"
441 "-xvf" (assoc-ref inputs "default-voice"))
442
443 ;; Install Festival
444 (let ((bin (string-append out "/bin"))
445 (incdir (string-append out "/include/festival"))
446 (share (string-append out "/share/festival"))
447 (info (string-append out "/share/info")))
448 (for-each (lambda (executable)
449 (install-file executable bin))
450 '("src/main/festival"
451 "src/main/festival_client"
452 "examples/benchmark"))
453 (let ((scripts '("examples/dumpfeats"
454 "examples/durmeanstd"
455 "examples/latest"
456 "examples/make_utts"
457 "examples/powmeanstd"
458 "examples/run-festival-script"
459 "examples/saytime"
460 "examples/scfg_parse_text"
461 "examples/text2pos"
462 "examples/text2wave")))
463 (substitute* scripts
464 (("exec /tmp/guix-build.*/bin/festival")
465 (string-append "exec " bin "/festival")))
466 (for-each (lambda (script)
467 (install-file script bin))
468 scripts))
469
470 ;; Documentation
471 (for-each (lambda (file)
472 (install-file file info))
473 (find-files "doc/info/" "festival.info.*"))
474
475 ;; Headers
476 (mkdir-p incdir)
477 (for-each (lambda (header)
478 (install-file header
479 (string-append incdir "/"
480 (dirname header))))
481 (find-files "src/include" "\\.h$"))
482
483 ;; Data
484 (mkdir-p share)
485 (for-each (lambda (file)
486 (install-file file
487 (string-append share "/"
488 (dirname file))))
489 (find-files "lib" ".*"))
490 (for-each delete-file
491 (append (find-files share "Makefile")
492 (find-files bin "Makefile")))))
493 #t))
494 (add-after 'actually-install 'install-emacs-mode
495 (lambda* (#:key outputs #:allow-other-keys)
496 (let ((emacs-dir (string-append (assoc-ref outputs "out")
497 "/share/emacs/site-lisp")))
498 (install-file "lib/festival.el" emacs-dir)
499 (emacs-generate-autoloads ,name emacs-dir)
500 #t)))
501 ;; Rebuild the very old configure script that is confused by extra
502 ;; arguments.
503 (add-before 'configure 'bootstrap
504 (lambda _ (invoke "autoreconf" "-vif"))))))
505 (inputs
506 `(("ncurses" ,ncurses)))
507 (native-inputs
508 `(("autoconf" ,autoconf)
509 ("automake" ,automake)
510 ("texinfo" ,texinfo)
511 ("emacs" ,emacs-minimal)
512 ("festvox-cmu"
513 ,(origin
514 (method url-fetch)
515 (uri (string-append "http://festvox.org/packed/festival/"
516 (version-major+minor version)
517 "/festlex_CMU.tar.gz"))
518 (sha256
519 (base32
520 "01vwidqhhg2zifvk1gby91mckg1z2pv2mj6lihvdaifakf8k1561"))))
521 ("festvox-poslex"
522 ,(origin
523 (method url-fetch)
524 (uri (string-append "http://festvox.org/packed/festival/"
525 (version-major+minor version)
526 "/festlex_POSLEX.tar.gz"))
527 (sha256
528 (base32
529 "18wywilxaqwy63lc47p5g5529mpxhslibh1bjij0snxx5mjf7ip7"))))
530 ("default-voice"
531 ,(origin
532 (method url-fetch)
533 (uri (string-append "http://festvox.org/packed/festival/"
534 (version-major+minor version)
535 "/voices/festvox_kallpc16k.tar.gz"))
536 (sha256
537 (base32
538 "136hmsyiwnlg2qwa508dy0imf19mzrb5r3dmb2kg8kcyxnslm740"))))
539 ("speech-tools"
540 ,(origin
541 (method url-fetch)
542 (uri (string-append "http://festvox.org/packed/festival/"
543 (version-major+minor version)
544 "/speech_tools-" version "-release.tar.gz"))
545 (sha256
546 (base32
547 "1k2xh13miyv48gh06rgsq2vj25xwj7z6vwq9ilsn8i7ig3nrgzg4"))))))
548 (home-page "https://www.cstr.ed.ac.uk/projects/festival/")
549 (synopsis "Speech synthesis system")
550 (description "Festival offers a general framework for building speech
551 synthesis systems as well as including examples of various modules. As a
552 whole it offers full text to speech through a number APIs: from shell level,
553 though a Scheme command interpreter, as a C++ library, from Java, and an Emacs
554 interface. Festival is multi-lingual though English is the most advanced.
555 The system is written in C++ and uses the Edinburgh Speech Tools Library for
556 low level architecture and has a Scheme (SIOD) based command interpreter for
557 control.")
558 (license (license:non-copyleft "file://COPYING"))))
559
560 (define-public ekho
561 (package
562 (name "ekho")
563 (version "8.4")
564 (source
565 (origin
566 (method url-fetch)
567 (uri
568 (string-append "mirror://sourceforge/e-guidedog/Ekho/"
569 version "/ekho-" version ".tar.xz"))
570 (sha256
571 (base32 "1v476kpw09ljj8mavasj4hya2w11jwlx7q22rh1lsn9jkkam5i2a"))))
572 (native-inputs
573 `(("pkg-config" ,pkg-config)))
574 (inputs
575 `(("alsa-lib" ,alsa-lib)
576 ("espeak-ng" ,espeak-ng)
577 ("libsndfile" ,libsndfile)
578 ("pulseaudio" ,pulseaudio)))
579 (build-system gnu-build-system)
580 (native-search-paths
581 (list (search-path-specification
582 (variable "EKHO_DATA_PATH")
583 (files '("share/ekho-data")))))
584 (home-page "https://eguidedog.net/ekho.php")
585 (synopsis "Chinese text-to-speech software")
586 (description
587 "Ehko is a Text-To-Speech (TTS) software. It supports Cantonese,
588 Mandarin, Toisanese, Zhaoan Hakka, Tibetan, Ngangien and Korean (in trial).
589 It can also speak English through eSpeak or Festival.")
590 (license (list license:gpl2+
591 ;; libmusicxml
592 license:mpl2.0))))
593
594 (define-public sphinxbase
595 (package
596 (name "sphinxbase")
597 (version "5prealpha")
598 (source
599 (origin
600 (method url-fetch)
601 (uri (string-append "mirror://sourceforge/cmusphinx/"
602 "sphinxbase/" version "/"
603 "sphinxbase-" version ".tar.gz"))
604 (sha256
605 (base32 "0vr4k8pv5a8nvq9yja7kl13b5lh0f9vha8fc8znqnm8bwmcxnazp"))
606 (patches (search-patches "sphinxbase-fix-doxygen.patch"))))
607 (build-system gnu-build-system)
608 (arguments
609 `(#:parallel-tests? #f)) ;tests fail otherwise
610 (native-inputs
611 `(("bison" ,bison)
612 ("doxygen" ,doxygen)
613 ("perl" ,perl) ;for tests
614 ("python" ,python)
615 ("swig" ,swig)))
616 (inputs
617 `(("pulseaudio" ,pulseaudio)))
618 (home-page "https://cmusphinx.github.io/")
619 (synopsis "Support library required by Pocketsphinx and Sphinxtrain")
620 (description "This package contains the basic libraries shared by
621 the CMU Sphinx trainer and all the Sphinx decoders (Sphinx-II,
622 Sphinx-III, and PocketSphinx), as well as some common utilities for
623 manipulating acoustic feature and audio files.")
624 (license license:bsd-4)))
625
626 (define-public pocketsphinx
627 (package
628 (name "pocketsphinx")
629 (version "5prealpha")
630 (source
631 (origin
632 (method url-fetch)
633 (uri (string-append "mirror://sourceforge/cmusphinx/"
634 "pocketsphinx/" version "/"
635 "pocketsphinx-" version ".tar.gz"))
636 (sha256
637 (base32 "1n9yazzdgvpqgnfzsbl96ch9cirayh74jmpjf7svs4i7grabanzg"))))
638 (build-system gnu-build-system)
639 (native-inputs
640 `(("pkg-config" ,pkg-config)
641 ("perl" ,perl) ;for tests
642 ("python" ,python)
643 ("swig" ,swig)))
644 (inputs
645 `(("gstreamer" ,gstreamer)
646 ("libcap" ,libcap)
647 ("pulseaudio" ,pulseaudio)
648 ("sphinxbase" ,sphinxbase)))
649 (home-page "https://cmusphinx.github.io/")
650 (synopsis "Recognizer library written in C")
651 (description "PocketSphinx is one of Carnegie Mellon University's
652 large vocabulary, speaker-independent continuous speech recognition
653 engine.")
654 (license license:bsd-2)))