SpVoice Status property (SAPI 5.3)
The Status property returns the current speaking and event status of the voice in an ISpeechVoiceStatus object.
|Set:||(This property is read-only)|
|Get:||ISpeechVoiceStatus = SpVoice.Status|
- The owning object.
Set: (This property is read-only)
Get: An ISpeechVoiceStatus object containing Status information.
Properties of the ISpeechVoiceStatus object may also be accessed through an implicit status object by means of the syntax "propertyvalue = SpVoice.Status.propertyname." Please see the example below.
The Status method is designed for use with voices speaking to audio devices. Because the Status method is closely associated with audio device status, it will not return an active status for a voice speaking to an audio output stream.
The following code snippet demonstrates two ways of using the Status method. The first uses an implicit status object; the second creates the status object explicitly.
Use of the voice Status method and the ISpeechVoiceStatus interface is demonstrated with more detail in the ISpeechVoiceStatus code example.
Dim objVOICE As SpeechLib.SpVoice Dim objSTATUS As SpeechLib.ISpeechVoiceStatus ' Assume that objVOICE has been created, and ' has spoken some text asynchronously. ' ISpeechVoiceStatus object is implicit here ' If objVOICE.Status.CurrentStreamNumber = 2 Then 'Do something End If ' ISpeechVoiceStatus object is explicit here ' Set objSTATUS = objVOICE.Status If objSTATUS.CurrentStreamNumber = 2 Then 'Do something End If