(Obsolete)
Note: SpeechStream is obsolete. This documentation is maintained for backward compatibility only.
Description: This function opens a SAPI text-to-speech stream and returns a handle to it
Returns: Handle
Usage: Steady State
Format: SpeechStream([SpeakCount, BookmarkNum])
Parameters: SpeakCount is an optional parameter that is any variable in which the number of outstanding SpeechSpeak requests (i.e. those that have not finished speaking) will be maintained. When this parameter is zero the SAPI text-to-speech stream is not speaking; it is initially set to zero. If this parameter is omitted or invalid no speak count will be maintained.
BookmarkNum is an optional parameter that is any variable that will be set to the value of the last text bookmark encountered by the speech engine (embedded control tags within the speech text denote bookmarks). It is initially set to invalid.
Comments: This function is not threaded, however, it creates a thread inside of which the handle referring to the text-to-speech stream is accessed. All other speech functions (those beginning with "Speech") do not create their own thread, but will execute in the thread created by this function. This thread will exist for as long as the SpeechStream statement remains active (i.e. until a state change occurs). For this reason, the state containing the SpeechStream call must remain active until all other speech statements have finished executing. The statement responsible for a state change should therefore trigger only when all results from all statements accessing this handle are valid. There can be multiple SAPI text-to-speech streams open at any time.
You will require a text-to-speech engine and voices to be able to execute speech related statements.
Examples:
speechHandle = SpeechStream();
This will create a SAPI text-to-speech stream that will maintain neither speak count nor bookmark positions.
speechHandle = SpeechStream(sCount, bNum);
This will create a SAPI text-to-speech stream that will maintain both a speak count and bookmark positions.
speechHandle = SpeechStream(invalid, bNum);
This will create a SAPI text-to-speech stream that will maintain bookmark positions only.
See Also:
SpeechEnum | SpeechLexiconDlg | SpeechReset | SpeechSelect | SpeechSpeak