gnu: leveldb: Update home page.
[jackhill/guix/guix.git] / gnu / packages / speech.scm
index 6c62739..38ae8ae 100644 (file)
@@ -69,6 +69,8 @@
                           (string-append "LDFLAGS=-Wl,-rpath="
                                          (assoc-ref %outputs "out")
                                          "/lib")
+                          ;; The package fails to build with newer C++ standards.
+                          "CXXFLAGS=-std=c++98"
                           "AUDIO=pulseaudio")
        #:tests? #f ; no check target
        #:phases
@@ -337,7 +339,9 @@ be used by the sighted.")
                (invoke "tar" "--strip-components=1"
                        "-xvf" (assoc-ref inputs "festvox-cmu"))
                (invoke "tar" "--strip-components=1"
-                       "-xf" (assoc-ref inputs "festvox-poslex"))
+                       "-xvf" (assoc-ref inputs "festvox-poslex"))
+               (invoke "tar" "--strip-components=1"
+                       "-xvf" (assoc-ref inputs "default-voice"))
 
                ;; Install Festival
                (let ((bin (string-append out "/bin"))
@@ -348,17 +352,23 @@ be used by the sighted.")
                              (install-file executable bin))
                            '("src/main/festival"
                              "src/main/festival_client"
-                             "examples/benchmark"
-                             "examples/dumpfeats"
-                             "examples/durmeanstd"
-                             "examples/latest"
-                             "examples/make_utts"
-                             "examples/powmeanstd"
-                             "examples/run-festival-script"
-                             "examples/saytime"
-                             "examples/scfg_parse_text"
-                             "examples/text2pos"
-                             "examples/text2wave"))
+                             "examples/benchmark"))
+                 (let ((scripts '("examples/dumpfeats"
+                                  "examples/durmeanstd"
+                                  "examples/latest"
+                                  "examples/make_utts"
+                                  "examples/powmeanstd"
+                                  "examples/run-festival-script"
+                                  "examples/saytime"
+                                  "examples/scfg_parse_text"
+                                  "examples/text2pos"
+                                  "examples/text2wave")))
+                   (substitute* scripts
+                     (("exec /tmp/guix-build.*/bin/festival")
+                      (string-append "exec " bin "/festival")))
+                   (for-each (lambda (script)
+                               (install-file script bin))
+                             scripts))
 
                  ;; Documentation
                  (for-each (lambda (file)
@@ -420,6 +430,15 @@ be used by the sighted.")
            (sha256
             (base32
              "18wywilxaqwy63lc47p5g5529mpxhslibh1bjij0snxx5mjf7ip7"))))
+       ("default-voice"
+        ,(origin
+           (method url-fetch)
+           (uri (string-append "http://festvox.org/packed/festival/"
+                               (version-major+minor version)
+                               "/voices/festvox_kallpc16k.tar.gz"))
+           (sha256
+            (base32
+             "136hmsyiwnlg2qwa508dy0imf19mzrb5r3dmb2kg8kcyxnslm740"))))
        ("speech-tools"
         ,(origin
            (method url-fetch)