![]() |
LINGUIST 138/238     -     SYMBSYS 138   -     Autumn 2004
Homework 4: Speech Synthesis |
| Due: October 26 at the start of class |
Read this entire page before starting!!
For these exercises, you may work in groups. Non-native speakers will probably need to team up with a native speaker. The festival exercises are from Alan Black's course.
(4.1) Find and correct the mistakes in the ARPAbet transcriptions of the following words:
(4.2) Transcribe the following words into the ARPAbet.
(4.3) Get Festival to say "Hello World". Don't wait for this until the night before the homework is due.
(4.4) Go to the Demo site for the Rhetorical Systems Text-to-Speech company. Test out the site by choosing at least seven different sentences (paste them from another web site, or make up things). Try to be creative, including questions, exclamations, or whatever. Try at least two different voices. (You may have to choose "Download wav file" and play it twice, if the speech sound gets cut off as it plays the first time while it downloads.). Write down at least 5 errors that you hear; note whether these errors are in the phones, in the intonation/prosody, or something else.
(4.5) Make Festival say your entire name (first and last)
(4.6) Make Festival say the first and last name of everyone in the class. You will probably need to ask at least some people how to pronounce their names. Remember to do this in advance, during class.
You should do this by adding explicit pronunciations to the lexicon of any names that festival says incorrectly.
How to turn it in:
.
lastname_firstname_hw#.scm
lastname_firstname_hw#.doc (or ,txt,etc)
Here's various useful hints and helps about getting started
First, where is Festival?
/afs/ir/class/linguist238/festival/bin/festival:
It is compiled for Dell (Intel) LINUX machines. That means it runs on firebird and raptor of the Sweet Hall machines; it will not run on the Sun machines in Sweet Hall, only the linux machines.
You can only hear the output from festival if you are physically sitting at the machines listening to the speakers. So you have to go to Sweet Hall. Unless you have remarkably good hearing. Since the sound will come out somewhere in Sweet Hall. (Probably startling everyone there).
If you have access to another Linux machine, some versions of linux come preloaded with Festival. If you can find one that does, (like if you have your own linux machine or something) feel free to use that instead of the class copy of Festival.
The simplest way to run festival is to create a small "Scheme" script file called "myrules.scm", which has the following first line:
(voice_kal_diphone)
and the lines afterward have your "lex.add.entry" commands.
Then you run your new file as follows:
festival myrules.scm
For advanced questions, a useful festival script saytime and other examples are in
/afs/ir/class/linguist238/festival/examples
I recommend you add the following to your PATH variable:
/afs/ir/class/linguist238/festival/bin/
Recall that there are three commonly-used ways to run festival: You can have festival synthesize things directly from the shell:
echo My name is ... | festival --ttsor within the command interpreter with the command:
(SayText "My name is ...")in the command interpreter, or you can write a script like the script example
saytime (in "examples/saytime").
If your name is not pronounced properly you can add new
entries to the lexicon using the the function lex.add.entry
For example the default synthesizer pronounces Ronald Reagan's
second name wrongly so we can redefine the pronunciation as
(lex.add.entry
'("reagan" n (((r ey) 1) ((g ax n) 0))))
To find out what the phoneme set is and possible formats, it is often useful
to lookup similar words. Use the lex.lookup function as in
(lex.lookup 'reagan)then copy the entry changing it as desired.
To keep the pronunciation add it to your `.festivalrc' in your home directory. This file is automatically loaded every time you run Festival so then it will always know about your name. (Since some people have had problems with the .festivalrc file, if you also have problems, just do "festival myrules.scm" instead) Because there are different lexicons for different languages/dialects you must first select the lexicon/voice first before setting the new pronunciation.
(voice_kal_diphone) (lex.add.entry ...)
Advanced: Finally, if you don't have local Linux access and want to use festival from the Sweet Hall Linux machines remotely, this is possible, but slightly complicated.
The following is instructions for how to make festival store the sound in a file so you can open it locally.
At the beginning of the myrules.scm file, put in the following three lines
(Parameter.set 'Audio_Method 'Audio_Command) (Parameter.set 'Audio_Required_Format 'wav) (Parameter.set 'Audio_Command "cp $FILE myfilename.wav")
name your file whatever you want (and if you are properly kerberos logged-in, you can use an AFS path to put it someplace you can get it without having to sftp or scp it).
Hopefully this will work for you! I learned this trick from the Festival Manual section 6.3, which has some further information. If you can't get it to work, you will have to run your homework on a Linux machine at the actual console.