**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. "**
but the problem is that i am bad GCC and I don't know which files i have to include in order to run C++ code and i also don't know how to link libraries with my c++ code.
So what g++ command should I use to compile this file ?
#include "festival.h"
#include <iostream>
int main(int argc, char **argv){
EST_Wave wave;
int heap_size = 210000; // default scheme heap size
int load_init_files = 1; // we want the festival init files loaded
festival_initialize(load_init_files,heap_size);
// Say simple file
festival_say_file("/etc/motd");
festival_eval_command("(voice_ked_diphone)");
// Say some text;
festival_say_text("hello world");
// Convert to a waveform
festival_text_to_wave("hello world",wave);
wave.save("/tmp/wave.wav","riff");
// festival_say_file puts the system in async mode so we better
// wait for the spooler to reach the last waveform before exiting
// This isn't necessary if only festival_say_text is being used (and
// your own wave playing stuff)
festival_wait_for_spooler();
return 0;
}
You will need to find festival.h on your hard drive, and use a -I option to tell g++ where the folder that holds festival.h is. The .a files that are mentioned can be located with -L option to tell g++ where the lib folders are that hold the .a files. You also need -l(lowercase L) option to specify what .a files you are including.