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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

In yout `Makefile' for this directory you'll need to add the include directory where `widget.h' is, if it is not<br />

contained within the directory itself. This done through the make variable LOCAL_INCLUDES as<br />

LOCAL_INCLUDES = -I/usr/local/widget/include<br />

And for the linker you 'll need to identify where your widget library is. In your `festival/config/config'<br />

file at the end add<br />

COMPILERLIBS += -L/usr/local/widget/lib -lwidget<br />

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

28. API<br />

If you wish to use <strong>Festival</strong> within some other application there are a number of possible interfaces.<br />

28.1 Scheme API Programming in Scheme<br />

28.2 Shell API From Unix shell<br />

28.3 Server/client API <strong>Festival</strong> as a speech synthesis server<br />

28.4 C/C++ API Through function calls from C++.<br />

28.5 C only API Small independent C client access<br />

28.6 Java and JSAPI Sythesizing from Java<br />

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

28.1 Scheme API<br />

<strong>Festival</strong> includes a full programming language, Scheme (a variant of Lisp) as a powerful interface to its speech<br />

synthesis functions. Often this will be the easiest method of controlling <strong>Festival</strong>'s functionality. Even when using<br />

other API's they will ultimately depend on the Scheme interpreter.<br />

Scheme commands (as s-expressions) may be simply written in files and interpreted by <strong>Festival</strong>, either by<br />

specification as arguments on the command line, in the interactive interpreter, or through standard input as a pipe.<br />

Suppose we have a file `hello.scm' containing<br />

;; A short example file with <strong>Festival</strong> Scheme commands<br />

(voice_rab_diphone) ;; select Gordon<br />

(SayText "Hello there")<br />

(voice_don_diphone) ;; select Donovan<br />

(SayText "and hello from me")<br />

From the command interpreter we can execute the commands in this file by loading them<br />

festival> (load "hello.scm")<br />

nil<br />

Or we can execute the commands in the file directly from the shell command line<br />

unix$ festival -b hello.scm<br />

The `-b' option denotes batch operation meaning the file is loaded and then <strong>Festival</strong> will exit, without starting the

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

Saved successfully!

Ooh no, something went wrong!