12.12.2012 Views

Festival Speech Synthesis System: - Speech Resource Pages

Festival Speech Synthesis System: - Speech Resource Pages

Festival Speech Synthesis System: - Speech Resource Pages

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

held), and voices_dir (pointing to voice directories) should be reset here if necessary.<br />

The default installation will try to find its lexicons and voices automatically based on the value of load-path (this<br />

is derived from FESTIVAL_HOME at compilation time or by using the --libdir at run-time). If the voices and<br />

lexicons have been unpacked into subdirectories of the library directory (the default) then no site specific<br />

initialization of the above pathnames will be necessary.<br />

The second site specific file is `siteinit.scm'. Typical examples of local initialization are as follows. The<br />

default audio output method is NCD's NAS system if that is supported as that's what we use normally in CSTR. If it<br />

is not supported, any hardware specific mode is the default (e.g. sun16audio, freebas16audio, linux16audio or<br />

mplayeraudio). But that default is just a setting in `init.scm'. If for example in your environment you may wish<br />

the default audio output method to be 8k mulaw through `/dev/audio' you should add the following line to your<br />

`siteinit.scm' file<br />

(Parameter.set 'Audio_Method 'sunaudio)<br />

Note the use of Parameter.set rather than Parameter.def the second function will not reset the value if it is<br />

already set. Remember that you may use the audio methods sun16audio. linux16audio or<br />

freebsd16audio only if NATIVE_AUDIO was selected in `speech_tools/config/config' and your<br />

are on such machines. The <strong>Festival</strong> variable *modules* contains a list of all supported functions/modules in a<br />

particular installation including audio support. Check the value of that variable if things aren't what you expect.<br />

If you are installing on a machine whose audio is not directly supported by the speech tools library, an external<br />

command may be executed to play a waveform. The following example is for an imaginary machine that can play<br />

audio files through a program called `adplay' with arguments for sample rate and file type. When playing<br />

waveforms, <strong>Festival</strong>, by default, outputs as unheadered waveform in native byte order. In this example you would set<br />

up the default audio playing mechanism in `siteinit.scm' as follows<br />

(Parameter.set 'Audio_Method 'Audio_Command)<br />

(Parameter.set 'Audio_Command "adplay -raw -r $SR $FILE")<br />

For Audio_Command method of playing waveforms <strong>Festival</strong> supports two additional audio parameters.<br />

Audio_Required_Rate allows you to use <strong>Festival</strong>s internal sample rate conversion function to any desired rate.<br />

Note this may not be as good as playing the waveform at the sample rate it is originally created in, but as some<br />

hardware devices are restrictive in what sample rates they support, or have naive resample functions this could be<br />

optimal. The second addition audio parameter is Audio_Required_Format which can be used to specify the<br />

desired output forms of the file. The default is unheadered raw, but this may be any of the values supported by the<br />

speech tools (including nist, esps, snd, riff, aiff, audlab, raw and, if you really want it, ascii).<br />

For example suppose you run <strong>Festival</strong> on a remote machine and are not running any network audio system and want<br />

<strong>Festival</strong> to copy files back to your local machine and simply cat them to `/dev/audio'. The following would do<br />

that (assuming permissions for rsh are allowed).<br />

(Parameter.set 'Audio_Method 'Audio_Command)<br />

;; Make output file ulaw 8k (format ulaw implies 8k)<br />

(Parameter.set 'Audio_Required_Format 'ulaw)<br />

(Parameter.set 'Audio_Command<br />

"userhost=`echo $DISPLAY | sed 's/:.*$//'`; rcp $FILE $userhost:$FILE; \<br />

rsh $userhost \"cat $FILE >/dev/audio\" ; rsh $userhost \"rm $FILE\"")<br />

Note there are limits on how complex a command you want to put in the Audio_Command string directly. It can get<br />

very confusing with respect to quoting. It is therefore recommended that once you get past a certain complexity<br />

consider writing a simple shell script and calling it from the Audio_Command string.<br />

A second typical customization is setting the default speaker. Speakers depend on many things but due to various<br />

licence (and resource) restrictions you may only have some diphone/nphone databases available in your installation.<br />

The function name that is the value of voice_default is called immediately after `siteinit.scm' is loaded<br />

offering the opportunity for you to change it. In the standard distribution no change should be required. If you<br />

download all the distributed voices voice_rab_diphone is the default voice. You may change this for a site by

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!