Festival is a general multi-lingual speech synthesis system developed at CSTR (Centre for Speech Technology Research). It offers a general framework for building speech synthesis systems as well as including examples of various modules. As a whole it offers full text to speech through a number APIs: from shell level, though a Scheme command interpreter, as a C++ library, from Java, and an Emacs interface. Festival is multi-lingual (currently British English, American English, Italian, Czech and Spanish, with other languages available in prototype.)
Install the package. Voices are available with and packages.
The IMS of the University Stuttgart developed an extension to Festival especially for German language (see here). It uses German voices with AUR. To use it, install AUR with IMS Stuttgart patches. This should add support for the german voices de1 through de4. Install at least one of the voices (listed as optional dependencies), e.g. AUR.
There is no global
/etc/ configuration file, but you can configure festival with your
~/.festivalrc file, or by directly editing
/usr/share/festival/festival.scm. Both of these are scheme files, using scheme syntax and rerun everytime festival is run.
The following allows Festival to work if audio from other sources is already playing. Add to your config:
(Parameter.set 'Audio_Required_Format 'aiff) (Parameter.set 'Audio_Method 'Audio_Command) (Parameter.set 'Audio_Command "paplay $FILE --client-name=Festival --stream-name=Speech")
For ALSA: 
(Parameter.set 'Audio_Method 'Audio_Command) (Parameter.set 'Audio_Command "aplay -q -c 1 -t raw -f s16 -r $SR $FILE")
Arch splits the set of official voices into AUR has some others, in various states of maintenance which may or may not be currently working.(recommended) and . The
To see what voices are currently installed and what the default is, first enter Festival's #Interactive shell (a REPL scheme). To permanently change the default voice add it to your config, for example:
(set! voice_default voice_cmu_us_rms_cg)
/usr/share/festival/siteinit.scm to apply for all users.
You can also get voices straight from Festvox  . You will need to unzip and move the folder containing the voice to
/usr/share/festival/voices/ and the way to tell what folder contains the voice is to look for a
festvox/ subfolder inside of it. You can then test that your new voices are found by loading up the festival prompt.
To read a text file:
$ festival --tts text_file
To read a selection you highlighted with the cursor:
$ xsel | festival --tts
Convert a text file to an mp3 audio:
$ text2wave text_file | lame - text.mp3
Record audio with a select voice:
$ text2wave -o output.wav -eval '(voice_german_de2_os)' text_file
Festival has an interactive prompt you can use for testing. Type
festival to enter it. The following are some examples:
To show the voice festival speaks with:
To list available voices:
To select another voice, enter
(voice_name). For example:
To hear it speak:
(SayText "Arch makes me happy")
To list available commands:
To exit the shell:
Can't open /dev/dsp
If festival returns the following error message:
Linux: can't open /dev/dsp
See #Sound server above.
Alsa playing at wrong speed
If the solution above gives you a squeaky voice, you might want to try changing your aplay options:
(Parameter.set 'Audio_Method 'Audio_Command) (Parameter.set 'Audio_Command "aplay -Dplug:default -f S16_LE -r $SR $FILE")
Command aplay not found
Killing festival process doesn't stop audio
Killing a background festival process will not stop the audio from continuing to play.
To stop audio from playing, the child
audsp processes must be killed. This can be done by executing:
$ pkill -v audsp
InstallAUR to use Festival with (i.e. in Firefox's Reader).