### 28.2 Shell API ¶

The simplest use of Festival (though not the most powerful) is simply using it to directly render text files as speech. Suppose we have a file `hello.txt` containing

    Hello world.  Isn't it excellent weather
    this morning.

We can simply call Festival as

    unix$ festival --tts hello.txt

Or for even simpler one-off phrases

    unix$ echo "hello " | festival --tts

This is easy to use but you will need to wait for Festival to start up and initialise its databases before it starts to render the text as speech. This may take several seconds on some machines. A socket based server mechanism is provided in Festival which will allow a single server process to start up once and be used efficiently by multiple client programs.

Note also the use of Sable for marked up text, see XML/SGML mark-up. Sable allows various forms of additional information in text, such as phrasing, emphasis, pronunciation, as well as changing voices, and inclusion of external waveform files (i.e. random noises). For many application this will be the preferred interface method. Other text modes too are available through the command line by using `auto-text-mode-alist`.