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.
command interpreter. Without this option `-b' <strong>Festival</strong> will load `hello.scm' and then accept commands on<br />
standard input. This can be convenient when some initial set up is required for a session.<br />
Note one disadvantage of the batch method is that time is required for <strong>Festival</strong>'s initialisation every time it starts up.<br />
Although this will typically only be a few seconds, for saying short individual expressions that lead in time may be<br />
unacceptable. Thus simply executing the commands within an already running system is more desirable, or using the<br />
server/client mode.<br />
Of course its not just about strings of commands, because Scheme is a fully functional language, functions, loops,<br />
variables, file access, arithmetic operations may all be carried out in your Scheme programs. Also, access to Unix is<br />
available through the system function. For many applications directly programming them in Scheme is both the<br />
easiest and the most efficient method.<br />
A number of example <strong>Festival</strong> scripts are included in `examples/'. Including a program for saying the time, and<br />
for telling you the latest news (by accessing a page from the web). Also see the detailed discussion of a script<br />
example in See section 29.1 POS Example.<br />
[ < ] [ > ] [ > ] [Top] [Contents] [Index] [ ? ]<br />
28.2 Shell API<br />
The simplest use of <strong>Festival</strong> (though not the most powerful) is simply using it to directly render text files as speech.<br />
Suppose we have a file `hello.txt' containing<br />
Hello world. Isn't it excellent weather<br />
this morning.<br />
We can simply call <strong>Festival</strong> as<br />
unix$ festival --tts hello.txt<br />
Or for even simpler one-off phrases<br />
unix$ echo "hello " | festival --tts<br />
This is easy to use but you will need to wait for <strong>Festival</strong> to start up and initialise its databases before it starts to render<br />
the text as speech. This may take several seconds on some machines. A socket based server mechanism is provided in<br />
<strong>Festival</strong> which will allow a single server process to start up once and be used efficiently by multiple client programs.<br />
Note also the use of Sable for marked up text, see section 10. XML/SGML mark-up. Sable allows various forms of<br />
additional information in text, such as phrasing, emphasis, pronunciation, as well as changing voices, and inclusion<br />
of external waveform files (i.e. random noises). For many application this will be the preferred interface method.<br />
Other text modes too are available through the command line by using auto-text-mode-alist.<br />
[ < ] [ > ] [ > ] [Top] [Contents] [Index] [ ? ]<br />
28.3 Server/client API<br />
<strong>Festival</strong> offers a BSD socket-based interface. This allows <strong>Festival</strong> to run as a server and allow client programs to<br />
access it. Basically the server offers a new command interpreter for each client that attaches to it. The server is forked<br />
for each client but this is much faster than having to wait for a <strong>Festival</strong> process to start from scratch. Also the server<br />
can run on a bigger machine, offering much faster synthesis.<br />
Note: the <strong>Festival</strong> server is inherently insecure and may allow arbitrary users access to your machine.