diff --git a/festival-1.96-bettersonamehack.patch b/festival-1.96-bettersonamehack.patch deleted file mode 100644 index f78104a..0000000 --- a/festival-1.96-bettersonamehack.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- speech_tools/config/rules/library.mak.soname 2001-04-04 07:55:32.000000000 -0400 -+++ speech_tools/config/rules/library.mak 2007-03-16 14:13:59.000000000 -0400 -@@ -103,14 +103,14 @@ - ########################################################################### - - 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)) $@ - - ########################################################################### - ## ## ---- speech_tools/config/compilers/gcc_defaults.mak.soname 2007-03-16 12:43:31.000000000 -0400 -+++ speech_tools/config/compilers/gcc_defaults.mak 2007-03-16 13:30:11.000000000 -0400 -@@ -78,7 +78,7 @@ - SHARED_LINKFLAGS = -fno-shared-data - - ifndef GCC_MAKE_SHARED_LIB -- MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX -+ MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX -Wl,-soname,YYY - else - MAKE_SHARED_LIB = $(GCC_MAKE_SHARED_LIB) - endif diff --git a/festival-1.96-gcc43.patch b/festival-1.96-gcc43.patch deleted file mode 100644 index 17f4c23..0000000 --- a/festival-1.96-gcc43.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -up festival/src/modules/Text/text_modes.cc.gcc43 festival/src/modules/Text/text_modes.cc ---- festival/src/modules/Text/text_modes.cc.gcc43 2008-02-22 21:50:33.000000000 -0500 -+++ festival/src/modules/Text/text_modes.cc 2008-02-22 21:50:41.000000000 -0500 -@@ -59,8 +59,8 @@ static void um_apply_filter(const EST_St - void tts_file_user_mode(LISP filename, LISP params) - { - -- volatile EST_String tmpname = make_tmp_filename(); -- volatile EST_String inname = get_c_string(filename); -+ EST_String tmpname = make_tmp_filename(); -+ EST_String inname = get_c_string(filename); - volatile EST_String filter; - volatile EST_TokenStream ts; - volatile LISP func; -diff -up speech_tools/base_class/EST_TSimpleVector.cc.gcc43 festival/speech_tools/base_class/EST_TSimpleVector.cc ---- speech_tools/base_class/EST_TSimpleVector.cc.gcc43 2006-07-06 08:57:18.000000000 -0400 -+++ speech_tools/base_class/EST_TSimpleVector.cc 2008-02-22 21:43:03.000000000 -0500 -@@ -43,6 +43,7 @@ - #include "EST_TSimpleVector.h" - #include "EST_matrix_support.h" - #include -+#include - #include "EST_cutils.h" - - template void EST_TSimpleVector::copy(const EST_TSimpleVector &a) -diff -up speech_tools/base_class/EST_TSimpleMatrix.cc.gcc43 festival/speech_tools/base_class/EST_TSimpleMatrix.cc ---- speech_tools/base_class/EST_TSimpleMatrix.cc.gcc43 2004-09-30 08:53:35.000000000 -0400 -+++ speech_tools/base_class/EST_TSimpleMatrix.cc 2008-02-22 21:43:03.000000000 -0500 -@@ -44,6 +44,7 @@ - #include "EST_TVector.h" - #include - #include -+#include - #include "EST_cutils.h" - - template diff --git a/festival-1.96-gcc44.patch b/festival-1.96-gcc44.patch deleted file mode 100644 index e6f43e3..0000000 --- a/festival-1.96-gcc44.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up festival/speech_tools/speech_class/EST_wave_io.cc.gcc44 festival/speech_tools/speech_class/EST_wave_io.cc ---- speech_tools/speech_class/EST_wave_io.cc.gcc44 2009-02-26 17:26:58.672421948 -0500 -+++ speech_tools/speech_class/EST_wave_io.cc 2009-02-26 17:50:02.065661124 -0500 -@@ -68,7 +68,7 @@ static const char *NIST_END_SIG = "end_h - - int nist_get_param_int(const char *hdr, const char *field, int def_val) - { -- char *p; -+ const char *p; - int val; - - if (((p=strstr(hdr,field)) != NULL) && -@@ -84,7 +84,8 @@ int nist_get_param_int(const char *hdr, - - char *nist_get_param_str(const char *hdr, const char *field, const char *def_val) - { -- char *p,*val; -+ const char *p; -+ char *val; - int size; - - if (((p=strstr(hdr,field)) != NULL) && diff --git a/festival-1.96-kludge-etcpath-into-libarch.patch b/festival-1.96-kludge-etcpath-into-libarch.patch deleted file mode 100644 index 3b87f54..0000000 --- a/festival-1.96-kludge-etcpath-into-libarch.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff -ur festival.orig/speech_tools/main/siod_main.cc festival/speech_tools/main/siod_main.cc ---- speech_tools/main/siod_main.cc 2004-09-30 08:53:36.000000000 -0400 -+++ speech_tools/main/siod_main.cc 2007-03-13 00:49:35.000000000 -0400 -@@ -224,10 +224,10 @@ - cons(flocons(subminor),NIL)))); - - EST_Pathname etcdircommon = est_libdir; -- etcdircommon += "etc"; -+ etcdircommon += "etc/"; - -- EST_Pathname etcdir = etcdircommon; -- etcdir += est_ostype; -+ EST_Pathname etcdir = {{HORRIBLELIBARCHKLUDGE}}; -+ etcdir += "festival/etc/"; - - // Modify my PATH to include these directories - siod_set_lval("etc-path",cons(rintern(etcdir), -diff -ur festival.orig/src/arch/festival/festival.cc festival/src/arch/festival/festival.cc ---- festival.orig/src/arch/festival/festival.cc 2007-03-13 00:41:42.000000000 -0400 -+++ festival/src/arch/festival/festival.cc 2007-03-13 00:47:55.000000000 -0400 -@@ -349,10 +349,10 @@ - proclaim_module("mplayeraudio"); - - // Add etc-dir path and machine specific directory etc/$OSTYPE -- char *etcdir = walloc(char,strlen(festival_libdir)+strlen("etc/")+ -- strlen(FTOSTYPE)+3); -- sprintf(etcdir,"%s/etc/%s/",festival_libdir,FTOSTYPE); -- char *etcdircommon = walloc(char,strlen(festival_libdir)+strlen("etc/")+3); -+ char *etcdir = walloc(char,strlen({{HORRIBLELIBARCHKLUDGE}})+ -+ strlen("etc/festival/")+2); -+ sprintf(etcdir,"%s/festival/etc/",{{HORRIBLELIBARCHKLUDGE}}); -+ char *etcdircommon = walloc(char,strlen(festival_libdir)+strlen("etc/")+2); - sprintf(etcdircommon,"%s/etc/",festival_libdir); - - // Modify my PATH to include these directories diff --git a/festival-1.96-main-shared-build.patch b/festival-1.96-main-shared-build.patch deleted file mode 100644 index 092403d..0000000 --- a/festival-1.96-main-shared-build.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- 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 -@@ -84,6 +84,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 --git a/festival-1.96-no-shared-data.patch b/festival-1.96-no-shared-data.patch deleted file mode 100644 index b23bee9..0000000 --- a/festival-1.96-no-shared-data.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up festival/speech_tools/config/compilers/gcc_defaults.mak.no-shared-data festival/speech_tools/config/compilers/gcc_defaults.mak ---- speech_tools/config/compilers/gcc_defaults.mak.no-shared-data 2008-02-22 13:45:50.000000000 -0500 -+++ speech_tools/config/compilers/gcc_defaults.mak 2008-02-22 13:46:24.000000000 -0500 -@@ -73,12 +73,12 @@ PROFILE_gprof_CCFLAGS = -pg - PROFILE_gprof_CXXFLAGS = -pg - PROFILE_gprof_LINKFLAGS = -pg - --SHARED_CCFLAGS = -fPIC -fno-shared-data --SHARED_CXXFLAGS = -fPIC -fno-shared-data --SHARED_LINKFLAGS = -fno-shared-data -+SHARED_CCFLAGS = -fPIC -+SHARED_CXXFLAGS = -fPIC -+SHARED_LINKFLAGS = - - ifndef GCC_MAKE_SHARED_LIB -- MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX -Wl,-soname,YYY -+ MAKE_SHARED_LIB = $(CXX) -shared -o XXX -Wl,-soname,YYY - else - MAKE_SHARED_LIB = $(GCC_MAKE_SHARED_LIB) - endif diff --git a/festival-1.96-speechtools-1.2.96-beta+awb.patch b/festival-1.96-speechtools-1.2.96-beta+awb.patch deleted file mode 100644 index 46e5ec4..0000000 --- a/festival-1.96-speechtools-1.2.96-beta+awb.patch +++ /dev/null @@ -1,1227 +0,0 @@ -diff -ur festival/speech_tools.old/grammar/ngram/EST_Ngrammar.cc festival/speech_tools/grammar/ngram/EST_Ngrammar.cc ---- speech_tools.old/grammar/ngram/EST_Ngrammar.cc 2004-09-30 08:53:36.000000000 -0400 -+++ speech_tools/grammar/ngram/EST_Ngrammar.cc 2006-12-11 17:36:10.000000000 -0500 -@@ -306,7 +306,7 @@ - // not right - just print out, then recurse through children - // change to use 'backoff_traverse' - -- int k; -+ EST_Litem *k; - double freq; - EST_String name; - for (k=p_pdf.item_start(); -@@ -373,7 +373,7 @@ - { - - // recursively delete this state and all its children -- int k; -+ EST_Litem *k; - double freq; - EST_String name; - for (k=p_pdf.item_start(); -@@ -456,7 +456,8 @@ - - void EST_BackoffNgrammarState::frequency_of_frequencies(EST_DVector &ff) - { -- int k,max=ff.n(); -+ int max=ff.n(); -+ EST_Litem *k; - double freq; - EST_String name; - for (k=p_pdf.item_start(); -@@ -1585,7 +1586,7 @@ - // remove any branches with zero frequency count - - // find children of this state with zero freq and zap them -- int k; -+ EST_Litem *k; - double freq; - EST_String name; - for (k=start_state->pdf_const().item_start(); -@@ -2324,7 +2325,8 @@ - backoff_representation->print_freqs(os,p_order); - else - { -- int i,j,k; -+ int i,j; -+ EST_Litem *k; - EST_IVector window(p_order-1); - - for (i=0; i < p_num_states; i++) -@@ -2665,7 +2667,7 @@ - function(start_state,params); - - // and recurse down the tree -- int k; -+ EST_Litem *k; - double freq; - EST_String name; - for (k=start_state->pdf_const().item_start(); -@@ -2696,7 +2698,7 @@ - { - // and recurse down the tree if we haven't - // reached the level yet -- int k; -+ EST_Litem *k; - double freq; - EST_String name; - -diff -ur festival/speech_tools.old/grammar/ngram/EST_PST.cc festival/speech_tools/grammar/ngram/EST_PST.cc ---- speech_tools.old/grammar/ngram/EST_PST.cc 2004-09-30 08:53:36.000000000 -0400 -+++ speech_tools/grammar/ngram/EST_PST.cc 2006-12-11 17:36:10.000000000 -0500 -@@ -71,7 +71,8 @@ - // Base -- print from pd - EST_String s; - double freq; -- for (int i = pd.item_start(); -+ EST_Litem *i; -+ for (i = pd.item_start(); - !pd.item_end(i); - i=pd.item_next(i)) - { -@@ -98,7 +99,7 @@ - EST_String s; - double prob; - os << get_path() << " :"; -- for (int i = pd.item_start(); !pd.item_end(i) ; i=pd.item_next(i)) -+ for (EST_Litem *i = pd.item_start(); !pd.item_end(i) ; i=pd.item_next(i)) - { - pd.item_prob(i,s,prob); - os << " " << s << " " << prob; -diff -ur festival/speech_tools.old/grammar/ngram/freqsmooth.cc festival/speech_tools/grammar/ngram/freqsmooth.cc ---- speech_tools.old/grammar/ngram/freqsmooth.cc 2004-09-30 08:53:36.000000000 -0400 -+++ speech_tools/grammar/ngram/freqsmooth.cc 2006-12-11 17:36:10.000000000 -0500 -@@ -74,7 +74,8 @@ - EST_Ngrammar &ngram) - { - // Build all the backoff grammars back to uni-grams -- int i,j,k,l; -+ int i,j,l; -+ EST_Litem *k; - - for (i=0; i < ngram.order()-1; i++) - backoff_ngrams[i].init(i+1,EST_Ngrammar::dense, -@@ -110,7 +111,8 @@ - { - // For all ngrams which are too infrequent, adjust their - // frequencies based on their backoff probabilities -- int i,j; -+ int i; -+ EST_Litem *j; - double occurs; - double backoff_prob; - -diff -ur festival/speech_tools.old/grammar/ngram/ngrammar_aux.cc festival/speech_tools/grammar/ngram/ngrammar_aux.cc ---- speech_tools.old/grammar/ngram/ngrammar_aux.cc 2004-09-30 08:53:36.000000000 -0400 -+++ speech_tools/grammar/ngram/ngrammar_aux.cc 2006-12-11 17:36:10.000000000 -0500 -@@ -117,7 +117,7 @@ - - void make_f_of_f(EST_BackoffNgrammarState *s,void *params) - { -- int k; -+ EST_Litem *k; - double freq; - EST_String name; - -@@ -138,7 +138,7 @@ - - void get_max_f(EST_BackoffNgrammarState *s,void *params) - { -- int k; -+ EST_Litem *k; - double freq; - EST_String name; - -@@ -158,7 +158,7 @@ - - void map_f_of_f(EST_BackoffNgrammarState *s,void *params) - { -- int k; -+ EST_Litem *k; - double freq; - EST_String name; - -@@ -184,7 +184,7 @@ - - void zero_small_f(EST_BackoffNgrammarState *s,void *params) - { -- int k; -+ EST_Litem *k; - double freq; - EST_String name; - -@@ -204,7 +204,8 @@ - - void frequency_of_frequencies(EST_DVector &ff, EST_Ngrammar &n,int this_order) - { -- int i,k,size; -+ int i,size; -+ EST_Litem *k; - double max=0.0; - - // if ff has zero size, do complete frequency of frequencies -@@ -302,8 +303,8 @@ - - void map_frequencies(EST_Ngrammar &n, const EST_DVector &map, const int this_order) - { -- int i,k; -- -+ int i; -+ EST_Litem *k; - - switch(n.representation()) - { -diff -ur festival/speech_tools.old/grammar/ngram/ngrammar_io.cc festival/speech_tools/grammar/ngram/ngrammar_io.cc ---- speech_tools.old/grammar/ngram/ngrammar_io.cc 2004-09-30 08:53:36.000000000 -0400 -+++ speech_tools/grammar/ngram/ngrammar_io.cc 2006-12-11 17:36:10.000000000 -0500 -@@ -281,7 +281,8 @@ - load_ngram_cstr_bin(const EST_String filename, EST_Ngrammar &n) - { - EST_TokenStream ts; -- int i,j,k,order; -+ int i,j,order; -+ EST_Litem *k; - int num_entries; - double approx_num_samples = 0.0; - long freq_data_start, freq_data_end; -@@ -407,7 +408,7 @@ - save_ngram_htk_ascii_sub(const EST_String &word, ostream *ost, - EST_Ngrammar &n, double floor) - { -- int k; -+ EST_Litem *k; - EST_String name; - double freq; - EST_StrVector this_ngram(2); // assumes bigram -@@ -734,7 +735,8 @@ - // awb's format - (void)trace; - ostream *ost; -- int i,k; -+ int i; -+ EST_Litem *k; - - if (filename == "-") - ost = &cout; -@@ -831,7 +833,8 @@ - if (n.representation() == EST_Ngrammar::sparse) - return misc_write_error; - -- int i,k; -+ int i; -+ EST_Litem *k; - FILE *ofd; - double lfreq = -1; - double count = -1; -diff -ur festival/speech_tools.old/grammar/wfst/wfst_train.cc festival/speech_tools/grammar/wfst/wfst_train.cc ---- speech_tools.old/grammar/wfst/wfst_train.cc 2005-07-26 18:37:36.000000000 -0400 -+++ speech_tools/grammar/wfst/wfst_train.cc 2006-12-11 17:36:10.000000000 -0500 -@@ -315,7 +315,8 @@ - LISP *ssplits; - gc_protect(&splits); - EST_String sname; -- int b,best_b,i; -+ int b,best_b; -+ EST_Litem *i; - int num_pdfs; - double best_score, score, sfreq; - -@@ -390,7 +391,7 @@ - // Find score of (a+b) vs (all-(a+b)) - EST_DiscreteProbDistribution ab(a); - EST_DiscreteProbDistribution all_but_ab(all); -- int i; -+ EST_Litem *i; - EST_String sname; - double sfreq, score; - for (i=b.item_start(); !b.item_end(i); -@@ -522,7 +523,7 @@ - EST_DiscreteProbDistribution pdf_split(&wfst.in_symbols()); - EST_DiscreteProbDistribution pdf_remain(&wfst.in_symbols()); - int in, tostate, id; -- int i; -+ EST_Litem *i; - double sfreq; - EST_String sname; - -diff -ur festival/speech_tools.old/include/EST_simplestats.h festival/speech_tools/include/EST_simplestats.h ---- speech_tools.old/include/EST_simplestats.h 2004-04-30 12:56:49.000000000 -0400 -+++ speech_tools/include/EST_simplestats.h 2006-12-11 17:36:10.000000000 -0500 -@@ -47,6 +47,8 @@ - #include "EST_TKVL.h" - #include "EST_types.h" - -+typedef size_t int_iter; -+ - /** A class for managing mapping string names to integers and back again, - mainly used for representing alphabets in n-grams and grammars etc. - -@@ -249,7 +251,8 @@ - /// Add this observation, may specify number of occurrences - void cumulate(const EST_String &s,double count=1); - /// Add this observation, i must be with in EST\_Discrete range -- void cumulate(const int i,double count=1); -+ void cumulate(EST_Litem *i,double count=1); -+ void cumulate(int i,double count=1); - /// Return the most probable member of the distribution - const EST_String &most_probable(double *prob = NULL) const; - /** Return the entropy of the distribution -@@ -265,17 +268,18 @@ - /// - double frequency(const int i) const; - /// Used for iterating through members of the distribution -- int item_start() const; -+ EST_Litem *item_start() const; - /// Used for iterating through members of the distribution -- int item_next(int idx) const; -+ EST_Litem *item_next(EST_Litem *idx) const; - /// Used for iterating through members of the distribution -- int item_end(int idx) const; -+ int item_end(EST_Litem *idx) const; -+ - /// During iteration returns name given index -- const EST_String &item_name(int idx) const; -+ const EST_String &item_name(EST_Litem *idx) const; - /// During iteration returns name and frequency given index -- void item_freq(int idx,EST_String &s,double &freq) const; -+ void item_freq(EST_Litem *idx,EST_String &s,double &freq) const; - /// During iteration returns name and probability given index -- void item_prob(int idx,EST_String &s,double &prob) const; -+ void item_prob(EST_Litem *idx,EST_String &s,double &prob) const; - - /// Returns discrete vocabulary of distribution - inline const EST_Discrete *const get_discrete() const { return discrete; }; -@@ -288,11 +292,13 @@ - accordingly. This is used when smoothing frequencies. - */ - void set_frequency(int i,double c); -+ void set_frequency(EST_Litem *i,double c); - - /// Sets the frequency of named item, without modifying {\tt num\_samples}. - void override_frequency(const EST_String &s,double c); - /// Sets the frequency of named item, without modifying {\tt num\_samples}. - void override_frequency(int i,double c); -+ void override_frequency(EST_Litem *i,double c); - - /** Sets the number of samples. Care should be taken on setting this - as it will affect how probabilities are calculated. -diff -ur festival/speech_tools.old/include/EST_Track.h festival/speech_tools/include/EST_Track.h ---- speech_tools.old/include/EST_Track.h 2004-05-29 14:34:40.000000000 -0400 -+++ speech_tools/include/EST_Track.h 2007-02-13 00:12:53.000000000 -0500 -@@ -61,6 +61,7 @@ - tff_htk, - tff_htk_fbank, - tff_htk_mfcc, -+ tff_htk_mfcc_e, - tff_htk_user, - tff_htk_discrete, - tff_xmg, -diff -ur festival/speech_tools.old/include/EST_TSimpleVector.h festival/speech_tools/include/EST_TSimpleVector.h ---- speech_tools.old/include/EST_TSimpleVector.h 2006-07-06 08:57:24.000000000 -0400 -+++ speech_tools/include/EST_TSimpleVector.h 2006-09-27 09:19:35.000000000 -0400 -@@ -60,6 +60,9 @@ - EST_TSimpleVector(const EST_TSimpleVector &v); - /// "size" constructor - EST_TSimpleVector(int n): EST_TVector(n) {}; -+ /// memory constructor -+ EST_TSimpleVector(int n, T* memory, int offset=0, -+ int free_when_destroyed=0): EST_TVector(n,memory) {}; - - /// resize vector - void resize(int n, int set=1); -diff -ur festival/speech_tools.old/include/EST_Wagon.h festival/speech_tools/include/EST_Wagon.h ---- speech_tools.old/include/EST_Wagon.h 2006-08-11 18:39:02.000000000 -0400 -+++ speech_tools/include/EST_Wagon.h 2006-12-02 11:44:48.000000000 -0500 -@@ -239,8 +239,7 @@ - extern EST_FMatrix wgn_DistMatrix; - extern EST_Track wgn_VertexTrack; - extern EST_Track wgn_UnitTrack; --extern int wgn_VertexTrack_start; --extern int wgn_VertexTrack_end; -+extern EST_Track wgn_VertexFeats; - - void wgn_load_datadescription(EST_String fname,LISP ignores); - void wgn_load_dataset(WDataSet &ds,EST_String fname); -diff -ur festival/speech_tools.old/lib/siod/siod.scm festival/speech_tools/lib/siod/siod.scm ---- speech_tools.old/lib/siod/siod.scm 2003-03-31 09:28:24.000000000 -0500 -+++ speech_tools/lib/siod/siod.scm 2006-12-11 17:36:10.000000000 -0500 -@@ -209,7 +209,13 @@ - (defun append2 (a b) - (if (null a) - b -- (cons (car a) (append2 (cdr a) b)))) -+ (begin -+ (let ((x (reverse a)) -+ (y b)) -+ (while x -+ (set! y (cons (car x) y)) -+ (set! x (cdr x))) -+ y)))) - - (defun rplacd (a b) - "(replacd A B) -diff -ur festival/speech_tools.old/main/wagon_main.cc festival/speech_tools/main/wagon_main.cc ---- speech_tools.old/main/wagon_main.cc 2006-09-10 17:33:18.000000000 -0400 -+++ speech_tools/main/wagon_main.cc 2006-12-02 14:46:44.000000000 -0500 -@@ -2,7 +2,7 @@ - /* */ - /* Centre for Speech Technology Research */ - /* University of Edinburgh, UK */ --/* Copyright (c) 1996-2005 */ -+/* Copyright (c) 1996-2006 */ - /* All Rights Reserved. */ - /* */ - /* Permission is hereby granted, free of charge, to use and distribute */ -@@ -39,6 +39,8 @@ - /* */ - /* Added decision list support, Feb 1997 */ - /* */ -+/* Added vector support for Clustergen 2005/2006 */ -+/* */ - /*=======================================================================*/ - #include - #include -@@ -111,6 +113,54 @@ - return 0; - } - -+static int set_Vertex_Feats(EST_Track &wgn_VertexFeats, -+ EST_String &wagon_track_features) -+{ -+ int i,s=0,e; -+ EST_TokenStream ts; -+ -+ for (i=0; i\n"+ - " end (inclusive) channel for vertex indices\n"+ -+ "-track_feats \n"+ -+ " Track features to use, comma separated list\n"+ -+ " with feature numbers and/or ranges, 0 start\n"+ - "-unittrack \n"+ - " track for unit start and length in vertex track\n"+ - "-quiet No questions printed during building\n"+ -@@ -256,36 +311,53 @@ - else if (al.present("-track")) - { - wgn_VertexTrack.load(al.val("-track")); -- wgn_VertexTrack_start = 0; -- wgn_VertexTrack_end = wgn_VertexTrack.num_channels()-1; -+ wgn_VertexFeats.resize(1,wgn_VertexTrack.num_channels()); -+ for (i=0; i wgn_VertexTrack.num_channels())) -+ feats_start = al.ival("-track_start"); -+ if ((feats_start < 0) || -+ (feats_start > wgn_VertexTrack.num_channels())) - { - printf("wagon: track_start invalid: %d out of %d channels\n", -- wgn_VertexTrack_start, -+ feats_start, - wgn_VertexTrack.num_channels()); - exit(-1); - } -+ for (i=0; i wgn_VertexTrack.num_channels())) -+ feats_end = al.ival("-track_end"); -+ if ((feats_end < feats_start) || -+ (feats_end > wgn_VertexTrack.num_channels())) - { - printf("wagon: track_end invalid: %d between start %d out of %d channels\n", -- wgn_VertexTrack_end, -- wgn_VertexTrack_start, -+ feats_end, -+ feats_start, - wgn_VertexTrack.num_channels()); - exit(-1); - } -+ for (i=feats_end+1; i 0.0) -+ // printf("%d ",i); -+ // printf("\n"); - - if (al.present("-unittrack")) - { /* contains two features, a start and length. start indexes */ -diff -ur festival/speech_tools.old/siod/slib_str.cc festival/speech_tools/siod/slib_str.cc ---- speech_tools.old/siod/slib_str.cc 2004-09-30 08:53:36.000000000 -0400 -+++ speech_tools/siod/slib_str.cc 2006-09-27 11:54:29.000000000 -0400 -@@ -268,7 +268,7 @@ - LISP l_matches(LISP atom, LISP regex) - { - // t if printname of atom matches regex, nil otherwise -- EST_String pname = get_c_string(atom); -+ const EST_String pname = get_c_string(atom); - - if (pname.matches(make_regex(get_c_string(regex))) == TRUE) - return truth; -diff -ur festival/speech_tools.old/speech_class/EST_TrackFile.cc festival/speech_tools/speech_class/EST_TrackFile.cc ---- speech_tools.old/speech_class/EST_TrackFile.cc 2006-09-10 16:32:14.000000000 -0400 -+++ speech_tools/speech_class/EST_TrackFile.cc 2007-02-13 00:12:53.000000000 -0500 -@@ -522,7 +522,6 @@ - // } - - if( ascii ){ -- - for (j = 0; j < num_channels; ++j){ - tr.a(i, j) = ts.get().Float(ok); - if (!ok) -@@ -1254,6 +1253,11 @@ - return save_htk_as(filename, tmp, HTK_MFCC); - } - -+EST_write_status EST_TrackFile::save_htk_mfcc_e(const EST_String filename, EST_Track tmp) -+{ -+ return save_htk_as(filename, tmp, HTK_MFCC | HTK_ENERGY); -+} -+ - EST_write_status EST_TrackFile::save_htk_user(const EST_String filename, EST_Track tmp) - { - return save_htk_as(filename, tmp, HTK_USER); -@@ -2097,14 +2101,14 @@ - - EST_String EST_TrackFile::options_supported(void) - { -- EST_String s("Available track file formats:\n"); -+ EST_String s("AvailablE track file formats:\n"); - - for(int n=0; n< EST_TrackFile::map.n() ; n++) - { - const char *nm = EST_TrackFile::map.name(EST_TrackFile::map.token(n)); - const char *d = EST_TrackFile::map.info(EST_TrackFile::map.token(n)).description; - -- s += EST_String::cat(" ", nm, EST_String(" ")*(12-strlen(nm)), d, "\n"); -+ s += EST_String::cat(" ", nm, EST_String(" ")*(13-strlen(nm)), d, "\n"); - } - return s; - } -@@ -2137,6 +2141,9 @@ - {tff_htk_mfcc, { "htk_mfcc" }, - {FALSE, EST_TrackFile::load_htk, EST_TrackFile::save_htk_mfcc, - "htk file (as MFCC)"}}, -+{tff_htk_mfcc_e, { "htk_mfcc_e" }, -+{FALSE, EST_TrackFile::load_htk, EST_TrackFile::save_htk_mfcc_e, -+ "htk file (as MFCC_E)"}}, - {tff_htk_user, { "htk_user" }, - {FALSE, EST_TrackFile::load_htk, EST_TrackFile::save_htk_user, - "htk file (as USER)"}}, -diff -ur festival/speech_tools.old/speech_class/EST_TrackFile.h festival/speech_tools/speech_class/EST_TrackFile.h ---- speech_tools.old/speech_class/EST_TrackFile.h 2004-05-29 14:34:42.000000000 -0400 -+++ speech_tools/speech_class/EST_TrackFile.h 2007-02-13 00:12:53.000000000 -0500 -@@ -111,6 +111,8 @@ - static EST_write_status save_htk_fbank(SaveTrackFileArgs); - static EST_read_status load_htk_fbank(LoadTrackFileArgs); - -+ static EST_write_status save_htk_mfcc_e(SaveTrackFileArgs); -+ - static EST_write_status save_htk_mfcc(SaveTrackFileArgs); - static EST_read_status load_htk_mfcc(LoadTrackFileArgs); - -diff -ur festival/speech_tools.old/speech_class/EST_wave_io.cc festival/speech_tools/speech_class/EST_wave_io.cc ---- speech_tools.old/speech_class/EST_wave_io.cc 2006-01-12 10:37:51.000000000 -0500 -+++ speech_tools/speech_class/EST_wave_io.cc 2007-02-13 00:12:53.000000000 -0500 -@@ -173,7 +173,7 @@ - - current_pos = ts.tell(); - if (ts.fread(header,NIST_HDR_SIZE,1) != 1) -- return misc_read_error; -+ return wrong_format; - - if (strncmp(header,NIST_SIG,sizeof(NIST_SIG)) != 0) - return wrong_format; -diff -ur festival/speech_tools.old/stats/EST_DProbDist.cc festival/speech_tools/stats/EST_DProbDist.cc ---- speech_tools.old/stats/EST_DProbDist.cc 2004-09-30 08:53:36.000000000 -0400 -+++ speech_tools/stats/EST_DProbDist.cc 2006-12-11 17:36:12.000000000 -0500 -@@ -46,6 +46,39 @@ - #include "EST_TKVL.h" - #include "EST_simplestats.h" - -+/* We share ints and pointers for two types of probability distributions */ -+/* The know discrete sets can be indexed by ints which is *much* faster */ -+/* the indices pass around a pointers but the lower part contain ints in */ -+/* the discrete case */ -+/* On 64bit architectures this is a issue so we need have some macros */ -+/* to help us here. */ -+ -+const int est_64to32(void *c) -+{ /* this returns the bottom end of the pointer as an unsigned int */ -+ /* I believe this is a safe way to do it, we check the bits in the */ -+ /* 64 bit int and multiply them out in the 32 bit one */ -+ /* there might be better ways, but I think you'd need to think about */ -+ /* byte order then */ -+ long long l; -+ int d; -+ int i,x; -+ -+ l = (long long)c; -+ -+ for (i=0,d=0,x=1; i<24; i++) -+ { -+ if (l & 1) -+ d += x; -+ l = l >> 1; -+ x += x; -+ } -+ -+ return d; -+} -+/* #define tprob_int(X) ((sizeof(void *) != 8) ? est_64to32(X) : (int)X) */ -+#define tprob_int(X) (est_64to32(X)) -+ -+ - EST_DiscreteProbDistribution::EST_DiscreteProbDistribution(const EST_Discrete *d, - const double n_samples, const EST_DVector &counts) - { -@@ -109,7 +142,13 @@ - icounts.a_no_check(i) = 0; - } - --void EST_DiscreteProbDistribution::cumulate(const int i,double count) -+void EST_DiscreteProbDistribution::cumulate(EST_Litem *i,double count) -+{ -+ icounts[tprob_int(i)] += count; -+ num_samples += count; -+} -+ -+void EST_DiscreteProbDistribution::cumulate(int i,double count) - { - icounts[i] += count; - num_samples += count; -@@ -257,6 +296,21 @@ - - } - -+void EST_DiscreteProbDistribution::set_frequency(EST_Litem *i,double c) -+{ -+ if (type == tprob_discrete) -+ { -+ num_samples -= icounts[tprob_int(i)]; -+ num_samples += c; -+ icounts[tprob_int(i)] = c; -+ } -+ else -+ { -+ cerr << "ProbDistribution: can't access string type pd with int\n"; -+ } -+ -+} -+ - - void EST_DiscreteProbDistribution::override_frequency(const EST_String &s,double c) - { -@@ -274,6 +328,14 @@ - cerr << "ProbDistribution: can't access string type pd with int\n"; - } - -+void EST_DiscreteProbDistribution::override_frequency(EST_Litem *i,double c) -+{ -+ if (type == tprob_discrete) -+ icounts[tprob_int(i)] = c; -+ else -+ cerr << "ProbDistribution: can't access string type pd with int\n"; -+} -+ - double EST_DiscreteProbDistribution::entropy() const - { - // Returns the entropy of the current distribution -@@ -305,70 +367,70 @@ - } - - // For iterating through members of a probability distribution --int EST_DiscreteProbDistribution::item_start(void) const -+EST_Litem *EST_DiscreteProbDistribution::item_start(void) const - { - if (type == tprob_discrete) -- return 0; -+ return NULL; - else -- return (int)scounts.list.head(); -+ return scounts.list.head(); - } - --int EST_DiscreteProbDistribution::item_end(int idx) const -+int EST_DiscreteProbDistribution::item_end(EST_Litem *idx) const - { - if (type == tprob_discrete) -- return (idx >= icounts.length()); -+ return (tprob_int(idx) >= icounts.length()); - else -- return ((EST_Litem *)idx == 0); -+ return (idx == 0); - } - --int EST_DiscreteProbDistribution::item_next(int idx) const -+EST_Litem *EST_DiscreteProbDistribution::item_next(EST_Litem *idx) const - { - if (type == tprob_discrete) -- return ++idx; -+ return (EST_Litem *)(((unsigned char *)idx)+1); - else -- return (int)next((EST_Litem *)idx); -+ return next(idx); - } - --const EST_String &EST_DiscreteProbDistribution::item_name(int idx) const -+const EST_String &EST_DiscreteProbDistribution::item_name(EST_Litem *idx) const - { - if (type == tprob_discrete) -- return discrete->name(idx); -+ return discrete->name(tprob_int(idx)); - else -- return scounts.list((EST_Litem *)idx).k; -+ return scounts.list(idx).k; - } - --void EST_DiscreteProbDistribution::item_freq(int idx,EST_String &s,double &freq) const -+void EST_DiscreteProbDistribution::item_freq(EST_Litem *idx,EST_String &s,double &freq) const - { - if (type == tprob_discrete) - { -- s = discrete->name(idx); -- freq = icounts(idx); -+ s = discrete->name(tprob_int(idx)); -+ freq = icounts(tprob_int(idx)); - } - else - { -- s = scounts.list((EST_Litem *)idx).k; -- freq = scounts.list((EST_Litem *)idx).v; -+ s = scounts.list(idx).k; -+ freq = scounts.list(idx).v; - } - } - --void EST_DiscreteProbDistribution::item_prob(int idx,EST_String &s,double &prob) const -+void EST_DiscreteProbDistribution::item_prob(EST_Litem *idx,EST_String &s,double &prob) const - { - if (type == tprob_discrete) - { -- prob = probability(idx); -- s = discrete->name(idx); -+ prob = probability(tprob_int(idx)); -+ s = discrete->name(tprob_int(idx)); - } - else - { -- s = scounts.list((EST_Litem *)idx).k; -- prob = (double)scounts.list((EST_Litem *)idx).v/num_samples; -+ s = scounts.list(idx).k; -+ prob = (double)scounts.list(idx).v/num_samples; - } - } - - ostream & operator<<(ostream &s, const EST_DiscreteProbDistribution &pd) - { - // Output best with probabilities -- int i; -+ EST_Litem *i; - double prob; - double sum=0; - EST_String name; -diff -ur festival/speech_tools.old/stats/EST_viterbi.cc festival/speech_tools/stats/EST_viterbi.cc ---- speech_tools.old/stats/EST_viterbi.cc 2006-07-07 17:26:11.000000000 -0400 -+++ speech_tools/stats/EST_viterbi.cc 2006-09-27 09:19:35.000000000 -0400 -@@ -165,7 +165,7 @@ - return (a < b); - } - --static void init_dynamic_states(EST_VTPoint *p, EST_VTCandidate *cands) -+static int init_dynamic_states(EST_VTPoint *p, EST_VTCandidate *cands) - { - // In a special (hmm maybe not so special), the number of "states" - // is the number of candidates -@@ -175,6 +175,8 @@ - for (i=0, c=cands; c != 0; c=c->next,i++) - c->pos = i; - init_paths_array(p,i); -+ -+ return i; - } - - void EST_Viterbi_Decoder::set_pruning_parameters(float beam, float -diff -ur festival/speech_tools.old/stats/wagon/wagon_aux.cc festival/speech_tools/stats/wagon/wagon_aux.cc ---- speech_tools.old/stats/wagon/wagon_aux.cc 2006-08-20 13:02:39.000000000 -0400 -+++ speech_tools/stats/wagon/wagon_aux.cc 2006-12-12 10:45:19.000000000 -0500 -@@ -422,16 +422,19 @@ - - #if 1 - /* simple distance */ -- for (j=wgn_VertexTrack_start; j<=wgn_VertexTrack_end; j++) -+ for (j=0; j 0.0) - { -- i = members.item(pp); -- b += wgn_VertexTrack.a(i,j); -+ b.reset(); -+ for (pp=members.head(); pp != 0; pp=next(pp)) -+ { -+ i = members.item(pp); -+ b += wgn_VertexTrack.a(i,j); -+ } -+ a += b.stddev(); -+ count = b.samples(); - } -- a += b.stddev(); -- count = b.samples(); - } - #endif - -@@ -440,26 +443,37 @@ - /* worse in listening experiments */ - EST_SuffStats **cs; - int mmm; -- cs = new EST_SuffStats *[wgn_VertexTrack_end+1]; -- for (j=0; j<=wgn_VertexTrack_end; j++) -- cs[j] = new EST_SuffStats[wgn_VertexTrack_end+1]; -+ cs = new EST_SuffStats *[wgn_VertexTrack.num_channels()+1]; -+ for (j=0; j<=wgn_VertexTrack.num_channels(); j++) -+ cs[j] = new EST_SuffStats[wgn_VertexTrack.num_channels()+1]; - /* Find means for diagonal */ -- for (j=wgn_VertexTrack_start; j<=wgn_VertexTrack_end; j++) -+ for (j=0; j 0.0) -+ { - for (pp=members.head(); pp != 0; pp=next(pp)) -+ cs[j][j] += wgn_VertexTrack.a(members.item(pp),j); -+ } -+ } -+ for (j=0; j 0.0) - { -- mmm = members.item(pp); -- cs[i][j] += (wgn_VertexTrack.a(mmm,i)-cs[j][j].mean())* -- (wgn_VertexTrack.a(mmm,j)-cs[j][j].mean()); -- } -- for (j=wgn_VertexTrack_start; j<=wgn_VertexTrack_end; j++) -- for (i=j+1; i 0.0) -+ a += cs[i][j].stddev(); -+ } - count = cs[0][0].samples(); - #endif - -@@ -476,11 +490,12 @@ - for (qq=next(pp); qq != 0; qq=next(qq)) - { - y = members.item(qq); -- for (q=0.0,j=wgn_VertexTrack_start; j<=wgn_VertexTrack_end; j++) -- { -- d = wgn_VertexTrack(x,j)-wgn_VertexTrack(y,j); -- q += d*d; -- } -+ for (q=0.0,j=0; j 0.0) -+ { -+ d = wgn_VertexTrack(x,j)-wgn_VertexTrack(y,j); -+ q += d*d; -+ } - a += sqrt(q); - } - -@@ -562,7 +577,7 @@ - - /* a list of SuffStats on for each point in the trajectory */ - trajectory = new EST_SuffStats *[l]; -- width = wgn_VertexTrack_end+1; -+ width = wgn_VertexTrack.num_channels()+1; - for (j=0; j 0.0) -+ trajectory[ti][j] += wgn_VertexTrack.a(s+ni,j); -+ } - } - } - - /* find sum of sum of stddev for all coefs of all traj points */ - stdss.reset(); - for (ti=0; ti 0.0) -+ stdss += trajectory[ti][j].stddev(); -+ } - - // This is sum of all stddev * samples - score = stdss.mean() * members.length(); -@@ -597,7 +618,7 @@ - /* a list of SuffStats on for each point in the trajectory */ - trajectory = new EST_SuffStats *[l]; - for (j=0; j 0 && ti 0.0) -+ trajectory[ti][j] += wgn_VertexTrack.a(ni,j); - } - ti = l1; /* do it explicitly in case s1l < 1 */ -- for (j=wgn_VertexTrack_start; j<=wgn_VertexTrack_end; j++) -- trajectory[ti][j] += -1; -+ for (j=0; j 0.0) -+ trajectory[ti][j] += -1; - /* Second half */ - s += s1l+1; - for (ti++,n=0.0; s2l > 0 && ti 0.0) -+ trajectory[ti][j] += wgn_VertexTrack.a(ni,j); -+ } -+ for (j=0; j 0.0) -+ trajectory[ti][j] += -2; - } - - /* find sum of sum of stddev for all coefs of all traj points */ -@@ -640,12 +665,14 @@ - stdss.reset(); - m = 1.0/(float)l1; - for (w=0.0,ti=0; ti 0.0) - stdss += trajectory[ti][j].stddev() * w; - m = 1.0/(float)l2; - for (w=1.0,ti++; ti 0.0) -+ stdss += trajectory[ti][j].stddev() * w; - - // This is sum of all stddev * samples - score = stdss.mean() * members.length(); -@@ -824,25 +851,27 @@ - int bestp = 0; - EST_SuffStats *cs; - -- cs = new EST_SuffStats [wgn_VertexTrack_end+1]; -+ cs = new EST_SuffStats [wgn_VertexTrack.num_channels()+1]; - -- for (j=wgn_VertexTrack_start; j<=wgn_VertexTrack_end; j++) -- { -- cs[j].reset(); -- for (p=imp.members.head(); p != 0; p=next(p)) -+ for (j=0; j 0.0) - { -- cs[j] += wgn_VertexTrack.a(imp.members.item(p),j); -+ cs[j].reset(); -+ for (p=imp.members.head(); p != 0; p=next(p)) -+ { -+ cs[j] += wgn_VertexTrack.a(imp.members.item(p),j); -+ } - } -- } - - for (p=imp.members.head(); p != 0; p=next(p)) - { -- for (x=0,j=wgn_VertexTrack_start; j<=wgn_VertexTrack_end; j++) -- { -- d = (wgn_VertexTrack.a(imp.members.item(p),j)-cs[j].mean()) -- /* / b.stddev() */ ; -- x += d*d; -- } -+ for (x=0.0,j=0; j 0.0) -+ { -+ d = (wgn_VertexTrack.a(imp.members.item(p),j)-cs[j].mean()) -+ /* / cs[j].stddev() */ ; -+ x += d*d; -+ } - if (x < best) - { - bestp = imp.members.item(p); -@@ -853,7 +882,12 @@ - { - s << "( "; - s << wgn_VertexTrack.a(bestp,j); -- s << " 0 "; // fake stddev -+ // s << " 0 "; // fake stddev -+ s << " "; -+ if (finite(cs[j].stddev())) -+ s << cs[j].stddev(); -+ else -+ s << "0"; - s << " ) "; - if (j+1get_int_val(wgn_predictee); -- for (j=wgn_VertexTrack_start; j<=wgn_VertexTrack_end; j++) -- { -- b.reset(); -- for (pp=leaf->get_impurity().members.head(); pp != 0; pp=next(pp)) -+ for (j=0; j 0.0) - { -- i = leaf->get_impurity().members.item(pp); -- b += wgn_VertexTrack.a(i,j); -+ b.reset(); -+ for (pp=leaf->get_impurity().members.head(); pp != 0; pp=next(pp)) -+ { -+ i = leaf->get_impurity().members.item(pp); -+ b += wgn_VertexTrack.a(i,j); -+ } -+ predict = b.mean(); -+ actual = wgn_VertexTrack.a(pos,j); -+ if (wgn_count_field == -1) -+ count = 1.0; -+ else -+ count = dataset(p)->get_flt_val(wgn_count_field); -+ x.cumulate(predict,count); -+ y.cumulate(actual,count); -+ /* Normalized the error by the standard deviation */ -+ if (b.stddev() == 0) -+ error = predict-actual; -+ else -+ error = (predict-actual)/b.stddev(); -+ error = predict-actual; /* awb_debug */ -+ se.cumulate((error*error),count); -+ e.cumulate(fabs(error),count); -+ xx.cumulate(predict*predict,count); -+ yy.cumulate(actual*actual,count); -+ xy.cumulate(predict*actual,count); - } -- predict = b.mean(); -- actual = wgn_VertexTrack.a(pos,j); -- if (wgn_count_field == -1) -- count = 1.0; -- else -- count = dataset(p)->get_flt_val(wgn_count_field); -- x.cumulate(predict,count); -- y.cumulate(actual,count); -- /* Normalized the error by the standard deviation */ -- if (b.stddev() == 0) -- error = predict-actual; -- else -- error = (predict-actual)/b.stddev(); -- error = predict-actual; /* awb_debug */ -- se.cumulate((error*error),count); -- e.cumulate(fabs(error),count); -- xx.cumulate(predict*predict,count); -- yy.cumulate(actual*actual,count); -- xy.cumulate(predict*actual,count); -- } - } - - // Pearson's product moment correlation coefficient -@@ -437,34 +437,35 @@ - { - leaf = tree.predict_node((*dataset(p))); - pos = dataset(p)->get_int_val(wgn_predictee); -- for (j=wgn_VertexTrack_start; j<=wgn_VertexTrack_end; j++) -- { -- b.reset(); -- for (pp=leaf->get_impurity().members.head(); pp != 0; pp=next(pp)) -+ for (j=0; j 0.0) - { -- i = leaf->get_impurity().members.item(pp); -- b += wgn_VertexTrack.a(i,j); -+ b.reset(); -+ for (pp=leaf->get_impurity().members.head(); pp != 0; pp=next(pp)) -+ { -+ i = leaf->get_impurity().members.item(pp); -+ b += wgn_VertexTrack.a(i,j); -+ } -+ predict = b.mean(); -+ actual = wgn_VertexTrack.a(pos,j); -+ if (wgn_count_field == -1) -+ count = 1.0; -+ else -+ count = dataset(p)->get_flt_val(wgn_count_field); -+ x.cumulate(predict,count); -+ y.cumulate(actual,count); -+ /* Normalized the error by the standard deviation */ -+ if (b.stddev() == 0) -+ error = predict-actual; -+ else -+ error = (predict-actual)/b.stddev(); -+ error = predict-actual; /* awb_debug */ -+ se.cumulate((error*error),count); -+ e.cumulate(fabs(error),count); -+ xx.cumulate(predict*predict,count); -+ yy.cumulate(actual*actual,count); -+ xy.cumulate(predict*actual,count); - } -- predict = b.mean(); -- actual = wgn_VertexTrack.a(pos,j); -- if (wgn_count_field == -1) -- count = 1.0; -- else -- count = dataset(p)->get_flt_val(wgn_count_field); -- x.cumulate(predict,count); -- y.cumulate(actual,count); -- /* Normalized the error by the standard deviation */ -- if (b.stddev() == 0) -- error = predict-actual; -- else -- error = (predict-actual)/b.stddev(); -- error = predict-actual; /* awb_debug */ -- se.cumulate((error*error),count); -- e.cumulate(fabs(error),count); -- xx.cumulate(predict*predict,count); -- yy.cumulate(actual*actual,count); -- xy.cumulate(predict*actual,count); -- } - } - - // Pearson's product moment correlation coefficient -diff -ur festival/speech_tools.old/.time-stamp festival/speech_tools/.time-stamp ---- speech_tools.old/.time-stamp 2006-09-27 10:59:11.000000000 -0400 -+++ speech_tools/.time-stamp 2007-03-14 11:18:07.000000000 -0400 -@@ -1,2 +1,2 @@ - speech_tools 1.2.96 --Wed Sep 27 10:59:11 EDT 2006 -+Wed Mar 14 11:18:07 EDT 2007 diff --git a/festival-1.96-speechtools-linklibswithotherlibs.patch b/festival-1.96-speechtools-linklibswithotherlibs.patch deleted file mode 100644 index 3b3ae91..0000000 --- a/festival-1.96-speechtools-linklibswithotherlibs.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- speech_tools/config/project.mak.orig 2007-03-13 15:27:53.000000000 -0400 -+++ speech_tools/config/project.mak 2007-03-13 15:29:12.000000000 -0400 -@@ -99,8 +99,9 @@ - PROJECT_LIBRARY_DIR_eststring = $(TOP)/lib - PROJECT_LIBRARY_DIR_estjava = $(TOP)/lib - --PROJECT_LIBRARY_USES_estbase = eststring -- -+PROJECT_LIBRARY_USES_estbase = eststring m -+PROJECT_LIBRARY_USES_estools = estbase m ncurses -+PROJECT_LIBRARY_USES_eststring = m - PROJECT_LIBRARY_USES_estjava = estbase eststring - - PROJECT_LIBRARY_VERSION_estools = $(PROJECT_VERSION).1 diff --git a/festival-2.1-OGIresLPC-gcc-4.7.patch b/festival-2.1-OGIresLPC-gcc-4.7.patch deleted file mode 100644 index be6869b..0000000 --- a/festival-2.1-OGIresLPC-gcc-4.7.patch +++ /dev/null @@ -1,360 +0,0 @@ -diff -ru festival-2.1/festival/src/modules/OGIcommon/OGIcommon.cc festival-2.1.buono/festival/src/modules/OGIcommon/OGIcommon.cc ---- festival-2.1/festival/src/modules/OGIcommon/OGIcommon.cc 2006-12-05 23:38:01.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIcommon/OGIcommon.cc 2012-07-17 13:44:54.871361181 +0200 -@@ -111,7 +111,7 @@ - - // loop through items - int n=0; -- for (i0=r->first(); i0 != 0; i0=next(i0)) { -+ for (i0=r->first(); i0 != 0; i0=i0->next()) { - names.append(i0->name()); - y[n] = i0->F("end"); - n++; -diff -ru festival-2.1/festival/src/modules/OGIcommon/OGIduration.cc festival-2.1.buono/festival/src/modules/OGIcommon/OGIduration.cc ---- festival-2.1/festival/src/modules/OGIcommon/OGIduration.cc 2006-12-05 23:38:01.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIcommon/OGIduration.cc 2012-07-17 13:46:24.807426415 +0200 -@@ -36,7 +36,7 @@ - // Loop thru segments - for (useg=u->relation("Segment")->head(), sseg=u->relation("SrcSeg")->head(); - ((useg!=0) && (sseg!=0)); -- useg=next(useg), sseg=next(sseg)) { -+ useg=useg->next(), sseg=sseg->next()) { - - - -@@ -81,7 +81,7 @@ - // Loop thru segments - for (useg=u->relation("Segment")->head(), sseg=u->relation("SrcSeg")->head(); - ((useg!=0) && (sseg!=0)); -- useg=next(useg), sseg=next(sseg)) { -+ useg=useg->next(), sseg=sseg->next()) { - - if (sseg->name() != useg->name()) - sseg->set_name(useg->name()); -diff -ru festival-2.1/festival/src/modules/OGIcommon/OGI_file.cc festival-2.1.buono/festival/src/modules/OGIcommon/OGI_file.cc ---- festival-2.1/festival/src/modules/OGIcommon/OGI_file.cc 2006-12-05 23:38:01.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIcommon/OGI_file.cc 2012-07-17 13:44:21.807704834 +0200 -@@ -181,7 +181,7 @@ - size_t fps = ftell(fp); - - fprintf(fp, "KVL %d ", kvl.length()); -- for (l=kvl.head(); l!=0; l=next(l)){ -+ for (l=kvl.head(); l!=0; l=l->next()){ - fprintf(fp, "%s %s ", kvl.key(l).str(), kvl.val(l).str()); - } - fprintf(fp, "%s ", ENDKEY.str()); -diff -ru festival-2.1/festival/src/modules/OGIcommon/OGIgain.cc festival-2.1.buono/festival/src/modules/OGIcommon/OGIgain.cc ---- festival-2.1/festival/src/modules/OGIcommon/OGIgain.cc 2006-12-05 23:38:01.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIcommon/OGIgain.cc 2012-07-17 13:46:56.624095722 +0200 -@@ -49,7 +49,7 @@ - - // remove any in region where we will insert - p_gitem = NULL; -- for (gitem=grel->head(); gitem!=0; gitem=next(gitem)){ -+ for (gitem=grel->head(); gitem!=0; gitem=gitem->next()){ - if (p_gitem){ - p_gitem->unref_all(); - } -@@ -63,7 +63,7 @@ - } - - p_gitem = NULL; -- for (gitem=grel->head(); gitem!=0; gitem=next(gitem)){ -+ for (gitem=grel->head(); gitem!=0; gitem=gitem->next()){ - if (gitem->F("pos") >= B){ - break; - } -@@ -130,7 +130,7 @@ - float B = ffeature(seg, "start"); - float E = ffeature(seg, "end"); - -- for (gitem=u->relation("Gain")->head(); gitem!=0; gitem=next(gitem)){ -+ for (gitem=u->relation("Gain")->head(); gitem!=0; gitem=gitem->next()){ - if (gitem->f_present("pos")){ - if (gitem->F("pos") >= B) { - if (gitem->F("pos") <= E){ -diff -ru festival-2.1/festival/src/modules/OGIcommon/OGI_WaveChunk.cc festival-2.1.buono/festival/src/modules/OGIcommon/OGI_WaveChunk.cc ---- festival-2.1/festival/src/modules/OGIcommon/OGI_WaveChunk.cc 2006-12-05 23:38:01.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIcommon/OGI_WaveChunk.cc 2012-07-17 13:45:45.779832055 +0200 -@@ -22,7 +22,7 @@ - int OGI_WaveChunk::which_chunk(int samp){ - int out=-1; - EST_Litem *s; -- for (s=true_samp.head(); s!=0; s=next(s)){ -+ for (s=true_samp.head(); s!=0; s=s->next()){ - if (true_samp(s) > samp) - break; - out++; -@@ -132,22 +132,22 @@ - - NchunkV = true_samp.length(); - true_sampV = walloc(int, true_samp.length()); -- for (k=0,s=true_samp.head(); s!=0; s=next(s)){ -+ for (k=0,s=true_samp.head(); s!=0; s=s->next()){ - true_sampV[k++] = true_samp(s); - } - - startV = walloc(int, start.length()); -- for (k=0,s=start.head(); s!=0; s=next(s)){ -+ for (k=0,s=start.head(); s!=0; s=s->next()){ - startV[k++] = start(s); - } - - endV = walloc(int, end.length()); -- for (k=0,s=end.head(); s!=0; s=next(s)){ -+ for (k=0,s=end.head(); s!=0; s=s->next()){ - endV[k++] = end(s); - } - - offsetV = walloc(int, offset.length()); -- for (k=0,s=offset.head(); s!=0; s=next(s)){ -+ for (k=0,s=offset.head(); s!=0; s=s->next()){ - offsetV[k++] = offset(s); - } - done_setup_get = TRUE; -diff -ru festival-2.1/festival/src/modules/OGIdbase/OGIresLPC_db.cc festival-2.1.buono/festival/src/modules/OGIdbase/OGIresLPC_db.cc ---- festival-2.1/festival/src/modules/OGIdbase/OGIresLPC_db.cc 2006-12-05 23:38:05.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIdbase/OGIresLPC_db.cc 2012-07-17 13:48:38.261039341 +0200 -@@ -77,7 +77,7 @@ - - void OGIresLPC_db::free_all_units(void){ - EST_Litem *p; -- for (p = loaded_units.head(); p != 0; p = next(p)){ -+ for (p = loaded_units.head(); p != 0; p = p->next()){ - free_unit(loaded_units(p)); - } - loaded_units.clear(); -diff -ru festival-2.1/festival/src/modules/OGIdbase/OGIunitsel_diphone.cc festival-2.1.buono/festival/src/modules/OGIdbase/OGIunitsel_diphone.cc ---- festival-2.1/festival/src/modules/OGIdbase/OGIunitsel_diphone.cc 2006-12-05 23:38:05.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIdbase/OGIunitsel_diphone.cc 2012-07-17 13:48:12.474307360 +0200 -@@ -40,9 +40,9 @@ - EST_Relation *dbSeg_rel = u->relation("dbUnit"); - - /// loop through Segment items -- for (lseg=u->relation("Segment")->head(); lseg!=0; lseg=next(lseg)) { -+ for (lseg=u->relation("Segment")->head(); lseg!=0; lseg=lseg->next()) { - -- rseg = next(lseg); -+ rseg = lseg->next(); - if (rseg != 0){ - - // Left phone name -diff -ru festival-2.1/festival/src/modules/OGIresLPC/pmark_analysis.cc festival-2.1.buono/festival/src/modules/OGIresLPC/pmark_analysis.cc ---- festival-2.1/festival/src/modules/OGIresLPC/pmark_analysis.cc 2006-12-05 23:38:17.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIresLPC/pmark_analysis.cc 2012-07-17 13:53:35.315701699 +0200 -@@ -250,7 +250,7 @@ - EST_IList pmlist; - EST_Litem *p; - Track2IList(pmarks, (float) sp.sample_rate(), pmlist); -- for (p = pmlist.head(); p != 0; p = next(p)){ -+ for (p = pmlist.head(); p != 0; p = p->next()){ - if ((pmlist(p) < 0) || pmlist(p) > sp.length()) - p = pmlist.remove(p); - } -@@ -615,7 +615,7 @@ - static void purge_pm_list(EST_IList &pm, EST_IList &rmlist){ - // in pm, remove INDICES listed in rmlist - EST_Litem *p; -- for (p=rmlist.tail(); p != 0; p = prev(p)){ -+ for (p=rmlist.tail(); p != 0; p = p->prev()){ - pm.remove_nth(rmlist(p)); - } - } -diff -ru festival-2.1/festival/src/modules/OGIresLPC/resLPC_concat.cc festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_concat.cc ---- festival-2.1/festival/src/modules/OGIresLPC/resLPC_concat.cc 2006-12-05 23:38:17.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_concat.cc 2012-07-17 13:49:23.748566558 +0200 -@@ -84,7 +84,7 @@ - - // Loop through the units to get size of WaveChunk -- pre-alloc - int appx_wave_size = 0; // samples -- for (newUnit=u->relation("dbUnit")->head(); newUnit != 0; newUnit=next(newUnit)){ -+ for (newUnit=u->relation("dbUnit")->head(); newUnit != 0; newUnit=newUnit->next()){ - indx = newUnit->f("db_indx"); - appx_wave_size += udb->load_unit_udata(indx); // returns size - appx_wave_size += T0_max; // possible extra zero samples needed around each -@@ -93,7 +93,7 @@ - - - // Loop through the units -- for (newUnit=u->relation("dbUnit")->head(); newUnit != 0; newUnit=next(newUnit)){ -+ for (newUnit=u->relation("dbUnit")->head(); newUnit != 0; newUnit=newUnit->next()){ - // Items in the dbUnit relation have the following features: - // - "db_indx" into dbase - // - "isNatNbL" - is the prev unit this unit's natural neighbor? -@@ -145,7 +145,7 @@ - - // mark voiced joins - EST_Litem *p; -- for (p = vjoin_list.head(); p != 0; p = next(p)){ -+ for (p = vjoin_list.head(); p != 0; p = p->next()){ - srcdata->pm.a(vjoin_list(p), "v/uv") = _V_; - } - -diff -ru festival-2.1/festival/src/modules/OGIresLPC/resLPC_dump.cc festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_dump.cc ---- festival-2.1/festival/src/modules/OGIresLPC/resLPC_dump.cc 2006-12-05 23:38:17.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_dump.cc 2012-07-17 13:49:51.766275351 +0200 -@@ -176,9 +176,9 @@ - // Loop thru SrcSeg, record 1st pmark of each segment - dbunit=u->relation("dbUnit")->head(); - names.append(EST_String(dbunit->name())); -- dbunit = next(dbunit); // skip 1st one -+ dbunit = dbunit->next(); // skip 1st one - -- for ( ; dbunit!=0; dbunit=next(dbunit)){ -+ for ( ; dbunit!=0; dbunit=dbunit->next()){ - - // pmarks - srcpmR = dbunit->I("lpcpm"); -diff -ru festival-2.1/festival/src/modules/OGIresLPC/resLPC_mod.cc festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_mod.cc ---- festival-2.1/festival/src/modules/OGIresLPC/resLPC_mod.cc 2006-12-05 23:38:17.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_mod.cc 2012-07-17 13:51:30.175997155 +0200 -@@ -166,7 +166,7 @@ - EST_Item *lastseg = u->relation("Segment")->tail(); - - // Loop thru segments -- for (useg=u->relation("Segment")->head(); useg != 0; useg=next(useg)) { -+ for (useg=u->relation("Segment")->head(); useg != 0; useg=useg->next()) { - - if (ph_is_silence(useg->name())){ - -@@ -180,7 +180,7 @@ - incr = ffeature(useg,"segment_duration").Float()/5.0; - GtargL = seg_gain_target(u, useg, 1); - if (GtargL == 1.0) -- GtargL = seg_gain_target(u, next(useg), 0); -+ GtargL = seg_gain_target(u, useg->next(), 0); - OGIgain_targ(u, 0.0, firstseg->F("end"), - 0.0, GtargL, - incr,"sin"); -@@ -194,7 +194,7 @@ - incr = ffeature(useg,"segment_duration").Float()/5.0; - GtargR = seg_gain_target(u, useg, 0); - if (GtargR == 1.0) -- GtargR = seg_gain_target(u, prev(useg), 1); -+ GtargR = seg_gain_target(u, useg->prev(), 1); - OGIgain_targ(u,ffeature(lastseg,"start").Float(),lastseg->F("end"), - GtargR, 0.0, - incr,"sin"); -@@ -212,11 +212,11 @@ - incr = ffeature(useg,"segment_duration").Float()/5.0; - GtargL = seg_gain_target(u, useg, 1); - if (GtargL == 1.0) -- GtargL = seg_gain_target(u, prev(useg), 1); -+ GtargL = seg_gain_target(u, useg->prev(), 1); - - GtargR = seg_gain_target(u, useg, 0); - if (GtargR == 1.0) -- GtargR = seg_gain_target(u, next(useg), 0); -+ GtargR = seg_gain_target(u, useg->next(), 0); - - OGIgain_targ(u,ffeature(useg,"start").Float(), mid, - GtargL, 0.0, -@@ -285,7 +285,7 @@ - EST_Item *sseg; - - // Loop thru SrcSeg, record 1st pmark of each segment -- for (sseg=u->relation("SrcSeg")->head(); sseg!=0; sseg=next(sseg)){ -+ for (sseg=u->relation("SrcSeg")->head(); sseg!=0; sseg=sseg->next()){ - - src_end += sseg->F("dur"); - -@@ -365,7 +365,7 @@ - // last one in the first unit - Lph = parent(as(daughtern(dbUnit),"SrcSeg")); - -- for (dbUnit=next(dbUnit); dbUnit != 0; dbUnit=next(dbUnit)){ -+ for (dbUnit=dbUnit->next(); dbUnit != 0; dbUnit=dbUnit->next()){ - // first phone in this unit - Rph = parent(as(daughter1(dbUnit),"SrcSeg")); - -@@ -384,17 +384,17 @@ - M = dbUnit->I("lpcpm"); - - // begin point: limit to begin of unit and begin of segment the join is in -- B = max(prev(dbUnit)->I("lpcpm"), M - smoothlen); -+ B = max(dbUnit->prev()->I("lpcpm"), M - smoothlen); - B = max(B, Lph->I("lpcpm")); - - // end point: limit to end of unit and end of segment the join is in -- if (next(dbUnit)) -- nextpm = next(dbUnit)->I("lpcpm"); -+ if (dbUnit->next()) -+ nextpm = dbUnit->next()->I("lpcpm"); - else - nextpm = srclpc.num_frames(); - E = min(nextpm, M + smoothlen); -- if (next(Rph)) -- E = min(E, next(Rph)->I("lpcpm")-1); -+ if (Rph->next()) -+ E = min(E, Rph->next()->I("lpcpm")-1); - - // do smoothing - if (doMatch) -@@ -459,7 +459,7 @@ - Gtarg.begin_append(utt_targ->length()); - - // loop through targets -- for (targ=utt_targ->first(); targ != 0; targ=next(targ)) { -+ for (targ=utt_targ->first(); targ != 0; targ=targ->next()) { - if (targ->f_present("pos")) - Gtarg.append(targ->F("pos"), targ->F("gain")); - } -diff -ru festival-2.1/festival/src/modules/OGIresLPC/resLPC_pmark.cc festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_pmark.cc ---- festival-2.1/festival/src/modules/OGIresLPC/resLPC_pmark.cc 2006-12-05 23:38:17.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_pmark.cc 2012-07-17 13:53:12.769935094 +0200 -@@ -114,13 +114,13 @@ - To_UV_sec, pm, Nexc, Fs, label_vuv); - - for (b=Bvsect.tail(),e=Evsect.tail(); -- ((b!=0)||(e!=0)); b=prev(b),e=prev(e)){ -+ ((b!=0)||(e!=0)); b=b->prev(),e=e->prev()){ - - make_Vsection(Bvsect(b), Evsect(e), pm, label_vuv); - - // make next UNVOICED section -- if (prev(e)){ -- insert_UVsection(Bvsect, Evsect, Evsect(prev(e)), Bvsect(b), -+ if (e->prev()){ -+ insert_UVsection(Bvsect, Evsect, Evsect(e->prev()), Bvsect(b), - To_UV_sec, pm, Nexc, Fs, label_vuv); - } - } -@@ -190,7 +190,7 @@ - - // update V/UV information to reflect added pmarks - for (b=Bvsect.head(),e=Evsect.head(); -- ((b!=0)||(e!=0)); b=next(b),e=next(e)){ -+ ((b!=0)||(e!=0)); b=b->next(),e=e->next()){ - - if (Bvsect(b) >= UVsectE){ - Bvsect(b) += tvect.Nelem()-Nstrays; -diff -ru festival-2.1/festival/src/modules/OGIresLPC/resLPC_resyn.cc festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_resyn.cc ---- festival-2.1/festival/src/modules/OGIresLPC/resLPC_resyn.cc 2006-12-05 23:38:17.000000000 +0100 -+++ festival-2.1.buono/festival/src/modules/OGIresLPC/resLPC_resyn.cc 2012-07-17 13:52:18.790493893 +0200 -@@ -88,7 +88,7 @@ - EST_Item *sseg; - - // set "end" of srcseg from input "dur" -- for (sseg=u->relation("SrcSeg")->head(); sseg!=0; sseg=next(sseg)){ -+ for (sseg=u->relation("SrcSeg")->head(); sseg!=0; sseg=sseg->next()){ - src_end += sseg->F("dur"); - sseg->set("end", src_end); - } -@@ -96,7 +96,7 @@ - // readjust: start from end of wave and shrink segs that are - // beyond the end - float next_end = wavend; -- for (sseg=u->relation("SrcSeg")->tail(); sseg!=u->relation("SrcSeg")->head(); sseg=prev(sseg)){ -+ for (sseg=u->relation("SrcSeg")->tail(); sseg!=u->relation("SrcSeg")->head(); sseg=sseg->prev()){ - if (sseg->F("end") > next_end){ - sseg->set("end", next_end); - next_end -= 0.001; -@@ -107,7 +107,7 @@ - - // re-set "dur" - float prev_end=0.0; -- for (sseg=u->relation("SrcSeg")->head(); sseg != 0; sseg=next(sseg)){ -+ for (sseg=u->relation("SrcSeg")->head(); sseg != 0; sseg=sseg->next()){ - sseg->set("dur", sseg->F("end")-prev_end); - prev_end = sseg->F("end"); - } diff --git a/festival-2.5.0-compile.patch b/festival-2.5.0-compile.patch new file mode 100644 index 0000000..b30ae74 --- /dev/null +++ b/festival-2.5.0-compile.patch @@ -0,0 +1,12 @@ +--- festival/src/modules/clustergen/HTS_vocoder_me.cc.omv~ 2017-12-28 22:12:57.990128926 +0100 ++++ festival/src/modules/clustergen/HTS_vocoder_me.cc 2017-12-28 22:16:12.636790019 +0100 +@@ -91,6 +91,9 @@ + HTS_VOCODER_ME_C_START; + + #include "./HTS_vocoder_me.h" ++#define HTS_Vocoder_initialize HTS_Vocoder_initialize_nodupes ++#define HTS_Vocoder_synthesize HTS_Vocoder_synthesize_nodupes ++#define HTS_Vocoder_clear HTS_Vocoder_clear_nodupes + #include "../hts_engine/HTS_vocoder.c" + + /* HTS_Vocoder_initialize_me: initialize vocoder (mixed excitation) */ diff --git a/festival-2.5.0-festconfig.patch b/festival-2.5.0-festconfig.patch new file mode 100644 index 0000000..5b39a85 --- /dev/null +++ b/festival-2.5.0-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 +@@ -112,6 +112,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.5.0-libncurses-6.1.20190728.patch b/festival-2.5.0-libncurses-6.1.20190728.patch new file mode 100644 index 0000000..cec04af --- /dev/null +++ b/festival-2.5.0-libncurses-6.1.20190728.patch @@ -0,0 +1,11 @@ +--- festival-2.5.0/speech_tools/configure.in.orig 2019-12-12 10:53:45.927000000 +0100 ++++ festival-2.5.0/speech_tools/configure.in 2019-12-12 10:52:46.323000000 +0100 +@@ -42,7 +42,7 @@ + + AC_C_BIGENDIAN + +-AC_CHECK_LIB(ncurses, tputs, [TERMCAPLIB=-lncurses], [TERMCAPLIB=-lcurses]) ++AC_CHECK_LIB(ncurses, tputs, [TERMCAPLIB="-lncurses -ltinfo"], [TERMCAPLIB="-lcurses -ltinfo" ]) + dnl if test "$TERMCAPLIB" != "-ltermcap"; then + dnl AC_CHECK_LIB(termcap, tputs, [TERMCAPLIB=-ltermcap], [TERMCAPLIB=-lncurses]) + dnl diff --git a/festival-2.5.0-shared-build.patch b/festival-2.5.0-shared-build.patch new file mode 100644 index 0000000..52087d9 --- /dev/null +++ b/festival-2.5.0-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 +@@ -83,7 +83,7 @@ SHARED_CXXFLAGS = -fPIC + ifndef GCC_MAKE_SHARED_LIB + # Older versions of gcc might have required -fno-shared-data + # MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX +- MAKE_SHARED_LIB = $(CXX) -shared -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/festival-2.5.0-speechconfig.patch b/festival-2.5.0-speechconfig.patch new file mode 100644 index 0000000..69f5b5e --- /dev/null +++ b/festival-2.5.0-speechconfig.patch @@ -0,0 +1,121 @@ +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 + +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 diff --git a/festival.spec b/festival.spec index c6feade..d2a6d34 100644 --- a/festival.spec +++ b/festival.spec @@ -1,5 +1,6 @@ +%define majver %(echo %version | cut -d. -f1-2) Name: festival -Version: 2.4 +Version: 2.5.0 Release: 1mamba Summary: A general framework for building speech synthesis systems Group: System/Multimedia @@ -7,8 +8,8 @@ Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.cstr.ed.ac.uk/projects/festival/ -Source: http://festvox.org/packed/festival/latest/festival-%{version}-release.tar.gz -Source1: http://www.cstr.ed.ac.uk/downloads/festival/latest/speech_tools-%{version}-release.tar.gz +Source: http://www.festvox.org/packed/festival/%{majver}/festival-%{version}-release.tar.gz +Source1: http://www.festvox.org/packed/festival/%{majver}/speech_tools-%{version}-release.tar.gz Source2: http://festvox.org/packed/festival/latest/festlex_CMU.tar.gz Source3: http://festvox.org/packed/festival/latest/festlex_OALD.tar.gz Source4: http://festvox.org/packed/festival/latest/festlex_POSLEX.tar.gz @@ -25,39 +26,51 @@ Source14: http://festvox.org/packed/festival/latest/festvox_cstr_us_jmk_arc Source15: http://festvox.org/packed/festival/latest/festvox_us1.tar.gz Source16: http://festvox.org/packed/festival/latest/festvox_us2.tar.gz Source17: http://festvox.org/packed/festival/latest/festvox_us3.tar.gz -Source18: http://www2.pd.istc.cnr.it/FESTIVAL/ogi/OGIresLPC-2.2.tar.gz +#Source18: http://www2.pd.istc.cnr.it/FESTIVAL/ogi/OGIresLPC-2.2.tar.gz Patch0: festival-1.96-enable_esd_audio.patch -Patch1: festival-1.96-gcc43.patch -Patch2: festival-1.96-gcc44.patch Patch3: festival-1.96-etcsiteinit.patch -Patch4: festival-1.96-main-shared-build.patch -Patch5: festival-1.96-kludge-etcpath-into-libarch.patch Patch6: festival-1.96-speechtools-ohjeezcxxisnotgcc.patch -Patch7: festival-1.96-bettersonamehack.patch -Patch8: festival-1.96-no-shared-data.patch -Patch9: festival-1.96-speechtools-linklibswithotherlibs.patch -Patch10: festival-1.96-speechtools-1.2.96-beta+awb.patch -Patch11: speech_tools-2.1-gcc-4.7.patch -Patch12: %{name}-2.1-OGIresLPC-gcc-4.7.patch +Patch13: festival-2.5.0-libncurses-6.1.20190728.patch +Patch14: festival-2.5.0-shared-build.patch +Patch15: festival-2.5.0-speechconfig.patch +Patch16: festival-2.5.0-compile.patch +Patch17: festival-2.5.0-festconfig.patch License: MIT ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel +BuildRequires: ldconfig BuildRequires: libalsa-devel BuildRequires: libgcc +BuildRequires: libgomp-devel BuildRequires: libncurses-devel BuildRequires: libstdc++6-devel ## AUTOBUILDREQ-END BuildRequires: libesound-devel >= 0.2.36 Requires: festivalvoice -Requires: festival-voice-en = %{version} +Requires: festival-voice-en = %{?epoch:%epoch:}%{version}-%{release} Requires(post):%{__install_info} -BuildRoot: %{_tmppath}/%{name}-%{version}-root +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} %description Festival offers a general framework for building speech synthesis systems as well as including examples of various modules. As a whole it offers full text to speech through a number APIs: from shell level, though a Scheme command interpreter, as a C++ library, from Java, and an Emacs interface. Festival is multi-lingual (currently English (British and American), and Spanish) though English is the most advanced. Other groups release new languages for the system. And full tools and documentation for build new voices are available through Carnegie Mellon's FestVox project (http://festvox.org) The system is written in C++ and uses the Edinburgh Speech Tools Library for low level architecture and has a Scheme (SIOD) based command interpreter for control. Documentation is given in the FSF texinfo format which can generate, a printed manual, info files and HTML. Festival is free software. Festival and the speech tools are distributed under an X11-type licence allowing unrestricted commercial and non-commercial use alike. +%package -n lib%{name} +Summary: Shared libraries provided by %{name} +Group: System/Libraries + +%description -n lib%{name} +Shared libraries provided by %{name}. + +%package -n lib%{name}-devel +Summary: Headers and static libraries for development with %{name} +Group: Development/Libraries +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description -n lib%{name}-devel +Headers and static libraries for development %{name}. + %package voice-us Summary: American English language voice files for festival Group: System/Multimedia @@ -85,11 +98,13 @@ Provides: festivalvoice %description voice-it English language voice files for festival. +%debug_package + %prep -#% setup -q -n %{name} -#-D -T +%setup -q -c -a0 -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 +#-a18 +#% setup -q -D -T #:<< __EOF -%setup -q -c -a0 -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 unzip italian_scm.zip unzip lex_ifd.zip unzip lp_diphone.zip @@ -99,22 +114,18 @@ unzip pc_diphone.zip unzip pc_mbrola_unix.zip unzip pc_ogi_diphone.zip -#%patch1 -p0 -#%patch2 -p0 %patch3 -p0 -#%patch4 -p0 -#%patch5 -p0 %patch6 -p0 -#%patch7 -p0 -#%patch8 -p0 -#%patch9 -p0 -#%patch10 -p0 -#cd speech_tools -#%patch11 -p1 -#cd .. -%patch12 -p1 +%patch13 -p1 +%patch14 -p0 +%patch15 -p0 +%patch16 -p0 +%patch17 -p0 -echo "ALSO_INCLUDE += OGIcommon OGIeffect OGIinsert OGIdbase" >> festival/config/config.in +# Avoid make failure on making scripts and docs +sed -i "s|examples bin doc|examples|" festival/Makefile + +#echo "ALSO_INCLUDE += OGIcommon OGIeffect OGIinsert OGIdbase" >> festival/config/config.in # FIXME: patched to build but main final link fails with this module # OGIresLPC @@ -122,132 +133,166 @@ echo "ALSO_INCLUDE += OGIcommon OGIeffect OGIinsert OGIdbase" >> festival/config #:<< __EOF cd speech_tools %configure -%make -j1 + +%make -j1 \ + OPTIMISE_CFLAGS="$RPM_OPT_FLAGS -fPIC -fcommon" \ + OPTIMISE_CCFLAGS="$RPM_OPT_FLAGS -fPIC -fcommon" + # libs="-L$(pwd)/lib" -# CFLAGS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing" \ -# CXXFLAGS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing" cd ../festival #export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/src/lib %configure -%make -j1 FTLIBDIR=%{_datadir}/festival/lib -# CFLAGS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing" \ -# CXXFLAGS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing" +%make -j1 \ + OPTIMISE_CFLAGS="$RPM_OPT_FLAGS -fPIC" \ + OPTIMISE_CCFLAGS="$RPM_OPT_FLAGS -fPIC" + +#FTLIBDIR=%{_datadir}/festival/lib \ %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" cd speech_tools -#make INSTALLED_LIB=%{buildroot}%{_libdir} make_installed_lib_shared -#install lib/libestools.so* %{buildroot}%{_libdir} -make INSTALLED_BIN=%{buildroot}%{_libexecdir}/speech-tools make_installed_bin_static -#cd include -#for d in $( find . -type d | grep -v win32 ); do -# make -w -C $d INCDIR=%{buildroot}%{_includedir}/speech_tools/$d install_incs -#done + +#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 -d -m0755 %{buildroot}%{_bindir} +install -m755 -t %{buildroot}%{_bindir} bin/[a-z]* +rm -f %{buildroot}%{_bindir}/{est_gdb,est_examples,est_program} + +#libraries +install -d -m0755 %{buildroot}%{_libdir} +install -m755 -t %{buildroot}%{_libdir} lib/lib*.so.* +ln -sf libestbase.so.%{version}.1 %{buildroot}%{_libdir}/libestbase.so +ln -sf libestools.so.%{version}.1 %{buildroot}%{_libdir}/libestools.so +ln -sf libeststring.so.1.2 %{buildroot}%{_libdir}/libeststring.so + +#headers +install -d -m755 %{buildroot}%{_includedir}/speech_tools/{,instantiate,ling_class,rxp,sigpr,unix} + +for dir in {.,instantiate,ling_class,rxp,sigpr,unix}; do + install -m644 -t %{buildroot}%{_includedir}/speech_tools/$dir include/$dir/*.h +done + cd .. cd festival -make INSTALLED_BIN=%{buildroot}%{_bindir} make_installed_bin_static -# remove builddir inserted in some scripts -sed -i "s|%{_builddir}/%{name}-%{version}/%{name}|%{_prefix}|" \ - bin/text2wave examples/saytime +# binaries +for b in festival festival_client; do + install -m755 src/main/$b %{buildroot}/usr/bin/$b +done -install -D -m0755 bin/text2wave %{buildroot}%{_bindir} -install -D -m0755 examples/saytime %{buildroot}%{_bindir} +for b in benchmark dumpfeats durmeanstd latest make_utts powmeanstd \ + run-festival-script saytime scfg_parse_text text2pos text2wave; do + install -m755 examples/$b %{buildroot}%{_bindir}/$b +done -#install -D -m0755 festival/src/main/festival %{buildroot}%{_bindir}/festival -#install -D -m0755 festival/src/main/festival_client %{buildroot}%{_bindir}/festival_client -#cp src/lib/libFestival.so* %{buildroot}%{_libdir} +# libraries +install -m755 src/lib/libFestival.so.* %{buildroot}%{_libdir} +ln -sf libFestival.so.%{version}.0 %{buildroot}%{_libdir}/libFestival.so -install -d %{buildroot}%{_datadir}/festival %{buildroot}%{_sysconfdir}/festival %{buildroot}%{_mandir}/man1 -cp -a lib %{buildroot}%{_datadir}/festival/ -mv %{buildroot}%{_datadir}/festival/lib/siteinit.scm %{buildroot}%{_sysconfdir}/festival/ -cp -a doc/*.1 %{buildroot}%{_mandir}/man1 +#headers +install -dm755 %{buildroot}%{_includedir}/festival +install -m644 -t %{buildroot}%{_includedir}/festival src/include/*.h -#mkdir -p %{buildroot}%{_includedir}/festival -#cp -a src/include/* %{buildroot}%{_includedir}/festival +# datadir +install -d %{buildroot}%{_datadir}/festival +cp -a lib/* %{buildroot}%{_datadir}/festival/ +rm -fv $(find %{buildroot}%{_datadir}/festival -name Makefile) +rm -fv $(find %{buildroot}%{_bindir} -name Makefile) -rm -rf %{buildroot}%{_datadir}/festival/lib/voices-multisyn/english -rm -f %{buildroot}%{_datadir}/festival/lib/Makefile -rm -f %{buildroot}%{_datadir}/festival/lib/multisyn/Makefile -rm -f %{buildroot}%{_datadir}/festival/lib/etc/Makefile +#create voices directory +install -dm755 %{buildroot}%{_datadir}/festival/voices + +# Ok now some general cleanups (from Arch Linux) +for i in $(find %{buildroot}%{_includedir} -type f); do + sed -i -e 's,"EST.*\.h",\,g' -e 's,speech_tools/\",speech_tools/,g' \ + -e 's,"siod.*\.h",\,g' -e 's,speech_tools/\",speech_tools/,g' \ + -e 's,"instantiate/.*\.h",\,g' -e 's,speech_tools/instantiate/\",speech_tools/instantiate/,g' -e 's,"instantiate,instantiate,g' \ + -e 's,"ling_class/.*\.h",\,g' -e 's,speech_tools/ling_class/\",speech_tools/ling_class/,g' -e 's,"ling_class,ling_class,g' \ + -e 's,"rxp/.*\.h",\,g' -e 's,speech_tools/rxp/\",speech_tools/rxp/,g' -e 's,"rxp,rxp,g' \ + -e 's,"sigpr/.*\.h",\,g' -e 's,speech_tools/sigpr/\",speech_tools/sigpr/,g' -e 's,"sigpr,sigpr,g' \ + -e 's,"unix/.*\.h",\,g' -e 's,speech_tools/unix/\",speech_tools/unix/,g' -e 's,\.h\">,.h\>,g' -e 's,"unix,unix,g' \ + -e 's,"festival\.h",\,g' \ + -e 's,"ModuleDescription\.h",\,g' \ + -e 's,"Phone\.h",\,g' $i +done %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%post-n lib%{name} -p /sbin/ldconfig +%postun -n lib%{name} -p /sbin/ldconfig %files %defattr(-,root,root) -%dir %{_sysconfdir}/festival -%config(noreplace) %{_sysconfdir}/festival/*.scm -%{_bindir}/festival -%{_bindir}/festival_client -%{_bindir}/festival_server -%{_bindir}/festival_server_control -%{_bindir}/saytime -%{_bindir}/text2wave -%{_libexecdir}/speech-tools/* -#%dir %{_includedir}/festival -#%{_includedir}/festival/* -#%dir %{_includedir}/speech_tools -#%{_includedir}/speech_tools/* -#%{_libdir}/libFestival.so -#%{_libdir}/libFestival.so.* -#%{_libdir}/libestbase.a -#%{_libdir}/libestbase.so -#%{_libdir}/libestbase.so.* -#%{_libdir}/libestools.a -#%{_libdir}/libestools.so -#%{_libdir}/libestools.so.* -#%{_libdir}/libeststring.a -#%{_libdir}/libeststring.so -#%{_libdir}/libeststring.so.* - -%{_datadir}/festival/lib/*.dtd -%{_datadir}/festival/lib/VCLocalRules -%{_datadir}/festival/lib/dicts/cmu/* -%{_datadir}/festival/lib/dicts/oald/* -%{_datadir}/festival/lib/dicts/wsj.wp39.* -%{_datadir}/festival/lib/dicts/COPYING.poslex -%{_datadir}/festival/lib/multisyn/*.scm -%{_datadir}/festival/lib/sable-latin.ent -%{_datadir}/festival/lib/scfg_wsj_wp20.gram -%{_datadir}/festival/lib/*.ngrambin -%{_datadir}/festival/lib/speech.properties -%{_datadir}/festival/lib/etc/unknown_Linux/* -%{_datadir}/festival/lib/etc/unknown_Linux/.made -%{_datadir}/festival/lib/etc/email_filter -%{_datadir}/festival/lib/festival.el - +%{_bindir}/* %dir %{_datadir}/festival -%{_datadir}/festival/lib/*.scm -%doc festival/COPYING festival/NEWS festival/README +%{_datadir}/festival/*.dtd +%{_datadir}/festival/VCLocalRules +%{_datadir}/festival/dicts/cmu/* +%{_datadir}/festival/dicts/oald/* +%{_datadir}/festival/dicts/wsj.wp39.* +%{_datadir}/festival/dicts/COPYING.poslex +%{_datadir}/festival/multisyn/*.scm +%{_datadir}/festival/sable-latin.ent +%{_datadir}/festival/scfg_wsj_wp20.gram +%{_datadir}/festival/*.ngrambin +%{_datadir}/festival/speech.properties +%{_datadir}/festival/etc/Linux/.made +%{_datadir}/festival/etc/Linux/audsp +%{_datadir}/festival/etc/email_filter +%{_datadir}/festival/festival.el +%{_datadir}/festival/*.scm +#%{_mandir}/man1/festival.1* +#%{_mandir}/man1/festival_client.1* -%{_mandir}/man1/festival.1* -%{_mandir}/man1/festival_client.1* +%files -n lib%{name} +%defattr(-,root,root) +%{_libdir}/libFestival.so.* +%{_libdir}/libestbase.so.* +%{_libdir}/libestools.so.* +%{_libdir}/libeststring.so.* +%doc festival/COPYING + +%files -n lib%{name}-devel +%defattr(-,root,root) +%dir %{_includedir}/festival +%{_includedir}/festival/*.h +%dir %{_includedir}/speech_tools +%{_includedir}/speech_tools/* +%{_libdir}/libFestival.so +%{_libdir}/libestbase.so +%{_libdir}/libestools.so +%{_libdir}/libeststring.so +%doc festival/NEWS %files voice-us %defattr(-,root,root) -%dir %{_datadir}/festival/lib/voices/us -%{_datadir}/festival/lib/voices/us/* +%dir %{_datadir}/festival/voices/us +%{_datadir}/festival/voices/us/* +%dir %{_datadir}/festival/voices-multisyn/english +%{_datadir}/festival/voices-multisyn/english/* %files voice-en %defattr(-,root,root) -%dir %{_datadir}/festival/lib/voices/english -%{_datadir}/festival/lib/voices/english/* +%dir %{_datadir}/festival/voices/english +%{_datadir}/festival/voices/english/* %files voice-it %defattr(-,root,root) -%dir %{_datadir}/festival/lib/voices/italian -%{_datadir}/festival/lib/voices/italian/* -%{_datadir}/festival/lib/italian_scm/* -%{_datadir}/festival/lib/dicts/ifd* +%dir %{_datadir}/festival/voices/italian +%{_datadir}/festival/voices/italian/* +%{_datadir}/festival/italian_scm/* +%{_datadir}/festival/dicts/ifd* %changelog +* Sat Aug 17 2019 Silvan Calarco 2.5.0-1mamba +- update to 2.5.0 + * Tue Dec 08 2015 Automatic Build System 2.4-1mamba - automatic version update by autodist diff --git a/speech_tools-2.1-gcc-4.7.patch b/speech_tools-2.1-gcc-4.7.patch deleted file mode 100644 index 239becc..0000000 --- a/speech_tools-2.1-gcc-4.7.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -Nru speech-tools-2.1~release/debian/patches/ftbfs_gcc4.7.diff speech-tools-2.1~release/debian/patches/ftbfs_gcc4.7.diff ---- a/base_class/EST_TSimpleMatrix.cc -+++ b/base_class/EST_TSimpleMatrix.cc -@@ -44,6 +44,7 @@ - #include "EST_TVector.h" - #include - #include -+#include - #include "EST_cutils.h" - - template -@@ -98,7 +99,7 @@ void EST_TSimpleMatrix::resize(int ne - { - int copy_r = Lof(this->num_rows(), new_rows); - -- just_resize(new_rows, new_cols, &old_vals); -+ this->just_resize(new_rows, new_cols, &old_vals); - - for (q=0; q<(copy_r*new_cols*sizeof(T)); q++) /* memcpy */ - ((char *)this->p_memory)[q] = ((char *)old_vals)[q]; -@@ -127,9 +128,9 @@ void EST_TSimpleMatrix::resize(int ne - int copy_r = Lof(this->num_rows(), new_rows); - int copy_c = Lof(this->num_columns(), new_cols); - -- just_resize(new_rows, new_cols, &old_vals); -+ this->just_resize(new_rows, new_cols, &old_vals); - -- set_values(old_vals, -+ this->set_values(old_vals, - old_row_step, old_column_step, - 0, copy_r, - 0, copy_c); ---- a/base_class/EST_TSimpleVector.cc -+++ b/base_class/EST_TSimpleVector.cc -@@ -43,6 +43,7 @@ - #include "EST_TSimpleVector.h" - #include "EST_matrix_support.h" - #include -+#include - #include "EST_cutils.h" - - template void EST_TSimpleVector::copy(const EST_TSimpleVector &a) -@@ -70,7 +71,7 @@ template void EST_TSimpleVector - int old_offset = this->p_offset; - unsigned int q; - -- just_resize(newn, &old_vals); -+ this->just_resize(newn, &old_vals); - - if (set && old_vals) - { ---- a/include/EST_TIterator.h -+++ b/include/EST_TIterator.h -@@ -209,7 +209,7 @@ public: - - /// Create an iterator ready to run over the given container. - EST_TStructIterator(const Container &over) -- { begin(over); } -+ { this->begin(over); } - - const Entry *operator ->() const - {return &this->current();} -@@ -289,7 +289,7 @@ public: - - /// Create an iterator ready to run over the given container. - EST_TRwStructIterator(Container &over) -- { begin(over); } -+ { this->begin(over); } - - Entry *operator ->() const - {return &this->current();} ---- a/include/EST_TNamedEnum.h -+++ b/include/EST_TNamedEnum.h -@@ -130,7 +130,7 @@ public: - {this->initialise((const void *)defs); }; - EST_TNamedEnumI(EST_TValuedEnumDefinition defs[], ENUM (*conv)(const char *)) - {this->initialise((const void *)defs, conv); }; -- const char *name(ENUM tok, int n=0) const {return value(tok,n); }; -+ const char *name(ENUM tok, int n=0) const {return this->value(tok,n); }; - - }; -