diff --git a/festival/doc/festival.texi b/festival/doc/festival.texi index 94cfb8b..dc4abe3 100644 --- festival/doc/festival.texi +++ festival/doc/festival.texi @@ -936,14 +936,16 @@ You can delete these by changing the @code{BASE_DIRS} variable in @cindex initialization @cindex installation initialization @cindex @file{init.scm} -@cindex @file{siteinit.scm} +@cindex @file{/etc/festival/siteinit.scm} +@cindex @file{/etc/festival/sitevars.scm} Once compiled Festival may be further customized for particular sites. At start up time Festival loads the file @file{init.scm} from its library directory. This file further loads other necessary files such as phoneset descriptions, duration parameters, intonation parameters, definitions of voices etc. It will also load the files -@file{sitevars.scm} and @file{siteinit.scm} if they exist. -@file{sitevars.scm} is loaded after the basic Scheme library functions +@file{/etc/festival/sitevars.scm} and @file{/etc/festival/siteinit.scm} +if they exist. @file{/etc/festival/sitevars.scm} is loaded after +the basic Scheme library functions are loaded but before any of the festival related functions are loaded. This file is intended to set various path names before various subsystems are loaded. Typically variables such @@ -961,7 +963,7 @@ at run-time). If the voices and lexicons have been unpacked into subdirectories of the library directory (the default) then no site specific initialization of the above pathnames will be necessary. -The second site specific file is @file{siteinit.scm}. Typical examples +The second site specific file is @file{/etc/festival/siteinit.scm}. Typical examples of local initialization are as follows. The default audio output method is NCD's NAS system if that is supported as that's what we use normally in CSTR. If it is not supported, any hardware specific mode is the @@ -969,7 +971,7 @@ default (e.g. sun16audio, freebas16audio, linux16audio or mplayeraudio). But that default is just a setting in @file{init.scm}. If for example in your environment you may wish the default audio output method to be 8k mulaw through @file{/dev/audio} you should add the following line to -your @file{siteinit.scm} file +your @file{/etc/festival/siteinit.scm} file @lisp (Parameter.set 'Audio_Method 'sunaudio) @end lisp @@ -990,7 +992,7 @@ play audio files through a program called @file{adplay} with arguments for sample rate and file type. When playing waveforms, Festival, by default, outputs as unheadered waveform in native byte order. In this example you would set up the default audio playing mechanism in -@file{siteinit.scm} as follows +@file{/etc/festival/siteinit.scm} as follows @lisp (Parameter.set 'Audio_Method 'Audio_Command) (Parameter.set 'Audio_Command "adplay -raw -r $SR $FILE") @@ -1036,12 +1038,12 @@ A second typical customization is setting the default speaker. Speakers depend on many things but due to various licence (and resource) restrictions you may only have some diphone/nphone databases available in your installation. The function name that is the value of -@code{voice_default} is called immediately after @file{siteinit.scm} is +@code{voice_default} is called immediately after @file{/etc/festival/siteinit.scm} is loaded offering the opportunity for you to change it. In the standard distribution no change should be required. If you download all the distributed voices @code{voice_rab_diphone} is the default voice. You may change this for a site by adding -the following to @file{siteinit.scm} or per person by changing +the following to @file{/etc/festival/siteinit.scm} or per person by changing your @file{.festivalrc}. For example if you wish to change the default voice to the American one @code{voice_ked_diphone} @lisp @@ -1053,8 +1055,8 @@ Note the single quote, and note that unlike in early versions @cindex @file{.festivalrc} @cindex user initialization A second level of customization is on a per user basis. After loading -@file{init.scm}, which includes @file{sitevars.scm} and -@file{siteinit.scm} for local installation, Festival loads the file +@file{init.scm}, which includes @file{/etc/festival/siteinit.scm} +for local installation, Festival loads the file @file{.festivalrc} from the user's home directory (if it exists). This file may contain arbitrary Festival commands. @@ -1106,7 +1108,7 @@ Can't access NAS server You have selected NAS as the audio output but have no server running on that machine or your @code{DISPLAY} or @code{AUDIOSERVER} environment variable is not set properly for your output device. Either set these -properly or change the audio output device in @file{lib/siteinit.scm} as +properly or change the audio output device in @file{/etc/festival/siteinit.scm} as described above. Ensure your audio device actually works the way you think it does. On @@ -1136,7 +1138,7 @@ about which voices are installed. It assumes that @code{voice_rab_diphone} (@file{festvox_rabxxxx.tar.gz}) is the default voice and that @code{voice_ked_diphone} and @code{voice_don_diphone} (@file{festvox_kedxxxx.tar.gz} and @file{festvox_don.tar.gz}) are -installed. Also local settings in your @file{festival/lib/siteinit.scm} +installed. Also local settings in your @file{/etc/festival/siteinit.scm} may affect these tests. However, after installation it may be worth trying @example @@ -6500,7 +6502,7 @@ The variable @code{voice-path} conatins a list of directories where voices will be automatically searched for. If this is not set it is set automatically by appending @file{/voices/} to all paths in festival @code{load-path}. You may add new directories explicitly to this -variable in your @file{sitevars.scm} file or your own @file{.festivalrc} +variable in your @file{/etc/festival/siteinit.scm} file or your own @file{.festivalrc} as you wish. Each voice directory is assumed to be of the form @@ -6546,7 +6548,7 @@ file and call the real definition if it exists in the file. This is only a recommended method to make adding new voices easier, it may be ignored if you wish. However we still recommend that even if you use your own convetions for adding new voices you consider the autoload -function to define them in, for example, the @file{siteinit.scm} file or +function to define them in, for example, the @file{/etc/festival/siteinit.scm} file or @file{.festivalrc}. The autoload function takes three arguments: a function name, a file containing the actual definiton and a comment. For example a definition of voice can be done explicitly by diff --git a/festival/lib/init.scm b/festival/lib/init.scm index 90bccb7..c4a903b 100644 --- festival/lib/init.scm +++ festival/lib/init.scm @@ -42,6 +42,10 @@ "home-directory Place looked at for .festivalrc etc.") +;;; system-wide startup initialization +(if (probe_file (path-append sysconfdir "sitevars.scm")) + (load (path-append sysconfdir "sitevars.scm"))) + ;;; User startup initialization, can be used to override load-path ;;; to allow alternate basic modules to be loaded. (if (probe_file (path-append home-directory ".siodvarsrc")) @@ -50,11 +54,6 @@ (if (probe_file (path-append home-directory ".festivalvarsrc")) (load (path-append home-directory ".festivalvarsrc"))) -;;; A chance to set various variables to a local setting e.g. -;;; lexdir, voices_dir audio etc etc. -(if (probe_file (path-append libdir "sitevars.scm")) - (load (path-append libdir "sitevars.scm"))) - ;;; CSTR siod extensions (require 'cstr) @@ -98,7 +97,7 @@ (t ;; can't find direct support so guess that /dev/audio for 8k ulaw exists (Parameter.def 'Audio_Method 'sunaudio))) ;;; If you have an external program to play audio add its definition -;;; in siteinit.scm +;;; in ~/.festivalrc or in /etc/festival/siteinit.scm ;;; The audio spooler doesn't work under Windows so redefine audio_mode (if (member 'mplayeraudio *modules*) @@ -135,8 +134,8 @@ ;;; ;;; Local site initialization, if the file exists load it ;;; -(if (probe_file (path-append libdir "siteinit.scm")) - (load (path-append libdir "siteinit.scm"))) +(if (probe_file (path-append sysconfdir "siteinit.scm")) + (load (path-append sysconfdir "siteinit.scm"))) ;;; User initialization, if a user has a personal customization ;;; file loaded it diff --git a/festival/lib/synthesis.scm b/festival/lib/synthesis.scm index 69c5d56..50eb9f1 100644 --- festival/lib/synthesis.scm +++ festival/lib/synthesis.scm @@ -68,7 +68,7 @@ The default list of functions to be run on all synthesized utterances after Wave_Synth. This will normally be nil but if for some reason you need to change the gain or rescale *all* waveforms you could set the - function here, in your siteinit.scm.") + function here, in your /etc/festival/siteinit.scm.") (defvar after_synth_hooks default_after_synth_hooks "after_synth_hooks diff -ur festival.orig/lib/voices.scm festival/lib/voices.scm --- festival.orig/lib/voices.scm 2005-05-02 10:20:37.000000000 -0400 +++ festival/lib/voices.scm 2007-03-15 12:00:19.000000000 -0400 @@ -45,12 +45,12 @@ (defvar system-voice-path '( ) "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.") + found, this can be redefined in /etc/festival/sitevars.scm if desired.") (defvar system-voice-path-multisyn '( ) "system-voice-path-multisyn Additional directory not near the load path where multisyn voices can be - found, this can be redefined in lib/sitevars.scm if desired.") + found, this can be redefined in /etc/festival/sitevars.scm if desired.") (defvar voice-path (remove-duplicates diff --git a/festival/INSTALL b/festival/INSTALL index 862a2b7..e285962 100644 --- festival/INSTALL +++ festival/INSTALL @@ -415,7 +415,7 @@ doesn't, here are some possible problems. You have selected NAS as the audio output but have no server running on that machine or your `DISPLAY' or `AUDIOSERVER' environment variable is not set properly for your output device. Either set these properly -or change the audio output device in `lib/siteinit.scm' as described +or change the audio output device in `siteinit.scm' as described above. Ensure your audio device actually works the way you think it does. @@ -441,7 +441,7 @@ assumptions about which voices are installed. It assumes that `voice_rab_diphone' (`festvox_rabxxxx.tar.gz') is the default voice and that `voice_ked_diphone' and `voice_don_diphone' (`festvox_kedxxxx.tar.gz' and `festvox_don.tar.gz') are installed. -Also local settings in your `festival/lib/siteinit.scm' may affect +Also local settings in your `siteinit.scm' may affect these tests. However, after installation it may be worth trying gnumake test from the `festival/' directory. This will do various tests