Hardware Reference
In-Depth Information
Speech Synthesis
This is the easy part of the problem, because the hard work has already been done for us, with one of the
pacakages available.
Festival
The daddy in this field is a package called Festival ( http://www.cstr.ed.ac.uk/projects/festival/ ). Festival began
in 2004 from the Centre for Speech Technology Research (CSTR) at the University of Edinburgh where it still resides,
although recent functionality has been provided by many sources, including Carnegie Melon University, because
of its open source license. It generates words through a complex system of phonemes and prosodics and is able to
handle the nuances of different languages by manipulating these dynamically with language-specific code, handled
by Festival's built-in Scheme interpreter.
The basic install of Festival is available with most distributions, albeit with a limited set of voices. A quick study of
/usr/share/festival will show you how many. These can be sampled by running Festival and using the interactive
prompt:
$ festival
Festival Speech Synthesis System 1.96:beta July 2004
Copyright (C) University of Edinburgh, 1996-2004. All rights reserved.
For details type `(festival_warranty)`
festival> (SayText "Hello automation")
#<Utterance 0xb6a8eff8>
festival> (voice_lp_diphone)
lp_diphone
festival> (SayText "Hello automation")
#<Utterance 0xb6c56ec8>
festival> (quit)
The brackets notation is because of the Scheme interpreter that's processing the commands, and the lp_diphone
reference is an alternative Italian female “voice” that's often supplied by default. Before you go any further, write a
short script to simplify the speaking process (apologies for the obvious English bias):
#!/bin/bash
SPEAKER=/usr/share/festival/voices/english/$1
if [ -d $SPEAKER ]; then
VOX=\(voice_$1\)
fi
shift
echo "$VOX (SayText \"" $* "\")" | festival --pipe
You can then call the following:
say default Hello automation
or the following to more easily switch to an alternate voice:
say kal_diphone Hello automation
Search WWH ::




Custom Search