TtsEnableUsrDictEx
Enable a user dictionary instance and/or changes its priority on a TTS engine instance.
TTSRETVAL TtsEnableUsrDictEx (
HTTSINSTANCE hTtsInst,
HTTSUSRDICT hUsrDict,
LH_U32 u32Priority)
When a dictionary instance is loaded by TtsLoadUsrDictEx on a TTS engine instance, the default priority is attached; the dictionary is enabled with the default (lowest) priority. If two dictionaries have the default priority, the order in which the dictionaries are loaded is important. The last-loaded dictionary has the ‘highest’ priority. This means that when a token has to be processed, a lookup takes place using the last loaded dictionary first.
To change the default priority, the dictionary has to be disabled by calling TtsDisableUsrDictEx and enabled again by calling TtsEnableUsrDictEx.
TtsEnableUsrDictEx can also be called to enable a dictionary again that has been disabled by a previous call of TtsDisableUsrDictEx.
Once a dictionary has been loaded using the TtsLoadUsrDictEx function, it can be enabled for use by only one TTS engine instance at a time; if two instances want to use the same dictionary, the dictionary must be loaded separately for each instance. Each dictionary has a unique priority; no two dictionaries can have the same priority at the same time except the default priority. The highest possible priority value is 0. (Lesser values equate to higher priorities.)
Argument |
Description |
---|---|
hTtsInst |
[in] Handle to a TTS engine instance. |
hUsrDict |
[in] Handle to a loaded dictionary instance. |
u32Priority |
[in] Sets the priority for the dictionary instance. |
Always call TtsDisableUsrDictEx or TtsDisableUsrDictsEx before calling TtsEnableUsrDictEx.