Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37506004
en ru br
ALT Linux repos
S:2.5-alt0.4
5.0: 1.96-alt6
4.1: 1.96-alt5.M41.1
4.0: 1.96-alt2.6
3.0:
+backports:1.96-alt0.M30.1

Other repositories
Upstream:1.96-beta

Group :: Sound
RPM: festival

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 11-siteinit.diff
Download


This patch is part of a series of patches for festival for
Debian GNU/Linux, to provide Debian specific site initialization
--- a/lib/synthesis.scm
+++ b/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.scm.")
 
 (defvar after_synth_hooks default_after_synth_hooks
   "after_synth_hooks
--- a/lib/init.scm
+++ b/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 "festivalvars.scm"))
+	(load (path-append sysconfdir "festivalvars.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)
 
@@ -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 "festival.scm"))
+    (load (path-append sysconfdir "festival.scm")))
 
 ;;;  User initialization, if a user has a personal customization
 ;;;  file loaded it
--- a/doc/festival.texi
+++ b/doc/festival.texi
@@ -942,14 +942,15 @@
 @cindex initialization
 @cindex installation initialization
 @cindex @file{init.scm}
-@cindex @file{siteinit.scm}
+@cindex @file{/etc/festival.scm}
+@cindex @file{/etc/festivalvars.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/festivalvars.scm} and @file{/etc/festival.scm} if they exist.
+@file{/etc/festivalvars.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
@@ -957,17 +958,17 @@
 @code{voices_dir} (pointing to voice directories) should
 be reset here if necessary.
 
-@cindex change libdir at run-time
+@cindex change libdir or datadir at run-time
 @cindex run-time configuration
 @cindex @code{load-path}
 The default installation will try to find its lexicons and voices
 automatically based on the value of @code{load-path} (this is derived
-from @code{FESTIVAL_HOME} at compilation time or by using the @code{--libdir}
+from @code{FESTIVAL_HOME} at compilation time or by using the @code{--datadir}
 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.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
@@ -975,7 +976,7 @@
 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.scm} file
 @lisp
 (Parameter.set 'Audio_Method 'sunaudio)
 @end lisp
@@ -996,7 +997,7 @@
 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.scm} as follows
 @lisp
 (Parameter.set 'Audio_Method 'Audio_Command)
 (Parameter.set 'Audio_Command "adplay -raw -r $SR $FILE")
@@ -1042,12 +1043,12 @@
 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.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.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
@@ -1059,8 +1060,8 @@
 @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.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.
 
@@ -1091,7 +1092,9 @@
 Copyright (C) University of Edinburgh, 1996-2003. All rights reserved.
 For details type `(festival_warranty)'
 festival> libdir
-"/projects/festival/lib/"
+"/usr/lib/festival"
+festival> datadir
+"/usr/share/festival"
 festival> ^D
 @end example
 This should show the pathname you set in your @file{config/config}.
@@ -1112,7 +1115,7 @@
 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{lib/festival.scm} as
 described above.
 
 Ensure your audio device actually works the way you think it does.  On
@@ -1142,7 +1145,7 @@
 @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.scm}
 may affect these tests.  However, after installation it may
 be worth trying
 @example
@@ -6552,7 +6555,7 @@
 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.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
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin