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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EST_String sylname = "";<br />

Now we iterate through the SylStructure daughters of the syllable. These will be the segments in that syllable.<br />

for (seg=daughter1(syl,"SylStructure"); seg; seg=next(seg))<br />

sylname += seg->name();<br />

Finally we set the syllables name to the concatenative name, and loop to the next syllable.<br />

syl->set_name(sylname);<br />

}<br />

Finally we return the LISP form of the utterance.<br />

return utt;<br />

}<br />

[ < ] [ > ] [ > ] [Top] [Contents] [Index] [ ? ]<br />

27.2.3 Example 3: adding new directories<br />

In this example we will add a whole new subsystem. This will often be a common way for people to use <strong>Festival</strong>. For<br />

example let us assume we wish to add a formant waveform synthesizer (e.g like that in the free `rsynth'<br />

program). In this case we will add a whole new sub-directory to the modules directory. Let us call it `rsynth/'.<br />

In the directory we need a `Makefile' of the standard form so we should copy one from one of the other<br />

directories, e.g. `Intonation/'. Standard methods are used to identify the source code files in a `Makefile'<br />

so that the `.o' files are properly added to the library. Following the other examples will ensure your code is<br />

integrated properly.<br />

We'll just skip over the bit where you extract the information from the utterance structure and synthesize the<br />

waveform (see `donovan/donovan.cc' or `diphone/diphone.cc' for examples).<br />

To get <strong>Festival</strong> to use your new module you must tell it to compile the directory's contents. This is done in<br />

`festival/config/config'. Add the line<br />

ALSO_INCLUDE += rsynth<br />

to the end of that file (there are simialr ones mentioned). Simply adding the name of the directory here will add that<br />

as a new module and the directory will be compiled.<br />

What you must provide in your code is a function festival_DIRNAME_init() which will be called at<br />

initialization time. In this function you should call any further initialization require and define and new Lisp functions<br />

you with to made available to the rest of the system. For example in the `rsynth' case we would define in some<br />

file in `rsynth/'

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

Saved successfully!

Ooh no, something went wrong!