summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO42
-rw-r--r--PKGBUILD155
-rw-r--r--festconfig.patch84
-rw-r--r--festival-2.4-compat.patch365
-rw-r--r--festival-gcc47.patch59
-rw-r--r--festival-shared-build.patch72
-rw-r--r--speechconfig.patch129
7 files changed, 906 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c883b2f113a5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,42 @@
+pkgbase = festival-ims
+ pkgdesc = Festival with german patches from IMS Stuttgart
+ pkgver = 2.4
+ pkgrel = 2
+ url = http://www.cstr.ed.ac.uk/projects/festival/
+ arch = i686
+ arch = x86_64
+ license = BSD
+ license = GPL
+ license = custom
+ depends = perl
+ depends = alsa-lib
+ conflicts = festival
+ replaces = festival
+ options = !makeflags
+ source = http://www.cstr.ed.ac.uk/downloads/festival-ims/2.4/festival-ims-2.4-release.tar.gz
+ source = http://www.cstr.ed.ac.uk/downloads/festival-ims/2.4/speech_tools-2.4-release.tar.gz
+ source = http://www.cstr.ed.ac.uk/downloads/festival-ims/2.4/festlex_CMU.tar.gz
+ source = http://www.cstr.ed.ac.uk/downloads/festival-ims/2.4/festlex_OALD.tar.gz
+ source = http://www.cstr.ed.ac.uk/downloads/festival-ims/2.4/festlex_POSLEX.tar.gz
+ source = speechconfig.patch
+ source = festconfig.patch
+ source = festival-2.4-compat.patch
+ source = festival-shared-build.patch
+ source = festival-gcc47.patch
+ source = http://www2.ims.uni-stuttgart.de/phonetik/synthesis/festival/os940053/bomp_full.corr.tgz
+ source = http://www2.ims.uni-stuttgart.de/phonetik/synthesis/festival/os940053/ims_german_1.3-os.tgz
+ md5sums = 49707d2f6744d5a67f81a96c36f7cb59
+ md5sums = 3d60e563135363eb2548d947f7ef4e14
+ md5sums = 6a2ee4fed7c3ebedf197a3b8524ccb87
+ md5sums = 84af32a914d996f57bc4cb36fe8cdc97
+ md5sums = aa80f9250065b318325f16fdad3a4484
+ md5sums = 5a57ae18d71ba66dfd960519b97f4b18
+ md5sums = 6e088931b5279550b2aea4bf704bc42b
+ md5sums = 3bae028f01ef1fa523511f2ae452f0aa
+ md5sums = 9e0c5ce8c0bd5872c76d0570847f7668
+ md5sums = 253f00f5e0b10d4e36c06c7cb500f37c
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = festival-ims
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c56c4b42fbb7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,155 @@
+# $Id: PKGBUILD 255136 2015-12-10 04:45:16Z foutrelis $
+# Maintainer: Lubosz Sarnecki <lubosz@gmail.com>
+# Contributor: netcrusher < tobias AT miglix DOT eu >
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Simo Leone <neotuli@gmail.com>
+
+pkgname=festival-ims
+pkgver=2.4
+pkgrel=2
+pkgdesc="Festival with german patches from IMS Stuttgart"
+arch=(i686 x86_64)
+url="http://www.cstr.ed.ac.uk/projects/festival/"
+license=(BSD GPL custom)
+depends=(perl alsa-lib)
+options=('!makeflags')
+conflicts=('festival')
+replaces=('festival')
+source=(http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/$pkgname-$pkgver-release.tar.gz
+ http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/speech_tools-$pkgver-release.tar.gz
+ http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/festlex_CMU.tar.gz
+ http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/festlex_OALD.tar.gz
+ http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/festlex_POSLEX.tar.gz
+ speechconfig.patch
+ festconfig.patch
+ festival-2.4-compat.patch
+ festival-shared-build.patch
+ festival-gcc47.patch
+ # uni stuttgart
+ http://www2.ims.uni-stuttgart.de/phonetik/synthesis/festival/os940053/bomp_full.corr.tgz
+ http://www2.ims.uni-stuttgart.de/phonetik/synthesis/festival/os940053/ims_german_1.3-os.tgz)
+md5sums=('49707d2f6744d5a67f81a96c36f7cb59'
+ '3d60e563135363eb2548d947f7ef4e14'
+ '6a2ee4fed7c3ebedf197a3b8524ccb87'
+ '84af32a914d996f57bc4cb36fe8cdc97'
+ 'aa80f9250065b318325f16fdad3a4484'
+ '5a57ae18d71ba66dfd960519b97f4b18'
+ '6e088931b5279550b2aea4bf704bc42b'
+ '3bae028f01ef1fa523511f2ae452f0aa'
+ '9e0c5ce8c0bd5872c76d0570847f7668'
+ '253f00f5e0b10d4e36c06c7cb500f37c'
+ "SKIP"
+ "SKIP")
+
+prepare() {
+ patch -Np0 -i speechconfig.patch
+ patch -Np0 -i festconfig.patch
+
+ # fix build with new gcc versions and build shared libs - taken from Mageia
+ patch -Np0 -i festival-shared-build.patch
+ patch -Np0 -i festival-gcc47.patch
+
+ patch -Np0 -i festival-2.4-compat.patch
+
+ # Avoid make failure on making scripts and docs
+ sed -i "s#examples bin doc#examples#" festival/Makefile
+
+ # add ims config
+ sed -i 's/ALSO_INCLUDE +=$/# IMS module for German\nALSO_INCLUDE += ims_german_text/' "$srcdir/festival/config/config.in"
+cat<<EOF >> "$srcdir/festival/lib/sitevars.scm"
+(set! mbrola-path "/usr/share/mbrola/")
+(set! mbrola_progname "/usr/bin/mbrola -e")
+EOF
+ echo "(require 'ims_german_opensource)" >> "$srcdir/festival/lib/siteinit.scm"
+}
+
+build() {
+ # Build Speech Tools first
+ cd speech_tools
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make OPTIMISE_CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" OPTIMISE_CCFLAGS="${CFLAGS} -fno-strict-aliasing"
+
+ # Build Festival itself
+ cd ../festival
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make OPTIMISE_CXXFLAGS="${CXXFLAGS}" OPTIMISE_CCFLAGS="${CFLAGS}"
+}
+
+package() {
+ # Install Speech Tools first
+ cd speech_tools
+ install -dm755 "$pkgdir"/usr/{bin,lib,include/speech_tools/{,instantiate,ling_class,rxp,sigpr,unix}}
+
+ #binaries
+ #move binaries over wrappers (FS#7864)
+ for i in $(grep -l 'EST shared script' bin/*); do
+ cp -f main/$(basename $i) bin;
+ done
+ install -m755 -t "$pkgdir"/usr/bin bin/[a-z]*
+ rm -f "$pkgdir"/usr/bin/{est_gdb,est_examples,est_program}
+
+ #libraries
+ install -m755 -t "$pkgdir"/usr/lib lib/lib*.so.*
+ ln -sf libestbase.so.${pkgver}.1 "$pkgdir"/usr/lib/libestbase.so
+ ln -sf libestools.so.${pkgver}.1 "$pkgdir"/usr/lib/libestools.so
+ ln -sf libeststring.so.1.2 "$pkgdir"/usr/lib/libeststring.so
+
+ #headers
+ for dir in {.,instantiate,ling_class,rxp,sigpr,unix}; do
+ install -m644 -t "$pkgdir"/usr/include/speech_tools/$dir include/$dir/*.h
+ done
+
+ # Install Festival itself
+ cd "$srcdir"/festival
+
+ #binaries
+ install -m755 src/main/festival "$pkgdir"/usr/bin/
+ install -m755 src/main/festival_client "$pkgdir"/usr/bin/
+ install -m755 examples/benchmark "$pkgdir"/usr/bin/
+ install -m755 examples/dumpfeats "$pkgdir"/usr/bin/
+ install -m755 examples/durmeanstd "$pkgdir"/usr/bin/
+ install -m755 examples/latest "$pkgdir"/usr/bin/
+ install -m755 examples/make_utts "$pkgdir"/usr/bin/
+ install -m755 examples/powmeanstd "$pkgdir"/usr/bin/
+ install -m755 examples/run-festival-script "$pkgdir"/usr/bin/
+ install -m755 examples/saytime "$pkgdir"/usr/bin/
+ install -m755 examples/scfg_parse_text "$pkgdir"/usr/bin/
+ install -m755 examples/text2pos "$pkgdir"/usr/bin/
+ install -m755 examples/text2wave "$pkgdir"/usr/bin
+
+ #libraries
+ install -m755 src/lib/libFestival.so.* "$pkgdir"/usr/lib/
+ ln -sf libFestival.so.2.4.0 "$pkgdir"/usr/lib/libFestival.so
+
+ #headers
+ install -dm755 "$pkgdir"/usr/include/festival
+ install -m644 -t "$pkgdir"/usr/include/festival src/include/*.h
+
+ mkdir -p "$pkgdir"/usr/share/festival
+ cp -aR lib/* "$pkgdir"/usr/share/festival
+ rm -fv $(find "$pkgdir"/usr/share/festival -name Makefile)
+ rm -fv $(find "$pkgdir"/usr/bin -name Makefile)
+
+ #create voices directory
+ install -dm755 "$pkgdir"/usr/share/festival/voices
+
+ #licenses
+ install -D -m644 "$srcdir"/festival/COPYING \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ install -D -m644 "$srcdir"/speech_tools/README \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.other
+
+ # Ok now some general cleanups
+ for i in $(find "$pkgdir"/usr/include/ -type f); do
+ sed -i -e 's,"EST.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/\",speech_tools/,g' \
+ -e 's,"siod.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/\",speech_tools/,g' \
+ -e 's,"instantiate/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/instantiate/\",speech_tools/instantiate/,g' -e 's,"instantiate,instantiate,g' \
+ -e 's,"ling_class/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/ling_class/\",speech_tools/ling_class/,g' -e 's,"ling_class,ling_class,g' \
+ -e 's,"rxp/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/rxp/\",speech_tools/rxp/,g' -e 's,"rxp,rxp,g' \
+ -e 's,"sigpr/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/sigpr/\",speech_tools/sigpr/,g' -e 's,"sigpr,sigpr,g' \
+ -e 's,"unix/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/unix/\",speech_tools/unix/,g' -e 's,\.h\">,.h\>,g' -e 's,"unix,unix,g' \
+ -e 's,"festival\.h",\<festival/festival.h\>,g' \
+ -e 's,"ModuleDescription\.h",\<festival/ModuleDescription.h\>,g' \
+ -e 's,"Phone\.h",\<festival/Phone.h\>,g' $i
+ done
+}
diff --git a/festconfig.patch b/festconfig.patch
new file mode 100644
index 000000000000..b983427c4f99
--- /dev/null
+++ b/festconfig.patch
@@ -0,0 +1,84 @@
+diff -Nru festival.orig/config/config.in festival/config/config.in
+--- festival.orig/config/config.in 2004-06-21 15:52:42.000000000 -0500
++++ festival/config/config.in 2005-05-30 19:50:45.000000000 -0500
+@@ -20,7 +20,7 @@
+ ## You may need to set this explicitly if automounter or NFS
+ ## side effects cause problems
+
+-FESTIVAL_HOME := $(shell (cd $(TOP); pwd))
++FESTIVAL_HOME := /usr
+
+ ###########################################################################
+ ## Feature selection.
+diff -Nru festival.orig/config/project.mak festival/config/project.mak
+--- festival.orig/config/project.mak 2004-07-12 10:39:37.000000000 -0500
++++ festival/config/project.mak 2005-05-30 19:50:45.000000000 -0500
+@@ -114,6 +114,5 @@
+ DOCXX_DIRS = $(TOP)/src
+ MODULE_TO_DOCXX = perl $(TOP)/src/modules/utilities/extract_module_doc++.prl
+
+-FTLIBDIR = $(FESTIVAL_HOME)/lib
+-
++FTLIBDIR = /usr/share/festival
+
+diff -Nru festival.orig/config/systems/Linux.mak festival/config/systems/Linux.mak
+--- festival.orig/config/systems/Linux.mak 2001-04-04 06:55:32.000000000 -0500
++++ festival/config/systems/Linux.mak 2005-05-30 19:51:28.000000000 -0500
+@@ -40,13 +40,13 @@
+
+ include $(EST)/config/systems/default.mak
+
+-DEFAULT_JAVA_HOME=/usr/lib/jdk-1.1.6
++DEFAULT_JAVA_HOME=/usr/lib/jvm/java-6-openjdk
+ JAVA=/usr/bin/java
+ JAVAC=/usr/bin/javac
+ JAVAH=/usr/bin/javah
+
+ TCL_LIBRARY = -ltcl
+-OS_LIBS = -ldl
++OS_LIBS = -ldl -lncurses
+
+ ## the native audio module for this type of system
+ NATIVE_AUDIO_MODULE = LINUX16
+diff -Nru festival.orig/config/systems/default.mak festival/config/systems/default.mak
+--- festival.orig/config/systems/default.mak 2001-04-04 06:55:32.000000000 -0500
++++ festival/config/systems/default.mak 2005-05-30 19:50:45.000000000 -0500
+@@ -40,7 +40,7 @@
+ ###########################################################################
+ ## Installation directories
+
+-INSTALL_PREFIX=/usr/local
++INSTALL_PREFIX=/usr
+
+ BINDIR=$(INSTALL_PREFIX)/bin
+ LIBDIR=$(INSTALL_PREFIX)/lib
+@@ -63,8 +63,8 @@
+ ###########################################################################
+ ## Where to find Enlightenment Speech Demon
+
+-ESD_INCLUDE = /usr/local/include
+-ESD_LIB = /usr/local/lib
++ESD_INCLUDE = /usr/include
++ESD_LIB = /usr/lib
+
+ ###########################################################################
+ ## Where to find X11
+@@ -75,14 +75,14 @@
+ ###########################################################################
+ ## TCL support
+
+-TCL_INCLUDE = /usr/local/include
+-TCL_LIB = /usr/local/lib
+-TCL_LIBRARY = -ltcl7.6
++TCL_INCLUDE = /usr/include
++TCL_LIB = /usr/lib
++TCL_LIBRARY = -ltcl
+
+ ###########################################################################
+ ## Efence library for malloc debugging
+
+-EFENCE_LIB = /usr/local/lib
++EFENCE_LIB = /usr/lib
+
+ ###########################################################################
+ ## Commands.
diff --git a/festival-2.4-compat.patch b/festival-2.4-compat.patch
new file mode 100644
index 000000000000..17f9093d5290
--- /dev/null
+++ b/festival-2.4-compat.patch
@@ -0,0 +1,365 @@
+diff -Naur festival.orig/src/modules/clustergen/HTS_vocoder_me.cc festival/src/modules/clustergen/HTS_vocoder_me.cc
+--- festival.orig/src/modules/clustergen/HTS_vocoder_me.cc 2013-02-18 16:10:50.000000000 +0100
++++ festival/src/modules/clustergen/HTS_vocoder_me.cc 2015-07-28 18:25:52.846670680 +0200
+@@ -90,8 +90,9 @@
+
+ HTS_VOCODER_ME_C_START;
+
++#include <math.h>
+ #include "./HTS_vocoder_me.h"
+-#include "../hts_engine/HTS_vocoder.c"
++#include "../hts_engine/HTS_vocoder.h"
+
+ /* HTS_Vocoder_initialize_me: initialize vocoder (mixed excitation) */
+ void HTS_Vocoder_initialize_me(HTS_Vocoder_ME * v_me,
+diff -Naur festival.orig/src/modules/hts_engine/HTS_vocoder.c festival/src/modules/hts_engine/HTS_vocoder.c
+--- festival.orig/src/modules/hts_engine/HTS_vocoder.c 2013-02-18 16:10:52.000000000 +0100
++++ festival/src/modules/hts_engine/HTS_vocoder.c 2015-07-28 18:26:22.680173336 +0200
+@@ -57,10 +57,12 @@
+
+ #include <math.h> /* for sqrt(),log(),exp(),pow(),cos() */
+
++//#include "HTS_vocoder.h"
++
+ /* hts_engine libraries */
+ #include "HTS_hidden.h"
+
+-static const double HTS_pade[21] = {
++const double HTS_pade[21] = {
+ 1.00000000000,
+ 1.00000000000,
+ 0.00000000000,
+@@ -85,7 +87,7 @@
+ };
+
+ /* HTS_movem: move memory */
+-static void HTS_movem(double *a, double *b, const int nitem)
++void HTS_movem(double *a, double *b, const int nitem)
+ {
+ long i = (long) nitem;
+
+@@ -101,7 +103,7 @@
+ }
+
+ /* HTS_mlsafir: sub functions for MLSA filter */
+-static double HTS_mlsafir(const double x, const double *b, const int m, const double a, const double aa, double *d)
++double HTS_mlsafir(const double x, const double *b, const int m, const double a, const double aa, double *d)
+ {
+ double y = 0.0;
+ int i;
+@@ -122,7 +124,7 @@
+ }
+
+ /* HTS_mlsadf1: sub functions for MLSA filter */
+-static double HTS_mlsadf1(double x, const double *b, const int m, const double a, const double aa, const int pd, double *d, const double *ppade)
++double HTS_mlsadf1(double x, const double *b, const int m, const double a, const double aa, const int pd, double *d, const double *ppade)
+ {
+ double v, out = 0.0, *pt;
+ int i;
+@@ -144,7 +146,7 @@
+ }
+
+ /* HTS_mlsadf2: sub functions for MLSA filter */
+-static double HTS_mlsadf2(double x, const double *b, const int m, const double a, const double aa, const int pd, double *d, const double *ppade)
++double HTS_mlsadf2(double x, const double *b, const int m, const double a, const double aa, const int pd, double *d, const double *ppade)
+ {
+ double v, out = 0.0, *pt;
+ int i;
+@@ -166,7 +168,7 @@
+ }
+
+ /* HTS_mlsadf: functions for MLSA filter */
+-static double HTS_mlsadf(double x, const double *b, const int m, const double a, const int pd, double *d)
++double HTS_mlsadf(double x, const double *b, const int m, const double a, const int pd, double *d)
+ {
+ const double aa = 1 - a * a;
+ const double *ppade = &(HTS_pade[pd * (pd + 1) / 2]);
+@@ -178,7 +180,7 @@
+ }
+
+ /* HTS_rnd: functions for random noise generation */
+-static double HTS_rnd(unsigned long *next)
++double HTS_rnd(unsigned long *next)
+ {
+ double r;
+
+@@ -189,7 +191,7 @@
+ }
+
+ /* HTS_nrandom: functions for gaussian random noise generation */
+-static double HTS_nrandom(HTS_Vocoder * v)
++double HTS_nrandom(HTS_Vocoder * v)
+ {
+ if (v->sw == 0) {
+ v->sw = 1;
+@@ -207,7 +209,7 @@
+ }
+
+ /* HTS_mceq: function for M-sequence random noise generation */
+-static int HTS_mseq(HTS_Vocoder * v)
++int HTS_mseq(HTS_Vocoder * v)
+ {
+ int x0, x28;
+
+@@ -229,7 +231,7 @@
+ }
+
+ /* HTS_mc2b: transform mel-cepstrum to MLSA digital fillter coefficients */
+-static void HTS_mc2b(double *mc, double *b, int m, const double a)
++void HTS_mc2b(double *mc, double *b, int m, const double a)
+ {
+ if (mc != b) {
+ if (a != 0.0) {
+@@ -244,7 +246,7 @@
+ }
+
+ /* HTS_b2bc: transform MLSA digital filter coefficients to mel-cepstrum */
+-static void HTS_b2mc(const double *b, double *mc, int m, const double a)
++void HTS_b2mc(const double *b, double *mc, int m, const double a)
+ {
+ double d, o;
+
+@@ -257,7 +259,7 @@
+ }
+
+ /* HTS_freqt: frequency transformation */
+-static void HTS_freqt(HTS_Vocoder * v, const double *c1, const int m1, double *c2, const int m2, const double a)
++void HTS_freqt(HTS_Vocoder * v, const double *c1, const int m1, double *c2, const int m2, const double a)
+ {
+ int i, j;
+ const double b = 1 - a * a;
+@@ -287,7 +289,7 @@
+ }
+
+ /* HTS_c2ir: The minimum phase impulse response is evaluated from the minimum phase cepstrum */
+-static void HTS_c2ir(const double *c, const int nc, double *h, const int leng)
++void HTS_c2ir(const double *c, const int nc, double *h, const int leng)
+ {
+ int n, k, upl;
+ double d;
+@@ -303,7 +305,7 @@
+ }
+
+ /* HTS_b2en: calculate frame energy */
+-static double HTS_b2en(HTS_Vocoder * v, const double *b, const int m, const double a)
++double HTS_b2en(HTS_Vocoder * v, const double *b, const int m, const double a)
+ {
+ int i;
+ double en = 0.0;
+@@ -330,7 +332,7 @@
+ }
+
+ /* HTS_ignorm: inverse gain normalization */
+-static void HTS_ignorm(double *c1, double *c2, int m, const double g)
++void HTS_ignorm(double *c1, double *c2, int m, const double g)
+ {
+ double k;
+ if (g != 0.0) {
+@@ -345,7 +347,7 @@
+ }
+
+ /* HTS_gnorm: gain normalization */
+-static void HTS_gnorm(double *c1, double *c2, int m, const double g)
++void HTS_gnorm(double *c1, double *c2, int m, const double g)
+ {
+ double k;
+ if (g != 0.0) {
+@@ -360,7 +362,7 @@
+ }
+
+ /* HTS_lsp2lpc: transform LSP to LPC */
+-static void HTS_lsp2lpc(HTS_Vocoder * v, double *lsp, double *a, const int m)
++void HTS_lsp2lpc(HTS_Vocoder * v, double *lsp, double *a, const int m)
+ {
+ int i, k, mh1, mh2, flag_odd;
+ double xx, xf, xff;
+@@ -451,7 +453,7 @@
+ }
+
+ /* HTS_gc2gc: generalized cepstral transformation */
+-static void HTS_gc2gc(HTS_Vocoder * v, double *c1, const int m1, const double g1, double *c2, const int m2, const double g2)
++void HTS_gc2gc(HTS_Vocoder * v, double *c1, const int m1, const double g1, double *c2, const int m2, const double g2)
+ {
+ int i, min, k, mk;
+ double ss1, ss2, cc;
+@@ -484,7 +486,7 @@
+ }
+
+ /* HTS_mgc2mgc: frequency and generalized cepstral transformation */
+-static void HTS_mgc2mgc(HTS_Vocoder * v, double *c1, const int m1, const double a1, const double g1, double *c2, const int m2, const double a2, const double g2)
++void HTS_mgc2mgc(HTS_Vocoder * v, double *c1, const int m1, const double a1, const double g1, double *c2, const int m2, const double a2, const double g2)
+ {
+ double a;
+
+@@ -502,7 +504,7 @@
+ }
+
+ /* HTS_lsp2mgc: transform LSP to MGC */
+-static void HTS_lsp2mgc(HTS_Vocoder * v, double *lsp, double *mgc, const int m, const double alpha)
++void HTS_lsp2mgc(HTS_Vocoder * v, double *lsp, double *mgc, const int m, const double alpha)
+ {
+ int i;
+ /* lsp2lpc */
+@@ -531,7 +533,7 @@
+ }
+
+ /* HTS_mglsadff: sub functions for MGLSA filter */
+-static double HTS_mglsadff(double x, const double *b, const int m, const double a, double *d)
++double HTS_mglsadff(double x, const double *b, const int m, const double a, double *d)
+ {
+ int i;
+
+@@ -550,7 +552,7 @@
+ }
+
+ /* HTS_mglsadf: sub functions for MGLSA filter */
+-static double HTS_mglsadf(double x, const double *b, const int m, const double a, const int n, double *d)
++double HTS_mglsadf(double x, const double *b, const int m, const double a, const int n, double *d)
+ {
+ int i;
+
+@@ -561,7 +563,7 @@
+ }
+
+ /* THS_check_lsp_stability: check LSP stability */
+-static void HTS_check_lsp_stability(double *lsp, size_t m)
++void HTS_check_lsp_stability(double *lsp, size_t m)
+ {
+ size_t i, j;
+ double tmp;
+@@ -595,7 +597,7 @@
+ }
+
+ /* HTS_lsp2en: calculate frame energy */
+-static double HTS_lsp2en(HTS_Vocoder * v, double *lsp, size_t m, double alpha)
++double HTS_lsp2en(HTS_Vocoder * v, double *lsp, size_t m, double alpha)
+ {
+ size_t i;
+ double en = 0.0;
+@@ -632,7 +634,7 @@
+ }
+
+ /* HTS_white_noise: return white noise */
+-static double HTS_white_noise(HTS_Vocoder * v)
++double HTS_white_noise(HTS_Vocoder * v)
+ {
+ if (v->gauss)
+ return (double) HTS_nrandom(v);
+@@ -641,7 +643,7 @@
+ }
+
+ /* HTS_ping_pulse: ping pulse using low-pass filter */
+-static void HTS_ping_pulse(HTS_Vocoder * v, const int ping_place, const double p, const int nlpf, const double *lpf)
++void HTS_ping_pulse(HTS_Vocoder * v, const int ping_place, const double p, const int nlpf, const double *lpf)
+ {
+ int i, j;
+ const double power = sqrt(p);
+@@ -652,7 +654,7 @@
+ }
+
+ /* HTS_ping_noise: ping noise using low-pass filter */
+-static void HTS_ping_noise(HTS_Vocoder * v, const int ping_place, const int nlpf, const double *lpf)
++void HTS_ping_noise(HTS_Vocoder * v, const int ping_place, const int nlpf, const double *lpf)
+ {
+ int i, j;
+ const double power = HTS_white_noise(v);
+@@ -667,7 +669,7 @@
+ }
+
+ /* HTS_Vocoder_initialize_excitation: initialize excitation */
+-static void HTS_Vocoder_initialize_excitation(HTS_Vocoder * v, size_t nlpf)
++void HTS_Vocoder_initialize_excitation(HTS_Vocoder * v, size_t nlpf)
+ {
+ size_t i;
+
+@@ -684,7 +686,7 @@
+ }
+
+ /* HTS_Vocoder_start_excitation: start excitation of each frame */
+-static void HTS_Vocoder_start_excitation(HTS_Vocoder * v, const double pitch, const int nlpf)
++void HTS_Vocoder_start_excitation(HTS_Vocoder * v, const double pitch, const int nlpf)
+ {
+ if (v->p1 != 0.0 && pitch != 0.0)
+ v->inc = (pitch - v->p1) * IPERIOD / v->fprd;
+@@ -699,7 +701,7 @@
+ }
+
+ /* HTS_Vocoder_get_excitation: get excitation of each sample */
+-static double HTS_Vocoder_get_excitation(HTS_Vocoder * v, const int fprd_index, const int iprd_index, const int nlpf, const double *lpf)
++double HTS_Vocoder_get_excitation(HTS_Vocoder * v, const int fprd_index, const int iprd_index, const int nlpf, const double *lpf)
+ {
+ double x;
+ int i, j;
+@@ -755,7 +757,7 @@
+ }
+
+ /* HTS_Vocoder_end_excitation: end excitation of each frame */
+-static void HTS_Vocoder_end_excitation(HTS_Vocoder * v, const int nlpf)
++void HTS_Vocoder_end_excitation(HTS_Vocoder * v, const int nlpf)
+ {
+ int i;
+
+@@ -771,7 +773,7 @@
+ }
+
+ /* HTS_Vocoder_postfilter_mcp: postfilter for MCP */
+-static void HTS_Vocoder_postfilter_mcp(HTS_Vocoder * v, double *mcp, const int m, double alpha, double beta)
++void HTS_Vocoder_postfilter_mcp(HTS_Vocoder * v, double *mcp, const int m, double alpha, double beta)
+ {
+ double e1, e2;
+ int k;
+@@ -797,7 +799,7 @@
+ }
+
+ /* HTS_Vocoder_postfilter_lsp: postfilter for LSP */
+-static void HTS_Vocoder_postfilter_lsp(HTS_Vocoder * v, double *lsp, size_t m, double alpha, double beta)
++void HTS_Vocoder_postfilter_lsp(HTS_Vocoder * v, double *lsp, size_t m, double alpha, double beta)
+ {
+ double e1, e2;
+ size_t i;
+diff -Naur festival.orig/src/modules/hts_engine/HTS_vocoder.h festival/src/modules/hts_engine/HTS_vocoder.h
+--- festival.orig/src/modules/hts_engine/HTS_vocoder.h 1970-01-01 01:00:00.000000000 +0100
++++ festival/src/modules/hts_engine/HTS_vocoder.h 2015-07-28 18:21:15.431802892 +0200
+@@ -0,0 +1,42 @@
++#ifndef HTS_VOCODER_H
++#define HTS_VOCODER_H
++
++/* hts_engine libraries */
++#include "HTS_hidden.h"
++
++void HTS_Vocoder_clear(HTS_Vocoder *v);
++void HTS_Vocoder_synthesize(HTS_Vocoder *v,size_t m,double lf0,double *spectrum,size_t nlpf,double *lpf,double alpha,double beta,double volume,double *rawdata,HTS_Audio *audio);
++void HTS_Vocoder_initialize(HTS_Vocoder *v,size_t m,size_t stage,HTS_Boolean use_log_gain,size_t rate,size_t fperiod);
++void HTS_Vocoder_postfilter_lsp(HTS_Vocoder *v,double *lsp,size_t m,double alpha,double beta);
++void HTS_Vocoder_postfilter_mcp(HTS_Vocoder *v,double *mcp,const int m,double alpha,double beta);
++void HTS_Vocoder_end_excitation(HTS_Vocoder *v,const int nlpf);
++double HTS_Vocoder_get_excitation(HTS_Vocoder *v,const int fprd_index,const int iprd_index,const int nlpf,const double *lpf);
++void HTS_Vocoder_start_excitation(HTS_Vocoder *v,const double pitch,const int nlpf);
++void HTS_Vocoder_initialize_excitation(HTS_Vocoder *v,size_t nlpf);
++void HTS_ping_noise(HTS_Vocoder *v,const int ping_place,const int nlpf,const double *lpf);
++void HTS_ping_pulse(HTS_Vocoder *v,const int ping_place,const double p,const int nlpf,const double *lpf);
++double HTS_white_noise(HTS_Vocoder *v);
++double HTS_lsp2en(HTS_Vocoder *v,double *lsp,size_t m,double alpha);
++void HTS_check_lsp_stability(double *lsp,size_t m);
++double HTS_mglsadf(double x,const double *b,const int m,const double a,const int n,double *d);
++double HTS_mglsadff(double x,const double *b,const int m,const double a,double *d);
++void HTS_lsp2mgc(HTS_Vocoder *v,double *lsp,double *mgc,const int m,const double alpha);
++void HTS_mgc2mgc(HTS_Vocoder *v,double *c1,const int m1,const double a1,const double g1,double *c2,const int m2,const double a2,const double g2);
++void HTS_gc2gc(HTS_Vocoder *v,double *c1,const int m1,const double g1,double *c2,const int m2,const double g2);
++void HTS_lsp2lpc(HTS_Vocoder *v,double *lsp,double *a,const int m);
++void HTS_gnorm(double *c1,double *c2,int m,const double g);
++void HTS_ignorm(double *c1,double *c2,int m,const double g);
++double HTS_b2en(HTS_Vocoder *v,const double *b,const int m,const double a);
++void HTS_c2ir(const double *c,const int nc,double *h,const int leng);
++void HTS_freqt(HTS_Vocoder *v,const double *c1,const int m1,double *c2,const int m2,const double a);
++void HTS_b2mc(const double *b,double *mc,int m,const double a);
++void HTS_mc2b(double *mc,double *b,int m,const double a);
++int HTS_mseq(HTS_Vocoder *v);
++double HTS_nrandom(HTS_Vocoder *v);
++double HTS_rnd(unsigned long *next);
++double HTS_mlsadf(double x,const double *b,const int m,const double a,const int pd,double *d);
++double HTS_mlsadf2(double x,const double *b,const int m,const double a,const double aa,const int pd,double *d,const double *ppade);
++double HTS_mlsadf1(double x,const double *b,const int m,const double a,const double aa,const int pd,double *d,const double *ppade);
++double HTS_mlsafir(const double x,const double *b,const int m,const double a,const double aa,double *d);
++void HTS_movem(double *a,double *b,const int nitem);
++#endif
diff --git a/festival-gcc47.patch b/festival-gcc47.patch
new file mode 100644
index 000000000000..e09508b3fad8
--- /dev/null
+++ b/festival-gcc47.patch
@@ -0,0 +1,59 @@
+This patch allows compiling of festival on gcc 4.7 and clang 3.0.
+Both these compilers are stricter of unqualified method calls in
+templates than previous versions of gcc.
+This patch should not alter the code in a substantive way as it
+only qualifies method calls which were assumed in previous compilers.
+No copyright subsists in this patch as it is too trivial.
+
+Author: Peter Drysdale <drysdalepete@gmail.com>
+
+--- speech-tools-2.1~release.orig/base_class/EST_TSimpleVector.cc
++++ speech_tools/base_class/EST_TSimpleVector.cc
+@@ -43,5 +43,6 @@
+ #include "EST_TSimpleVector.h"
+ #include "EST_matrix_support.h"
+ #include <fstream>
++#include <cstring>
+ #include "EST_cutils.h"
+ #include <string.h>
+
+ template<class T> void EST_TSimpleVector<T>::copy(const EST_TSimpleVector<T> &a)
+@@ -52,7 +53,7 @@ template<class T> void EST_TSimpleVector
+ if (this->p_column_step==1 && a.p_column_step==1)
+ {
+ resize(a.n(), FALSE);
+- memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T));
++ std::memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T));
+ }
+ else
+ ((EST_TVector<T> *)this)->copy(a);
+@@ -141,7 +142,7 @@ template<class T> EST_TSimpleVector<T> &
+ template<class T> void EST_TSimpleVector<T>::zero()
+ {
+ if (this->p_column_step==1)
+- memset((void *)(this->p_memory), 0, this->n() * sizeof(T));
++ std::memset((void *)(this->p_memory), 0, this->n() * sizeof(T));
+ else
+ ((EST_TVector<T> *)this)->fill(*this->def_val);
+ }
+
+--- speech-tools-2.1~release.orig/base_class/EST_TSimpleMatrix.cc
++++ speech_tools/base_class/EST_TSimpleMatrix.cc
+@@ -44,5 +44,6 @@
+ #include "EST_TVector.h"
+ #include <fstream>
+ #include <iostream>
++#include <cstring>
+ #include "EST_cutils.h"
+ #include <string.h>
+
+ template<class T>
+@@ -52,7 +53,7 @@ void EST_TSimpleMatrix<T>::copy_data(con
+ {
+
+ if (!a.p_sub_matrix && !this->p_sub_matrix)
+- memcpy((void *)&this->a_no_check(0,0),
++ std::memcpy((void *)&this->a_no_check(0,0),
+ (const void *)&a.a_no_check(0,0),
+ this->num_rows()*this->num_columns()*sizeof(T)
+ );
diff --git a/festival-shared-build.patch b/festival-shared-build.patch
new file mode 100644
index 000000000000..0643d6163f6f
--- /dev/null
+++ b/festival-shared-build.patch
@@ -0,0 +1,72 @@
+--- speech_tools/config/rules/defaults.mak.orig 2007-03-16 12:39:12.000000000 -0400
++++ speech_tools/config/rules/defaults.mak 2007-03-16 12:39:19.000000000 -0400
+@@ -69,15 +69,21 @@
+ MADE_FROM_ABOVE:=$(N)
+ endif
+
++ifneq ($(SHARED),0)
++ LIBTYPE=so
++else
++ LIBTYPE=a
++endif
++
+ ifndef PROJECT_LIBDEPS
+- PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).a)
++ PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE))
+ endif
+ ifndef PROJECT_LIBS
+ PROJECT_LIBS = $(foreach l,$(PROJECT_LIBRARIES),-L$(PROJECT_LIBRARY_DIR_$(l)) -l$(l))
+ endif
+
+ ifndef REQUIRED_LIBDEPS
+- REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).a)
++ REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE))
+ endif
+ ifndef REQUIRED_LIBS
+ REQUIRED_LIBS = $(foreach l,$(REQUIRED_LIBRARIES),-L$(REQUIRED_LIBRARY_DIR_$(l)) -l$(l))
+--- festival/config/project.mak.orig 2007-03-16 13:01:40.000000000 -0400
++++ festival/config/project.mak 2007-03-16 13:02:24.000000000 -0400
+@@ -83,6 +83,8 @@
+ PROJECT_LIBRARY_DIR_Festival = $(TOP)/src/lib
+ PROJECT_DEFAULT_LIBRARY = Festival
+
++PROJECT_LIBRARY_VERSION_Festival = $(PROJECT_VERSION).0
++
+ # Libraries used from other projects
+
+ REQUIRED_LIBRARIES = estools estbase eststring
+diff -p -up festival/speech_tools/config/compilers/gcc_defaults.mak.bettersoname festival/speech_tools/config/compilers/gcc_defaults.mak
+--- speech_tools/config/compilers/gcc_defaults.mak.bettersoname 2010-12-06 10:25:35.000000000 +0100
++++ speech_tools/config/compilers/gcc_defaults.mak 2010-12-06 10:27:51.000000000 +0100
+@@ -81,7 +81,7 @@ SHARED_CXXFLAGS = -fPIC
+ SHARED_LINKFLAGS =
+
+ ifndef GCC_MAKE_SHARED_LIB
+- MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX
++ MAKE_SHARED_LIB = $(CXX) -shared -o XXX -Wl,-soname,YYY
+ else
+ MAKE_SHARED_LIB = $(GCC_MAKE_SHARED_LIB)
+ endif
+diff -p -up festival/speech_tools/config/rules/library.mak.bettersoname festival/speech_tools/config/rules/library.mak
+--- speech_tools/config/rules/library.mak.bettersoname 2001-04-04 13:55:32.000000000 +0200
++++ speech_tools/config/rules/library.mak 2010-12-06 10:25:35.000000000 +0100
+@@ -103,14 +103,14 @@ endif
+ ###########################################################################
+
+ lib%.so : lib%.a
+- @echo Make Shared Library $*
++ @echo Make Shared Library $(*F)
+ @if [ ! -d shared_space ] ; then mkdir shared_space ; else $(RM) -f shared_space/*.o ; fi
+ @(cd shared_space ; $(AR) x ../$< )
+- @echo Link Shared Library $*
+- if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$*)" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\
+- $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$*),$(MAKE_SHARED_LIB)) shared_space/*.o $(PROJECT_LIBRARY_USES_$*:%=-L. -l%) $$libs
++ @echo Link Shared Library $(*F)
++ if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$(*F))" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\
++ $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$(*F)),$(subst YYY,$(@F).$(PROJECT_LIBRARY_VERSION_$(*F)),$(MAKE_SHARED_LIB))) shared_space/*.o $(PROJECT_LIBRARY_USES_$(*F):%=-L. -l%) $$libs
+ @$(RM) -f shared_space/*.o $@
+- @ln -s $@.$(PROJECT_LIBRARY_VERSION_$*) $@
++ @ln -s $(@F).$(PROJECT_LIBRARY_VERSION_$(*F)) $@
+
+ ###########################################################################
+ ## ##
diff --git a/speechconfig.patch b/speechconfig.patch
new file mode 100644
index 000000000000..666db47632b8
--- /dev/null
+++ b/speechconfig.patch
@@ -0,0 +1,129 @@
+diff -aur speech_tools.old//config/compilers/jdk.mak speech_tools/config/compilers/jdk.mak
+--- speech_tools.old//config/compilers/jdk.mak 2001-04-04 19:55:32.000000000 +0800
++++ speech_tools/config/compilers/jdk.mak 2010-12-08 12:14:56.076668109 +0800
+@@ -52,7 +52,7 @@
+ endif
+ endif
+
+-JAVAFLAGS = -depend
++JAVAFLAGS =
+
+ DEBUG_JAVAFLAGS = -g
+
+diff -aur speech_tools.old//config/config.in speech_tools/config/config.in
+--- speech_tools.old//config/config.in 2008-10-29 03:20:49.000000000 +0800
++++ speech_tools/config/config.in 2010-12-08 12:17:50.110001443 +0800
+@@ -15,7 +15,7 @@
+ ## You may need to set this explicitly if automounter or NFS
+ ## side effects cause problems
+
+-EST_HOME := $(shell (cd $(EST); pwd))
++EST_HOME := /usr
+
+ ###########################################################################
+ ## System type.
+@@ -28,14 +28,14 @@
+ ##
+ ## Examples: sparc_SunOS5 intel_Linux2.0
+
+-SYSTEM_TYPE=$(MACHINETYPE)_$(OSTYPE)$(OSREV)
++SYSTEM_TYPE=Linux
+
+ ###########################################################################
+ ## Compiler.
+ ## The definitions are in compilers/$(COMPILER).mak
+ ## Examples: gcc suncc egcs gcc28
+
+-COMPILER=@COMPILERTYPE@
++COMPILER=gcc
+
+ ###########################################################################
+ ## Java system to use if you include the Java interface.
+@@ -61,7 +61,7 @@
+ # VERBOSE=1
+ #DEBUG=1
+ # PROFILE=gprof
+-#SHARED=2
++SHARED=2
+
+ ## Directory specific selections which override the above
+
+@@ -98,7 +98,7 @@
+ ## It may not work under all systems, so may be optionally omitted.
+ INCLUDE_MODULES += EDITLINE
+
+-TERMCAPLIB = @TERMCAPLIB@
++TERMCAPLIB =
+ # speech recognition
+ #INCLUDE_MODULES += ASR
+
+@@ -175,6 +175,6 @@
+ CONFIG_WRAPPER_LANGUAGES = PYTHON
+
+ # Language specific includes should be set to correct site paths
+-CONFIG_PYTHON_INCLUDES= -I/usr/include/python2.2/
++CONFIG_PYTHON_INCLUDES= -I/usr/include/python2.7/
+ ##
+ ###################################################################
+Only in speech_tools/config: config.in.orig
+diff -aur speech_tools.old//config/systems/default.mak speech_tools/config/systems/default.mak
+--- speech_tools.old//config/systems/default.mak 2005-07-17 21:06:49.000000000 +0800
++++ speech_tools/config/systems/default.mak 2010-12-08 12:14:56.076668109 +0800
+@@ -40,7 +40,7 @@
+ ###########################################################################
+ ## Installation directories
+
+-INSTALL_PREFIX=/usr/local
++INSTALL_PREFIX=/usr
+
+ BINDIR=$(INSTALL_PREFIX)/bin
+ LIBDIR=$(INSTALL_PREFIX)/lib
+@@ -63,8 +63,8 @@
+ ###########################################################################
+ ## Where to find Enlightenment Speech Demon
+
+-ESD_INCLUDE = /usr/local/include
+-ESD_LIB = /usr/local/lib
++ESD_INCLUDE = /usr/include
++ESD_LIB = /usr/lib
+
+ ###########################################################################
+ ## Where to find X11
+@@ -75,14 +75,14 @@
+ ###########################################################################
+ ## TCL support
+
+-TCL_INCLUDE = /usr/local/include
+-TCL_LIB = /usr/local/lib
+-TCL_LIBRARY = -ltcl7.6
++TCL_INCLUDE = /usr/include
++TCL_LIB = /usr/lib
++TCL_LIBRARY = -ltcl
+
+ ###########################################################################
+ ## Efence library for malloc debugging
+
+-EFENCE_LIB = /usr/local/lib
++EFENCE_LIB = /usr/lib
+
+ ###########################################################################
+ ## Commands.
+diff -aur speech_tools.old//config/systems/Linux.mak speech_tools/config/systems/Linux.mak
+--- speech_tools.old//config/systems/Linux.mak 2001-04-04 19:55:32.000000000 +0800
++++ speech_tools/config/systems/Linux.mak 2010-12-08 12:14:56.076668109 +0800
+@@ -40,13 +40,13 @@
+
+ include $(EST)/config/systems/default.mak
+
+-DEFAULT_JAVA_HOME=/usr/lib/jdk-1.1.6
++DEFAULT_JAVA_HOME=/usr/lib/jvm/java-6-openjdk
+ JAVA=/usr/bin/java
+ JAVAC=/usr/bin/javac
+ JAVAH=/usr/bin/javah
+
+ TCL_LIBRARY = -ltcl
+-OS_LIBS = -ldl
++OS_LIBS = -ldl -lncurses
+
+ ## the native audio module for this type of system
+ NATIVE_AUDIO_MODULE = LINUX16