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: ISpeechRecoContext

Voice Property


The Voice property specifies the SpVoice object associated with the recognition context.


Syntax

Set: SpeechRecoContext.Voice = SpVoice
Get: SpVoice = SpeechRecoContext.Voice

Parts

SpeechRecoContext
The owning object.
SpVoice
Set: An SpVoice object that sets the Voice property.
Get: An SpVoice object that gets the Voice property.

Remarks

ISpeechRecoContext.Voice allows the voice to be changed temporarily and for limited contexts. Change the voice using Speech properties in Control Panel.

Example

The first code snippet demonstrates speaking a successful recognition. The code represented is from the recognition event. Because SAPI makes extensive use of defaults, each recognition context will use the default system voice, which is specified using Speech properties in Control Panel.

Public WithEvents RC As SpSharedRecoContext

'Speech processing code goes here

Private Sub RC_Recognition(ByVal StreamNumber As Long, ByVal StreamPosition As Variant, ByVal RecognitionType As SpeechLib.SpeechRecognitionType, ByVal Result As SpeechLib.ISpeechRecoResult)
    Label1.Caption = Result.PhraseInfo.GetText
    RC.Voice.Speak Label1.Caption
End Sub

The next code sample changes the current voice to "Microsoft Sam" if it is available. The sample then speaks the new name. The sample assumes a valid RC at the time of the voice change.

Public WithEvents RC As SpSharedRecoContext

Set RC.Voice.Voice = RC.Voice.GetVoices("name=Microsoft Sam").Item(0)
RC.Voice.Speak "I have changed to " & RC.Voice.Voice.GetDescription


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