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

Object: ISpeechRecoResult

AudioFormat Property

The AudioFormat property gets or sets the audio stream format.

The controlling recognition context must retain the audio portion of the recognition. By default, a recognition context does not retain audio; that is, RecoContext.RetainedAudio is set to SRAONone. Attempts to access this retained audio stream, including references to AudioFormat, cause an SPERR_NO_AUDIO_DATA error. To retain the audio, use ISpeechRecoContext.RetainedAudio passing SRAORetainAudio as the parameter.


Syntax

Get: SpAudioFormat = ISpeechRecoResult.AudioFormat
Set: ISpeechRecoResult.AudioFormat = SpAudioFormat

Parts

ISpeechRecoResult
The owning object.
SpAudioFormat
An object variable representing an audio output device.
Get: The token represents the current audio output device of the voice.
Set: The token represents the audio output device assigned to the voice.
In either case, the format for SpAudioFormat.Type is of type SpeechAudioFormatType.

Example

The following code snippet demonstrates retrieving and setting the audio format.

The following code snippets assume a valid RecoResult. The following code demonstrates setting the recognition context.

Set RC = New SpSharedRecoContext
RC.RetainedAudio = SRAORetainAudio

'Get audio format
Dim GetFormat as SpAudioFormat
Set Format = RecoResult.AudioFormat

'Set audio format
Dim SetFormat as SpAudioFormat
Set SetFormat = CreateObject("SAPI.SpAudioFormat")
    
SetFormat.Type = SAFT11kHz16BitMono
Set RecoResult.AudioFormat = SetFormat


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