Skip to content

Instantly share code, notes, and snippets.

@laic
Last active October 19, 2022 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laic/519deca91d50b1ed19307d0c80cb788e to your computer and use it in GitHub Desktop.
Save laic/519deca91d50b1ed19307d0c80cb788e to your computer and use it in GitHub Desktop.
Install festival on mac (Speech Processing course voice)
## This assumes you have a working C++ compiler, and standard install tools like make
## You may need to install Xcode command line tools for the Mac.
## See: https://www.freecodecamp.org/news/install-xcode-command-line-tools/
## These instructions should also work for linux, but all the compilation tools should already be installed.
## Change the following to your actual UUN rather than s1234567
YOUR_UUN=s1234567
## make a working directory
mkdir -p speech_processing/tools
cd speech_processing/tools
## set an environment variable to capture the actual directory path so we can easily refer to it later
INSTALL_DIR=`pwd`
## check this prints out what you expect
echo $INSTALL_DIR
## go to the installation directory
cd $INSTALL_DIR
## The next bit is copied from the instructions on the Ophelia github page (install festival)
## download the code for speech tools and festival
wget http://www.cstr.ed.ac.uk/downloads/festival/2.4/festival-2.4-release.tar.gz
wget http://www.cstr.ed.ac.uk/downloads/festival/2.4/speech_tools-2.4-release.tar.gz
## unzip and unarchive the files
tar xvf festival-2.4-release.tar.gz
tar xvf speech_tools-2.4-release.tar.gz
## Install Speech tools first
cd speech_tools
./configure --prefix=$INSTALL_DIR
make
## lots of warning messages, but as long as there's not actual errors you're ok
## Then compile Festival
cd ../festival
./configure --prefix=$INSTALL_DIR
make
## Get data from the AT lab servers
## the password should be your ease password
cd lib
## get the speech database for the voice we'll use in the speech processing course assignment 1
rsync -avz $YOUR_UUN@scp1.ppls.ed.ac.uk:/Volumes/Network/courses/ss/festival/lib.incomplete/./voices-multisyn/english/cstr_edi_awb_arctic_multisyn . --relative
## The voice above (awb) is a unit selection voice. You can also download a diphone synthesis voice (kal) for comparison.
## But note you should only analyse the awb voice for the assignment.
sync -avz $YOUR_UUN@scp1.ppls.ed.ac.uk:/Volumes/Network/courses/ss/festival/lib.incomplete/./voices/english/kal_diphone . --relative
## get the dictionary
rsync -avz $YOUR_UUN@scp1.ppls.ed.ac.uk:/Volumes/Network/courses/ss/festival/lib.incomplete/dicts .
## Add this installation of festival to the beginning of your PATH, so the computer knows where to look
## to run the application
export PATH=$INSTALL_DIR/festival/bin:$PATH
## the which command tells you where the command is actually being run from
## useful if you have multiple versions of things
which festival
## this should print the path the your installation of festival
## if you start festival from the command line now it will say it's missing a default voice.
## This is set by starting festival with the config.scm file (see below)
## but you can also set the voice using the command
## (voice_cstr_edi_awb_arctic_multisyn)
## after starting festival on the command line
## Now put the config file in your assignment directory as suggested in the instructions
## I'll just put it 'next to' the tools directory, but you can put it wherever is convenient
cd $INSTALL_DIR
cd ..
## check which directory we're now in (present working directory):
pwd
## make the assignment1 directory
mkdir assignment1
cd assignment1
## copy the config.scm file
rsync -avz $YOUR_UUN@scp1.ppls.ed.ac.uk:/Volumes/Network/courses/sp/assignment1/config.scm .
## set the permissions to readable (incase it's not!)
chmod ugo+r config.scm
## start festival
festival config.scm
## In festival try out a command: e.g., (set! myutt (SayText "Welcome to Festival"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment