To add or edit custom pronunciation of specific words with your Cepstral voice, you can create (or edit) a lexicon.txt file found in each voice's data directory.

On Mac OS X, the voice data directory (with David, for example) is typically at:


On Microsoft Windows, it's typically at:

C:\Program Files\Cepstral\voices\David\lexicon.txt

On Linux platforms, it's typically at:


This file will allow you to change pronunciation for a single voice (so each voice may have its own seperate list of pronunciations).

* Note: Once an entry is added to a voice's lexicon file, all occurrences of that word will be pronounced by that voice using the specified phonemes.

* Note: You must re-load the voice for changes to take effect. The procedure for reloading a voice varies depending on the context. Typically you must quit and re-launch your application to reload a voice. If you are using the voices under Apple Macintosh OS X through the SpeechManager interface, to reload the voice you may have to log out of the system and log back in.

The lexicon.txt file should contain one entry per line, in the format:


WORD: The word being defined

PARTOFSPEECH: The part of speech (currently not implemented, so use '0')

PHONELIST: A whitespace-separated list of phones (any amount of whitespace allowed)

For example:

cepstral 0 k eh1 p s t r ah0 l
foo 0 f uw1

The word being defined must be in all lower case. The phones are language-dependent. Stress should be marked on all vowels like in the examples above (use '1' for primary stress, and '0' for unstressed).

Testing Your Changes

The best way to test your changes to the lexicon is to use the 'swift' command-line utility that is installed with the voice. Using this method, you do not have to "reload" the voice, because the 'swift' command-line utility loads the voice when you invoke it, performs the requested task, then it exits.

On Mac OS X, to launch the command-line terminal, run the application found at:

Applications -> Utilties -> Terminal

On Windows, to launch the command-line terminal (known as the "Command Prompt" under Windows NT, 2000, and XP, and as the "MS DOS Prompt" under Windows 9x), follow these steps:

1. Click Start.
2. Click "Run..."
3. Type "cmd" (or "command" under win9x) and press Enter

Once you have your command-line terminal running, to test your lexicon changes, you simply need to run the following command:

swift -n David "my_new_word"

Replace "David" with the voice for which you are editing the lexicon, and replace "my_new_word" with the word you have added. If there were any errors in the syntax of your new lexicon entry, a description of the problem will be printed to the command-line terminal window. If there were no errors but you are not happy with the new pronunciation, simply edit the lexicon.txt file for the voice, save the file, and run the command again. Once you are happy with your custom pronunciations, you can take the necessary steps to reload the voice in your application to apply the new pronunciations to the voice in that context.

Select a language below to see its respective phoneme set: