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

AudioInputStream Property


The AudioInputStream property gets and sets the recognizer's audio input stream.

Using the AudioInputStream enables an application to use file streams or other stream objects for input rather than audio devices.

AudioInputStream is used with InProc recognizers only. Attempting to use it in a shared environment will result in an SPERR_NOT_SUPPORTED_FOR_SHARED_RECOGNIZER error.

Syntax

Set: SpeechRecognizer.AudioInputStream = ISpeechBaseStream
Get: ISpeechBaseStream = SpeechRecognizer.AudioInputStream

Parts

SpeechRecognizer
The owning object.
ISpeechBaseStream
Set: An ISpeechBaseStream variable that sets the property. If no value is stated, the default of Nothing will be passed in.
Get: An ISpeechBaseStream variable that gets the property.

Example

The following Visual Basic form code demonstrates the use of AudioInputStream. The application gets a wav file and uses that as the input source.

To run this code, create a form without any controls. The file is found in the SAPI 5.1 SDK and is a small, one word file. The location is assumed to be on the C: drive, although the string may be changed to accommodate other locations.

Dim WithEvents InProcRecoContext As SpInProcRecoContext
Dim InProcRecognizer As Object

Private Sub Form_Load()
    Set InProcRecognizer = CreateObject("SAPI.SpInprocRecognizer")
    Set InProcRecoContext = InProcRecognizer.CreateRecoContext

    Dim FileName As String
    FileName = "C:\Program Files\Microsoft Speech SDK 5.1\Samples\CPP\Engines\TTS\MkVoice\selected.wav"
    Dim FileStream As ISpeechFileStream
    Set FileStream = CreateObject("SAPI.SpFileStream")
    FileStream.Open FileName
    
    Set InProcRecognizer.AudioInputStream = FileStream
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