Festival is a general purpose speech synthesis tool, acting as both a standalone CLI tool or a text to speech component which can be interacted with by various other programs through it's API. The tool, developed by the Centre for Speech Technology Research at the University of Edinburgh, supports multiple languages.

Installation

Festival can be installed through the following command:

apt install festival

CLI Operations

TTS

Text files can be read directly from the terminal. To do this, simply use the following command:

festival --tts [file path]

File Output

Using the text2wave command Festival can read a file and write the results to an audio file instead of directly outputting the audio. To do this, use the following command:

 text2wave -o [output file] -eval '([voice name])'  [input file] 

Example:

 text2wave -o audio_output.wav -eval '(voice_kal_diphone)' '/home/user/Desktop/input.txt' 

Voice Configuration

To change the default voice, first open the Festival shell by typing the following into the terminal:

 Festival 

You can then list all potential commands by typing:

 help 

or list all voices by typing:

 (voice.list) 

Please note that voices must be installed manually. To choose a voice, simply type the name of the one you would like within parenthasis, for example:

 (voice_kal_diphone) 

Once complete, exit the shell by typing:

 (quit) 

Installing Additional Voices

Voices can be installed with apt by installing festvox packages included in the repo (e.g. festvox-us1), as well as through manually downloading voice data from third party developers and copying them to the /usr/festival/[language] folder.

Festival (last modified 2023-04-25 02:26:20)