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.

Creating a Voice

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.

Importing a FestVox Voice into FreeTTS

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:

  1. Compile Festival 1.4.3 and FestVox 2.0 as well as the speech tools that come with Festival. Refer to the Festival documentation for details of setting this up on your system. We've only built Festival and FestVox on RedHat 9.0 and Solaris. For both systems, we used gcc 3.2.2.
  2. "festival", "ant", "java", and "javac" must be in your path. For example, we used the following command under bash on RedHat (modify appropriately):
  3. You must set the ESTDIR environment variable to point to the speech tools. For example:

To convert a voice, run the FestVoxToFreeTTS.sh script from a command line prompt located in the tools/FestVoxToFreeTTS directory:

where <voicedir> is the directory the FestVox voice resides in. The contents of will looks something like the following:

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:

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:

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:

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:

Files in this directory

See the license terms and acknowledgments.
Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.