Next: C only API, Previous: Server/client API, Up: API [Contents][Index]
As well as offerening an interface through Scheme and the shell some users may also wish to embedd Festival within their own C++ programs. A number of simply to use high level functions are available for such uses.
In order to use Festival you must include festival/src/include/festival.h which in turn will include the necessary other include files in festival/src/include and speech_tools/include you should ensure these are included in the include path for you your program. Also you will need to link your program with festival/src/lib/libFestival.a, speech_tools/lib/libestools.a, speech_tools/lib/libestbase.a and speech_tools/lib/libeststring.a as well as any other optional libraries such as net audio.
The main external functions available for C++ users of Festival are.
void festival_initialize(int load_init_files,int heapsize);This must be called before any other festival functions may be called. It sets up the synthesizer system. The first argument if true, causes the system set up files to be loaded (which is normally what is necessary), the second argument is the initial size of the Scheme heap, this should normally be 210000 unless you envisage processing very large Lisp structures.
int festival_say_file(const EST_String &filename);