Prechádzať zdrojové kódy

cleanup packaging; add text2wav(1) manual page; remove MBROLA based voices as MBROLA is an ancient binary-only stuff

Ralf S. Engelschall 17 rokov pred
rodič
commit
5ba3019602

+ 0 - 3
festival/festival-init.scm

@@ -17,7 +17,4 @@
 ;(set! voice_default 'voice_cmu_us_slt_arctic_hts)
 ;(set! voice_default 'voice_cmu_us_awb_arctic_hts) 
 ;(set! voice_default 'voice_ked_diphone)
-;(set! voice_default 'voice_us1_mbrola)
-;(set! voice_default 'voice_us2_mbrola)
-;(set! voice_default 'voice_us3_mbrola)
 

+ 0 - 3
festival/festival-vars.scm

@@ -2,6 +2,3 @@
 ;;  festival-vars.scm -- Festival Variable Configuration (language: Scheme)
 ;;
 
-(set! system-voice-path '("@l_prefix@/lib/festival/voices"))
-(set! sgml_parse_progname "@l_prefix@/bin/onsgmls")
-

+ 196 - 37
festival/festival.patch

@@ -1,43 +1,132 @@
---- speech_tools/include/EST_unix.h	Sun May 30 20:53:04 1999
-+++ speech_tools/include/EST_unix.h	Mon Oct 11 05:40:15 1999
-@@ -53,6 +53,7 @@
- #   include <sys/wait.h>
- #   include <sys/resource.h>
- #   include <dirent.h>
-+#   define unix 1
- #elif defined(SYSTEM_IS_WIN32)
- #   include <io.h>
- #   include "win32/EST_unix_win32.h"
---- speech_tools/config/rules/install.mak~	Sun May 30 22:51:10 1999
-+++ speech_tools/config/rules/install.mak	Wed Mar  9 03:11:35 2005
-@@ -39,7 +39,7 @@
- 
+Index: festival/doc/Makefile
+--- festival/doc/Makefile.orig	2001-04-04 13:55:21 +0200
++++ festival/doc/Makefile	2008-03-21 00:09:03 +0100
+@@ -56,7 +56,8 @@
+ 	     banner.inc $(DOCXXIMAGES)
  
+ MANPAGES = festival.head festival.tail \
+-           festival_client.head festival_client.tail
++           festival_client.head festival_client.tail \
++                  text2wave.head text2wave.tail
  
--PROJECT_HOME_PATH := $(shell mkdir -p $($(PROJECT_PREFIX)_HOME); cd $($(PROJECT_PREFIX)_HOME); pwd)
-+PROJECT_HOME_PATH := $($(PROJECT_PREFIX)_HOME)
- 
- PROJECT_TOP_PATH := $(shell (cd $(TOP); pwd))
+ #SGMLFILES = festival.sgml \
+ #	introductory.sgml basics.sgml core.sgml advanced.sgml programming.sgml
+@@ -64,7 +65,7 @@
+ FILES=Makefile $(MANPAGES) festival.texi $(SGMLFILES) refcard.tex  $(DOCXXFILES)
+ LOCAL_CLEAN = *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr
  
---- speech_tools/testsuite/matrix_regression.cc	Fri Apr 30 12:56:51 2004
-+++ speech_tools/testsuite/matrix_regression.cc	Mon Mar 26 04:07:25 2007
-@@ -55,7 +55,4 @@
-   EST_TMatrix<int> m(5,5);
+-ALL = festival.1 festival_client.1
++ALL = festival.1 festival_client.1 text2wave.1
  
--  cout << "EST_TVector<int> size = " << sizeof(EST_TVector<int>) << " bytes.\n";
--  cout << "EST_TMatrix<int> size = " << sizeof(EST_TMatrix<int>) << " bytes.\n";
--
-   for(int i=0; i<m.num_rows(); i++)
-     for(int j=0; j<m.num_columns(); j++)
---- speech_tools/testsuite/correct/matrix_regression.out	Wed Apr  4 07:55:32 2001
-+++ speech_tools/testsuite/correct/matrix_regression.out	Mon Mar 26 04:07:56 2007
-@@ -1,3 +1 @@
--EST_TVector<int> size = 20 bytes.
--EST_TMatrix<int> size = 28 bytes.
- Initial Matrix
+ include $(TOP)/config/common_make_rules
+ include $(EST)/config/rules/doc.mak
+Index: festival/doc/text2wave.head
+--- /dev/null	2008-03-21 00:09:07 +0100
++++ festival/doc/text2wave.head	2008-03-21 00:09:03 +0100
+@@ -0,0 +1,19 @@
++.TH  TEXT2WAVE 1 "6th Apr 1998"
++.SH NAME
++text2wave \- convert text to .wav files
++.SH SYNOPSIS
++.B text2wave
++.I [options]
++<
++.I text
++>
++.I sound.wav
++
++
++.SH DESCRIPTION
++
++This script is part of the festival text-to-speech system.
++It is a wrapper for festival's Scheme code for easy usage in TTS
++scripts.
++
++.SH OPTIONS
+Index: festival/doc/text2wave.options
+--- /dev/null	2008-03-21 00:09:07 +0100
++++ festival/doc/text2wave.options	2008-03-21 00:09:03 +0100
+@@ -0,0 +1,47 @@
++.\"
++.\".SH OPTIONS
++.\"  -mode <string>  Explicit tts mode.
++.\"  -o ofile        File to save waveform (default is stdout).
++.\"  -otype <string> Output waveform type: ulaw, snd, aiff, riff, nist etc.
++.\"                  (default is riff)
++.\"  -F <int>        Output frequency.
++.\"  -scale <float>  Volume factor
++.\"  -eval <string>  File or lisp s-expression to be evaluated before
++.\"                  synthesis.
++
++.TP
++.B \-mode
++.I string
++.br
++Explicit tts mode.
++.TP
++.B \-o
++.I ofile
++.br
++File to save waveform to.
++.br
++The default is
++.B stdout.
++.TP
++.B \-otype
++.I string
++.br
++Output waveform type: ulaw, snd, aiff, riff, nist etc.
++.br
++The default is
++.B riff.
++.TP
++.B \-f
++.I integer
++.br
++Output frequency.
++.TP
++.B \-scale
++.I float
++.br
++Volume factor.
++.TP
++.B \-eval
++.I "string"
++.br
++File or lisp s-expression to be evaluated before synthesis.
+Index: festival/doc/text2wave.tail
+--- /dev/null	2008-03-21 00:09:07 +0100
++++ festival/doc/text2wave.tail	2008-03-21 00:09:03 +0100
+@@ -0,0 +1,26 @@
++
++.SH BUGS
++More than you can imagine.
++
++A manual with much detail (though not complete) is available
++in distributed as part of the system and is also accessible at
++.br
++http://www.cstr.ed.ac.uk/projects/festival/manual/
++
++Although we cannot guarantee the time required to fix bugs, we
++would appreciated it if they were reported to
++.br
++festival-bug@cstr.ed.ac.uk
++
++.SH AUTHOR
++Alan W Black, Richard Caley and Paul Taylor
++.br
++(C) Centre for Speech Technology Research, 1996-1998
++.br
++University of Edinburgh
++.br
++80 South Bridge
++.br
++Edinburgh EH1 1HN
++.br
++http://www.cstr.ed.ac.uk/projects/festival.html
 Index: festival/lib/init.scm
 --- festival/lib/init.scm.orig	2004-07-16 01:03:04 +0200
-+++ festival/lib/init.scm	2008-03-20 16:18:56 +0100
++++ festival/lib/init.scm	2008-03-21 00:09:03 +0100
 @@ -55,6 +55,10 @@
  (if (probe_file (path-append libdir "sitevars.scm"))
      (load (path-append libdir "sitevars.scm")))
@@ -60,8 +149,9 @@ Index: festival/lib/init.scm
  ;;;  User initialization, if a user has a personal customization
  ;;;  file loaded it
  (if (probe_file (path-append home-directory ".siodrc"))
---- festival/lib/multisyn/multisyn_pauses.scm	2004-06-21 08:19:30.000000000 -0600
-+++ festival/lib/multisyn/multisyn_pauses.scm	2005-01-12 18:53:27.000000000 -0700
+Index: festival/lib/multisyn/multisyn_pauses.scm
+--- festival/lib/multisyn/multisyn_pauses.scm.orig	2004-06-21 16:19:30 +0200
++++ festival/lib/multisyn/multisyn_pauses.scm	2008-03-21 00:09:03 +0100
 @@ -85,8 +85,8 @@
  (let ((silence (car (cadr (car (PhoneSet.description '(silences))))))
        (seg (item.relation (find_last_seg word) 'Segment))
@@ -73,9 +163,33 @@ Index: festival/lib/init.scm
  ; if next seg is not silence insert one.
    (if (or (not (item.next seg))
  	  (not (string-equal (item.name (item.next seg)) silence)))
+Index: festival/lib/tts.scm
+--- festival/lib/tts.scm.orig	2005-05-09 16:12:06 +0200
++++ festival/lib/tts.scm	2008-03-21 00:09:03 +0100
+@@ -89,7 +89,7 @@
+ 
+ ;;;  The program used to parse stml files
+ ;;;  Needs version 1.0 to allow -D option to work
+-(defvar sgml_parse_progname "nsgmls-1.0"
++(defvar sgml_parse_progname "@l_prefix@/bin/onsgmls"
+   "sgml_parse_progname
+ The name of the program to use to parse SGML files.  Typically this is
+ nsgml-1.0 from the sp SGML package. [see XML/SGML requirements]")
+Index: festival/lib/voices.scm
+--- festival/lib/voices.scm.orig	2005-05-02 16:20:37 +0200
++++ festival/lib/voices.scm	2008-03-21 00:09:03 +0100
+@@ -42,7 +42,7 @@
+ ;; The path to search for voices is created from the load-path with
+ ;; an extra list of directories appended.
+ 
+-(defvar system-voice-path '( )
++(defvar system-voice-path '("@l_prefix@/lib/festival/voices")
+   "system-voice-path
+    Additional directory not near the load path where voices can be
+    found, this can be redefined in lib/sitevars.scm if desired.")
 Index: festival/src/arch/festival/audspio.cc
 --- festival/src/arch/festival/audspio.cc.orig	2004-09-30 15:04:17 +0200
-+++ festival/src/arch/festival/audspio.cc	2008-03-20 23:41:13 +0100
++++ festival/src/arch/festival/audspio.cc	2008-03-21 00:09:03 +0100
 @@ -108,7 +108,7 @@
  	{
  	    audio = ft_get_param("Audio_Method");
@@ -85,3 +199,48 @@ Index: festival/src/arch/festival/audspio.cc
  	    if (audio != NIL)
  		audsp_send(EST_String("method ")+get_c_string(audio));
  	    if (command != NIL)
+Index: speech_tools/config/rules/install.mak
+--- speech_tools/config/rules/install.mak.orig	2001-04-04 13:55:32 +0200
++++ speech_tools/config/rules/install.mak	2008-03-21 00:09:03 +0100
+@@ -39,7 +39,7 @@
+ 
+ 
+ 
+-PROJECT_HOME_PATH := $(shell mkdir -p $($(PROJECT_PREFIX)_HOME); cd $($(PROJECT_PREFIX)_HOME); pwd)
++PROJECT_HOME_PATH := $($(PROJECT_PREFIX)_HOME)
+ 
+ PROJECT_TOP_PATH := $(shell (cd $(TOP); pwd))
+ 
+Index: speech_tools/include/EST_unix.h
+--- speech_tools/include/EST_unix.h.orig	2004-04-30 18:56:49 +0200
++++ speech_tools/include/EST_unix.h	2008-03-21 00:09:03 +0100
+@@ -53,6 +53,7 @@
+ #   include <sys/wait.h>
+ #   include <sys/resource.h>
+ #   include <dirent.h>
++#   define unix 1
+ #elif defined(SYSTEM_IS_WIN32)
+ #   include <io.h>
+ #   include "win32/EST_unix_win32.h"
+Index: speech_tools/testsuite/correct/matrix_regression.out
+--- speech_tools/testsuite/correct/matrix_regression.out.orig	2001-04-04 13:55:32 +0200
++++ speech_tools/testsuite/correct/matrix_regression.out	2008-03-21 00:09:03 +0100
+@@ -1,5 +1,3 @@
+-EST_TVector<int> size = 20 bytes.
+-EST_TMatrix<int> size = 28 bytes.
+ Initial Matrix
+ 0	1	2	3	4	
+ 100	101	102	103	104	
+Index: speech_tools/testsuite/matrix_regression.cc
+--- speech_tools/testsuite/matrix_regression.cc.orig	2004-09-30 14:53:37 +0200
++++ speech_tools/testsuite/matrix_regression.cc	2008-03-21 00:09:03 +0100
+@@ -54,9 +54,6 @@
+ {
+   EST_TMatrix<int> m(5,5);
+ 
+-  cout << "EST_TVector<int> size = " << sizeof(EST_TVector<int>) << " bytes.\n";
+-  cout << "EST_TMatrix<int> size = " << sizeof(EST_TMatrix<int>) << " bytes.\n";
+-
+   for(int i=0; i<m.num_rows(); i++)
+     for(int j=0; j<m.num_columns(); j++)
+       m.a(i,j) = i*100+j;

+ 16 - 19
festival/festival.spec

@@ -36,7 +36,7 @@ Class:        EVAL
 Group:        Audio
 License:      X11-style
 Version:      %{V_festival}
-Release:      20080320
+Release:      20080321
 
 #   list of sources
 Source0:      http://festvox.org/packed/festival/%{V_festival}/festival-%{V_festival}-beta.tar.gz
@@ -47,16 +47,13 @@ Source4:      http://festvox.org/packed/festival/%{V_festival}/festlex_OALD.tar.
 Source5:      http://festvox.org/packed/festival/%{V_festival}/festvox_kallpc16k.tar.gz
 Source6:      http://festvox.org/packed/festival/%{V_festival}/festvox_kedlpc16k.tar.gz
 Source7:      http://festvox.org/packed/festival/%{V_festival}/festvox_kedlpc8k.tar.gz
-Source8:      http://festvox.org/packed/festival/%{V_festival}/festvox_us1.tar.gz
-Source9:      http://festvox.org/packed/festival/%{V_festival}/festvox_us2.tar.gz
-Source10:     http://festvox.org/packed/festival/%{V_festival}/festvox_us3.tar.gz
-Source11:     http://festvox.org/packed/festival/%{V_festival}/festvox_cmu_us_awb_arctic_hts.tar.gz
-Source12:     http://festvox.org/packed/festival/%{V_festival}/festvox_cmu_us_bdl_arctic_hts.tar.gz
-Source13:     http://festvox.org/packed/festival/%{V_festival}/festvox_cmu_us_jmk_arctic_hts.tar.gz
-Source14:     http://festvox.org/packed/festival/%{V_festival}/festvox_cmu_us_slt_arctic_hts.tar.gz
-Source15:     rc.festival
-Source16:     festival-init.scm
-Source17:     festival-vars.scm
+Source8:      http://festvox.org/packed/festival/%{V_festival}/festvox_cmu_us_awb_arctic_hts.tar.gz
+Source9:      http://festvox.org/packed/festival/%{V_festival}/festvox_cmu_us_bdl_arctic_hts.tar.gz
+Source10:     http://festvox.org/packed/festival/%{V_festival}/festvox_cmu_us_jmk_arctic_hts.tar.gz
+Source11:     http://festvox.org/packed/festival/%{V_festival}/festvox_cmu_us_slt_arctic_hts.tar.gz
+Source12:     rc.festival
+Source13:     festival-init.scm
+Source14:     festival-vars.scm
 Patch0:       festival.patch
 
 #   build information
@@ -96,15 +93,14 @@ AutoReqProv:  no
     %setup -q -T -D -a 9
     %setup -q -T -D -a 10
     %setup -q -T -D -a 11
-    %setup -q -T -D -a 12
-    %setup -q -T -D -a 13
-    %setup -q -T -D -a 14
     %patch -p0
 
 %build
     #   expand variables in patched sources
     %{l_shtool} subst %{l_value -s -a} \
-        festival/lib/init.scm
+        festival/lib/init.scm \
+        festival/lib/tts.scm \
+        festival/lib/voices.scm
 
     #   build speech tools
     (   cd speech_tools
@@ -153,16 +149,17 @@ AutoReqProv:  no
         festival/src/main/festival \
         festival/src/main/festival_client \
         $RPM_BUILD_ROOT%{l_prefix}/bin/
-    %{l_shtool} install -c -m 644 \
-        festival/doc/festival.1 \
-        festival/doc/festival_client.1 \
-        $RPM_BUILD_ROOT%{l_prefix}/man/man1/
     %{l_shtool} install -c -m 755 \
         -e 's;\(exec \).*\(/bin/festival --script\);\1%{l_prefix}\2;' \
         festival/examples/saytime \
         festival/examples/text2pos \
         festival/examples/text2wave \
         $RPM_BUILD_ROOT%{l_prefix}/bin/
+    %{l_shtool} install -c -m 644 \
+        festival/doc/festival.1 \
+        festival/doc/festival_client.1 \
+        festival/doc/text2wave.1 \
+        $RPM_BUILD_ROOT%{l_prefix}/man/man1/
 
     #   install library files
     chmod -R u+w,a+r,og-w festival/lib