FestVox To FreeTTS |
As of FreeTTS 1.2, FreeTTS provides support to import voice data directly from FestVox. The process currently works well for US English voices, but you are definitely encouraged to try to help us make it work for other locales. This page describes the overall process for doing the import.
You must first create a voice using FestVox. We've had success using FestVox 2.0 on both Linux (RedHat 9.0) and Solaris (use gcc 3.2.2 to compile FestVox and Festival on Solaris). NOTE that we did not create FestVox, nor can we provide support for it. The creators of FestVox, however, did a great job and you can refer to their documentation for where to send any questions or comments.
FestVox currently provides support for creating two types of voices: diphone and unit selection. The diphone voices support general domain synthesis (i.e., they try to speak any text you throw at them). They are time consuming to create, and are usually not a good first choice when learning how to create voices. The unit selection, or limited domain, voices only support a limited somain (e.g., telling the time), and generally sound very good.
If you want to experiment with voice creation and conversion, we recommend you start with creating a time telling voice.
Please refer to the FestVox Documentation for information on creating a voice. Section IV.19 of the FestVox documentation provides a good tutorial on making a US Diphone voice, and Section II.5.6 provides a good tutorial on recording a cluster unit voice for the limited domain of telling the time. Section II.5 provides a good general explanation of creating a limited domain voice in general.
FreeTTS follows many of the same steps that Flite follows for importing voices. For a more detailed description of the process, please read Section 8 of the Flite documentation.
To import a voice into FreeTTS, you first need to do the following things:
export
PATH=/usr/java/j2sdk1.4.2/bin:/home/jim/festival/bin:/usr/java/apache-ant-1.5.4/bin:$PATH
export
ESTDIR=/home/jim/speech_tools
To convert a voice, run the
FestVoxToFreeTTS.sh
script from a command line
prompt located in the tools/FestVoxToFreeTTS
directory:
FestVoxToFreeTTS.sh <voicedir>
where <voicedir> is the directory the FestVox voice
resides in. The contents of
bin/ etc/ FreeTTS/ lpc/ prompt-cep/ recording/ wav/ cep/ f0/ group/ mcep/ prompt-lab/ scratch/ wavn/ dic/ festival/ lab/ pm/ prompt-utt/ sts/ wrd/ emu/ festvox/ lar/ pm_lab/ prompt-wav/ versions/
The script will automatically detect whether it is a cluster unit voice or a diphone voice by looking at the <voicedir>/etc/voice.defs file. If no such file exists, you will need to create it. An example for a time-telling voice would be something like the following:
FV_INST=sun FV_LANG=time FV_NAME=dtv FV_TYPE=ldom FV_VOICENAME=$FV_INST"_"$FV_LANG"_"$FV_NAME FV_FULLVOICENAME=$FV_VOICENAME"_"$FV_TYPE
If possible, you can let festival automatically generate
this for you. Try
<festvoxdir>/src/general/guess_voice_defs
.
FreeTTS will create a new directory
<voicedir>/FreeTTS/
. In that directory is the
text which contains all the data for the voice (along with a
few other intermediate files). The voice file will have a
name such as sun_time_dtv.txt
.
The various stages of the conversion process can be called
directly by passing a second argument to
FestVoxToFreeTTS.sh
such as "sts" or "mcep".
These should be used carefully. More information on these
stages can be found in the Flite documentation.
If you do not pass a second argument (recommended) the conversion tool will run the processing stages in the following order: "lpc", "sts", "mcep" (if a cluster unit voice), "idx", "install", and "compile". The "install" and "compile" are specific to FreeTTS and are not mentioned in the Flite documentation. They are the stages that construct the framework for the voice within freetts and compile the result.
When the process gets to the install phase, you will encounter a menu. The install phase only knows how to handle US English voices. If you have any other languages/locales, then you should probably exit at this step. Unfortunately adding new languages or locales is beyond the scope of this document.
The menu allows you to define various features about the voice:
<domain>_<locale>_<name>
.
The <name> does not have to match the Name
property. The domain generally matches an Internet
domain or some other globally unique identity. For
limited domain voices, you might use the limited domain
name instead of locale. Example names include
cmu_us_kal
, cmu_time_awb
,
and sun_us_dtv
.
If there already exists a voice with the same Full Name, you are given the option to over-write it, cancel, or change the properties.
When this is done, the voice is put into the FreeTTS
directory structure
<FreeTTSdir>/com/sun/speech/freetts/en/us/<voice
Full Name>
. It is recommended to visit this directory
and confirm that everything looks correct; there should be
four files similar to the following:
README - Information about the voice sun_time_dtv.txt - The imported voice data in ASCII format voice.Manifest - The Manifest file with which to create the jar file DtvVoiceDirectory.java - The VoiceDirectory for this new voice
If this is a limited domain voice for something other than the cmu time domain, then you will likely have to make some changes to make it look at the correct lexicon.
As part of the import process, the FestVoxToFreeTTS.sh script will create the jar file for the voice. If you wish to create the jar file manually, you can run one of the following commands, depending upon the type of voice you have imported (substitute the Full Name of the voice you imported):
ant -Dclunit_voice=sun_time_dtv -find build.xml ant -Ddiphone_voice=sun_us_dtv -find build.xml
The compiled voice is put in
<FreeTTSdir>/lib/<voice Full Name>.jar
.
The voice will automatically be added to the list of available voices for FreeTTS.
You can now test your voice with:
java -jar lib/freetts.jar myvoicename
(general domain)
java -jar bin/JTime.jar myvoicename
(time domain)
where myvoicename is the name property you assigned to your voice in the "install" phase. If you've forgotten the name, you can always retrieve it by executing the jar file for your voice:
java -jar lib/<voice Full Name>.jar
See the license terms
and acknowledgments.
Copyright 2003 Sun Microsystems, Inc. All Rights
Reserved. Use is subject to license terms.