ShowLexicon

(VoiceTalk Module)

Description: Displays a SAPI text-to-speech engine lexicon dialog to permit modification of pronunciation. This function will return immediately, and the lexicon window will be managed in its own thread, preventing the calling thread from being blocked.
Returns: Nothing
Usage: Script Only.
Function Groups: Speech and Sound
Related to: Configure | GetDevices | GetVoices | Reset | Speak | VoiceTalk
Format: VoiceTalkStream\ShowLexicon([Title])
Parameters:  
VoiceTalkStream
Required. A speech stream returned from VoiceTalk.
Title
An optional parameter that is any text expression to display in the title bar of the dialog box.
Comments: This function spawns a new thread to show the lexicon, so it will not block other statements from executing.
The pronunciations are stored in a file known as a "Lexicon". This file is stored in the VTScada directory. It is therefore available to all users and all VTScada applications. Changes made will affect all instances of VTScada applications that use speech.
Each time this window is opened, the lexicon is refreshed from disk. When the dialog is closed, the lexicon is written back to disk.
On any single installation of VTScada, only one lexicon dialog will be displayed at any time, regardless of how many applications support speech.
Any word may be entered into the lexicon with a custom pronunciation. A word is any set of letters with no whitespace (i.e. no spaces or tabs) within it. Words are case-sensitive. For example, if the word "VTS" is entered with the phonetic spelling "V T S", the way the word "vts" will sound will not be affected.

Example:

sHandle = \VoiceTalk();
If Valid(sHandle) && ZButton(10, 40, 110, 10, "Pronounce", 1);
[
  sHandle\ShowLexicon("Modify Pronunciation");
]

When the button is pressed, the lexicon dialog for the text-to-speech engine open on the SAPI text-to-speech stream will be displayed.