Configuring Vocalizer

Different people configure Vocalizer at different times. How you set parameters depends on your job function:

  • System administrators set defaults when installing Vocalizer. For example, administrators can set different defaults for each application that uses Vocalizer.
  • You can create a Vocalizer configuration file. See Configuring Vocalizer.

Configuration precedence

You can set parameters at different levels of precedence. Some are always global (all sessions), and others can be changed for individual sessions.

From the highest to the lowest precedence:

Parameters specified via markup

You can update many parameters by inserting markup in the input text. These settings only apply to the current synthesis request, and they are restored to the previous values for the next synthesis request.

Vocalizer supports two markup languages: the native markup (the default), and W3C SSML (with some proprietary extensions). When the Microsoft SAPI 5 API is used, Microsoft SAPI 5 markup is additionally supported.

Parameters set at the start of a session

A session configuration file (session.xml) defines the default configuration invoked at the start of a session (after an engine instance is created). The file has separate sections for each Nuance speech product, including a <speechsynth> section specifically for parameters that affect Vocalizer.

  • A session.xml file does not contain all possible parameters. Many other parameters are set via other mechanisms.
  • During a session, applications can override certain session defaults at any time by setting Nuance-specific properties via markup.

Some Vocalizer parameters can be changed on an already open TTS engine instance and affect that instance only.

  • You can use the TtsSetParamsEx API function.
  • For the Microsoft SAPI 5 API, use the SetVoice method to change voices, or use set methods such as SetRate and SetVolume.

Most parameters cannot be set during synthesis. The only exceptions are the rate and volume parameters for the native API and Microsoft SAPI 5 API, which can be set during synthesis.

Parameters specified while opening an engine instance

The interface you use to access Vocalizer determines whether you specify some Vocalizer parameters when opening a TTS engine instance rather than applying them globally.

  • In the native API, set values in the TTS_OPEN_PARAMS structure prior to calling the TtsOpen API function, such as the initial language, voice, frequency, and audio format for the instance.
  • For the Microsoft SAPI 5 API, select a voice name with the desired attributes. You can optionally use SAPI 5 API calls to search the installed voices for those attributes.

For example, using the native API:

TTS_OPEN_PARAMS params; 
params.szLanguage = "French"; 
params.szVoice = "Sophie"; 
params.nFrequency = TTS_FREQ_8KHZ; 
params.nOutputType = TTS_LINEAR_16BIT; 

Use the TtsSetParamsEx function to set most speak parameters. In most cases parameters cannot be updated when the instance is busy executing the TtsProcessEx function (which performs the text-to-speech conversion process). Only the volume and the rate can be updated while speaking.