How To Install MBROLA Voices For Use With Festival On Ubuntu

Festival is a great text-to-speech engine. MBROLA also contains some impressive voice files that have notably higher quality than Festival’s default voices. Both of these systems are packaged in Ubuntu, and even though Festival can use MBROLA’s voice files, as of Ubuntu 10.04, there doesn’t seem to be a package to easily allows you to do this.

There’s an excellent guide on how to accomplish this manually. However, since it was written, a few more packages are now included in Ubuntu, allowing several steps to be skipped. Since most of the MBROLA voices are available as packages, the only steps needed to use them from Festival are to download a Festival-to-MBROLA wrapper and move the MBROLA voice files into Festival’s directory.

The following script installs MBROLA’s male British English voice for use with Festival. All MBROLA voices are represented by a “two-letter number” combination (e.g. en1). To install a different voice, change the VOICE variable to suit.

#!/bin/bash
set -e
 
VOICE=en1
VLANG=english
 
# Install all required packages.
sudo apt-get install festival mbrola mbrola-${VOICE} esound-clients festlex-oald
 
# Download wrappers for mbrola voices.
cd ~/Desktop
wget http://www.cstr.ed.ac.uk/downloads/festival/1.95/festvox_${VOICE}.tar.gz
tar xvf festvox_${VOICE}.tar.gz
rm -f festvox_${VOICE}.tar.gz
 
# Copy MBROLA voices into Festival's voice directory.
sudo mkdir -p /usr/share/festival/voices/${VLANG}/${VOICE}_mbrola/${VOICE}
sudo mv festival/lib/voices/${VLANG}/${VOICE}_mbrola/* /usr/share/festival/voices/${VLANG}/${VOICE}_mbrola/
sudo cp /usr/share/mbrola/voices/${VOICE} /usr/share/festival/voices/${VLANG}/${VOICE}_mbrola/${VOICE}
 
# Cleanup.
rm -rf ~/Desktop/festival
 
# Test.
echo '(voice_'${VOICE}'_mbrola)(SayText "Installation complete!")' | esddsp festival --pipe

One Response to “How To Install MBROLA Voices For Use With Festival On Ubuntu”

  1. Thanks for this little hint. This voice is way better than the one I was using.

Leave a Reply