(Obsolete)
Note: SpeechLexiconDlg is obsolete. This documentation is maintained for backward compatibility only.
Description: This statement executes in its own thread to display a SAPI text-to-speech engine lexicon dialog to permit modification of pronunciation.
Returns: Nothing
Usage: Script
Format: SpeechLexiconDlg(SpeechHandle, Title, ErrorCode)
Parameters: SpeechHandle is the SAPI text-to-speech handle to use; this is the return value from a SpeechStream call.
Title is any text expression that will be displayed in the title bar of the dialog box.
ErrorCode is any variable that will be set to a valid value upon completion of the statement. The value of ErrorCode will be zero if no errors occurred or will be set to the low-order 16-bits of the standard Win32 error code or a SAPI text-to-speech specific error code.
Comments: This function executes in the thread created by the SpeechStream call, so it will not block other statements from executing. This does mean, however, that the timing for Result becoming valid is unpredictable and should therefore be checked for validity prior to being used.
The actual dialog displayed and the properties of the dialog (i.e. modal) are determined by the SAPI text-to-speech engine itself. The pronunciations are stored in a file known as a "Lexicon". Under some operating systems, these are held on a per user basis, so care should be taken to avoid user confusion if individual user account logins are permitted.
You will require a text-to-speech engine and voices to be able to execute speech related statements.
Example:
sHandle = SpeechStream();
If Valid(sHandle) && ZButton(10, 40, 110, 10, "Pronounce", 1);
[
SpeechLexiconDlg(sHandle, "Modify Pronunciation", eCode);
]
If eCode == 0 Done;
If eCode != 0 ShowError;
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. When the dialog is closed, a change to state Done will occur if the setting of pronunciation was successful or to state ShowError if it was not.
See Also:
SpeechEnum | SpeechReset | SpeechSelect | SpeechSpeak | SpeechStream