You are reading help file online using chmlib.com
|
Interface: ISpeechVoiceStatus
The VisemeId property retrieves the ID of the current viseme being spoken by the voice.
Set: | (This property is read-only) |
Get: | Integer = ISpeechVoiceStatus.VisemeId |
The following Visual Basic form code demonstrates the use of the VisemeId property of an ISpeechVoiceStatus object. To run this code, create a form with the following controls:
Paste this code into the Declarations section of the form.
The Form_Load procedure creates a voice object and places a sentence in the text box. The Command1_Click procedure speaks the contents of the text box asynchronously, and loops until the voice has finished speaking. Inside the loop, the code checks VisemeId property periodically and displays it in Text2.
Option Explicit
Private V As SpeechLib.SpVoice
Private Sub Command1_Click()
Dim ii As Integer
Text2.Text = ""
V.Speak Text1.Text, SVSFlagsAsync
Do
For ii = 0 To 20000
DoEvents
Next ii
Text2.Text = Text2.Text & V.Status.VisemeId & " "
Loop While V.Status.RunningState = SRSEIsSpeaking
End Sub
Private Sub Form_Load()
Set V = New SpVoice
Text1.Text = "say, see, sigh, so, sue."
Text2.Text = ""
End Sub
You are reading help file online using chmlib.com
|