Festival Speech Synthesis System: - Speech Resource Pages
Festival Speech Synthesis System: - Speech Resource Pages
Festival Speech Synthesis System: - Speech Resource Pages
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
#include "festival.h"<br />
static LISP utt_rtsynth(LISP utt)<br />
{<br />
EST_Utterance *u = get_c_utt(utt);<br />
// Do format synthesis<br />
return utt;<br />
}<br />
void festival_rsynth_init()<br />
{<br />
proclaim_module("rsynth");<br />
}<br />
festival_def_utt_module("Rsynth_Synth",utt_rsynth,<br />
"(Rsynth_Synth UTT)<br />
A simple formant synthesizer");<br />
...<br />
Integration of the code in optional (and standard directories) is done by automatically creating<br />
`src/modules/init_modules.cc' for the list of standard directories plus those defined as<br />
ALSO_INCLUDE. A call to a function called festival_DIRNAME_init() will be made.<br />
This mechanism is specifically designed so you can add modules to the system without changing anything in the<br />
standard distribution.<br />
[ < ] [ > ] [ > ] [Top] [Contents] [Index] [ ? ]<br />
27.2.4 Example 4: adding new LISP objects<br />
This third examples shows you how to add a new Object to Scheme and add wraparounds to allow manipulation<br />
within the the Scheme (and C++) domain.<br />
Like example 2 we are assuming this is done in a new directory. Suppose you have a new object called Widget that<br />
can transduce a string into some other string (with some optional continuous parameter. Thus, here we create a new<br />
file `widget.cc' like this<br />
#include "festival.h"<br />
#include "widget.h" // definitions for the widget class<br />
In order to register the widgets as Lisp objects we actually need to register them as EST_Val's as well. Thus we now<br />
need<br />
VAL_REGISTER_CLASS(widget,Widget)<br />
SIOD_REGISTER_CLASS(widget,Widget)<br />
The first names given to these functions should be a short mnenomic name for the object that will be used in the<br />
defining of a set of access and construction functions. It of course must be unique within the whole systems. The<br />
second name is the name of the object itself.<br />
To understand its usage we can add a few simple widget maniplutation functions