tags:

views:

343

answers:

2

I want to use Festival TTS with my C++ programme.

So i have downloaded all files form http://www.cstr.ed.ac.uk/downloads/festival/2.0.95/

then i start reading manual(http://www.cstr.ed.ac.uk/projects/festival/manual/festival_28.html) for C++ API but in manual they says that:

In order to use Festival you must include festival/src/include/festival.h' which in turn will include the necessary other include files infestival/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 withfestival/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. "

I am using UBUNTU 10.04(festival package is by default installed and i can use it form terminal by festival command) and GCC 4.4.3

but the problem is that i am new to GCC and i am not understanding which files i have to include in order to run my C++ code and i also don't know how to link libraries with my c++ code.

So please tell me exactly which files i have to include and how to link with libraries if anyone already use festival tts with c++ then please post your code

Thanks

A: 

1) #include <festival.h> at the beginning of your program (because you have it installed). It could also be festival/festival.h or something like that (it depends on how does the package install) - and I can't say exactly, because I've never used it. Still I assume the first variant would work by default.

2) Link all the libraries you need (those three which you'll definitely need are listed in your bold text) using appropriate GCC switch. If you're not familiar with GCC syntax, you'd better read some manuals / google it, because there's a lot of important information.

P.S Instead of adding the static libraries via console switch, you could definitely write an appropriate makefile for your project. But the situation here is the same as with GCC switches - there is are many different manuals about using makefiles and I definitely won't copy/paste them in this answer.

Kotti
Thanks Kotti but please tell that as i know festival is already installed in my system(by default) so should i reinstall it from downloaded files
Peeyush
I guess you should try doing building your application without changing anything for now and only try to reinstall / investigate further if you have problems.
Kotti
A: 

While the festival command line program might be installed, the headers for developing programs based on festival are in a different package -- ensure that you've got the festival-dev package installed too.

Andrew Aylett