Important, please read:
The information on this page concerns an older release (3.0.3) of Mary. With the current version (3.1 beta1) you can not import voices like this. We are currently (5th April 2007) working on this and plan to make the import of new voices more easy and comfortable in the 3.1.0 release.
How to import a FreeTTS Cluster Unit Voice into Mary
This tutorial assumes that you already have a Festival Cluster Unit Voice converted into FreeTTS format. Information on how to do that can be found on the Festvox homepage and on the FreeTTS homepage.
Furthermore, you need ant to convert the voice data. You can get ant here.
Now you are ready to import your voice into Mary. The installation directory of Mary is referred to as Mary_Base. The directory currently containing your voice data is referred to as old_voice_dir.
- Where to store the voice files In Mary, cluster unit voices are filed under Mary_Base/lib/voices. Make a new directory for your voice data in this directory. The directory name and the name of your voice should be the same. In this new directory you should file all your voice data, except the config file. config files are stored in Mary_Base/conf.
- Converting the text file
The FreeTTS tools have constructed a large text file
containing all the data needed for synthesis. This file
is normally named <voicename>.txt and stored under
com/sun/speech/freetts/en/us/<voicename> in the FreeTTS directory. For the conversion, this file has
to have the same name as the directory you created in step 1.
Copy this file to your newly created directory. Now you have to
convert it into the Mary format. Open a shell or another command line
interpreter. Go to the Mary base directory and type
ant clunit_voice_bin -Dclunit_voice=<voicename>
Mary now converts the text file into bin format and stores it in your new voice directory.
- Copying information about Unit origin When testing your voice it can be interesting to see where the selected units came from. When running Mary in debug mode this is shown in the server log. All you have to do for this is copy the catalogue file of your voice into the new voice directory. Normally, the file is named <voicename>.catalogue and you can find it under old_voice_dir/festival/clunits.
- Creating example text If your voice is a general domain voice, you can skip this step. For limited domain voices, Mary can show example sentences in the Expert Interface. This gives users an overview of what your voice can synthesize. To define example sentences, create a new file named <voicename>.examples in your new voice directory. The encoding should be UTF-8. Write the sentences in this file, one sentence per line. You can add comments by beginning a line with ***.
- Writing a config file In order to make Mary aware of your voice, you have to create a config file. This file should be named <language>-<voicename>.config. You can find a template for a Cluster Unit Voice conifg file in Mary_Base/examples/clunit-voice-template.config.