CHMlib Logo Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab.
You are reading help file online using chmlib.com
CrisisHelper - First Aid in Tough Times of World Economic Crisis


Intelligent Interface Technologies Home Page Microsoft Speech SDK

Speech Automation 5.1

Interface: ISpeechVoiceStatus

CurrentStreamNumber Property


The CurrentStreamNumber property retrieves the number of the text input stream being spoken by the text-to-speech (TTS) engine.

The CurrentStreamNumber property of an ISpeechVoiceStatus object is valid only when its RunningState property is SRSEIsSpeaking.

Syntax

Set: (This property is read-only)
Get: Long = ISpeechVoiceStatus.CurrentStreamNumber

Parts

ISpeechVoiceStatus
The owning object.
Long
Set: (This property is read-only)
Get: A Long variable that returns the stream number.

Example

The following Visual Basic form code demonstrates the use of the CurrentStreamNumber and RunningState properties. To run this code, create a form with the following controls:

  • A command button called Command1
  • A list box called List1
  • Paste this code into the Declarations section of the form.

    The Form_Load procedure creates a voice. The Command1_Click procedure speaks three text streams asynchronously, putting each in the list box, and then performs a loop until the voice finishes speaking. Inside this loop, the code uses the CurrentStreamNumber property to highlight each line of text in the list box while it is spoken by the TTS engine. A RunningState property of SRSEDone indicates that the voice has finished speaking.


    Option Explicit
    
    Private V As SpeechLib.SpVoice
    
    Private Sub Command1_Click()
        Dim ii As Integer
    
        List1.Clear
        
        'Place text strings in the List box, and speak them
        
        List1.AddItem "This is stream number one."
        V.Speak "This is stream number one.", SVSFlagsAsync
        
        List1.AddItem "A second stream, now."
        V.Speak "A second stream, now.", SVSFlagsAsync
        
        List1.AddItem "The third stream is next."
        V.Speak "The third stream is next.", SVSFlagsAsync
        
        'Check status periodically
        Do
            For ii = 0 To 1000
                DoEvents
            Next ii
            
            'Highlight the stream being spoken
            List1.ListIndex = V.Status.CurrentStreamNumber - 1
        
        Loop Until V.Status.RunningState = SRSEDone 'Exit when voice stops
        
        List1.ListIndex = -1    'Turn highlight off
        
    End Sub
    
    Private Sub Form_Load()
        
        Set V = New SpVoice
    
    End Sub


    You are reading help file online using chmlib.com

    If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com
    Partner sites: Logo Design, Simple Anti-Crisis Accounting Software, Voice Search for Web