You are reading help file online using chmlib.com
|
Interface: ISpeechVoiceStatus
The LastStreamNumberQueued property retrieves the number of the last audio stream enqueued by the voice.
Set: | (This property is read-only) |
Get: | Long = ISpeechVoiceStatus.LastStreamNumberQueued |
The following code snippet demonstrates the use of the LastStreamNumberQueued property. To run this code, create a form with the following control:
Paste this code into the Declarations section of the form.
The Form_Load procedure creates a voice object. The Command1_Click procedure speaks three streams asynchronously, creates an ISpeechVoiceStatus object and prints the LastStreamNumberQueued property value. The WaitUntilDone method then blocks execution until the voice finishes speaking the three streams, and the LastStreamNumberQueued property value is printed again. The value of the LastStreamNumberQueued property in both cases is 3.
Option Explicit
Private V As SpeechLib.SpVoice
Private S As SpeechLib.ISpeechVoiceStatus
Private Sub Command1_Click()
'Enqueue three streams
V.Speak "this is stream number one.", SVSFlagsAsync
V.Speak "a second stream, now.", SVSFlagsAsync
V.Speak "the third stream is next", SVSFlagsAsync
'Get status while voice is speaking
Set S = V.Status 'Get status thru ISpeechVoiceStatus object
Print "Voice is speaking and LastStreamNumberQueued is " _
& S.LastStreamNumberQueued
DoEvents 'Let Print results be seen immediately
V.WaitUntilDone (99999) 'Wait until voice finishes
'Get status thru "Voice.Status.Property" syntax
Print "Voice is finished and LastStreamNumberQueued is " _
& V.Status.LastStreamNumberQueued
End Sub
Private Sub Form_Load()
Set V = New SpVoice
End Sub
You are reading help file online using chmlib.com
|