2 * Copyright (C) 2019 Alistair Leslie-Hughes
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #pragma makedep install
25 interface ISpeechAudioFormat
;
26 interface ISpeechGrammarRule
;
27 interface ISpeechGrammarRuleState
;
28 interface ISpeechObjectTokens
;
29 interface ISpeechPhraseProperties
;
30 interface ISpeechPhraseRule
;
31 interface ISpeechRecognizer
;
32 interface ISpeechRecoContext
;
33 interface ISpeechRecoGrammar
;
34 interface ISpeechRecoResult
;
36 typedef long SpeechLanguageId
;
38 typedef enum SpeechLoadOption
40 SLOStatic
= SPLO_STATIC
,
41 SLODynamic
= SPLO_DYNAMIC
44 typedef enum SpeechRuleState
46 SGDSInactive
= SPRS_INACTIVE
,
47 SGDSActive
= SPRS_ACTIVE
,
48 SGDSActiveWithAutoPause
= SPRS_ACTIVE_WITH_AUTO_PAUSE
,
49 SGDSActiveUserDelimited
= SPRS_ACTIVE_USER_DELIMITED
52 typedef enum SpeechTokenShellFolder
54 STSF_AppData
= 0x001a,
55 STSF_LocalAppData
= 0x001c,
56 STSF_CommonAppData
= 0x0023,
57 STSF_FlagCreate
= 0x8000
58 } SpeechTokenShellFolder
;
60 typedef enum SpeechEngineConfidence
62 SECLowConfidence
= -1,
63 SECNormalConfidence
= 0,
65 } SpeechEngineConfidence
;
67 typedef enum SpeechAudioState
69 SASClosed
= SPAS_CLOSED
,
71 SASPause
= SPAS_PAUSE
,
75 typedef enum SpeechRunState
78 SRSEIsSpeaking
= SPRS_IS_SPEAKING
81 typedef enum SpeechDiscardType
83 SDTProperty
= SPDF_PROPERTY
,
84 SDTReplacement
= SPDF_REPLACEMENT
,
86 SDTDisplayText
= SPDF_DISPLAYTEXT
,
87 SDTLexicalForm
= SPDF_LEXICALFORM
,
88 SDTPronunciation
= SPDF_PRONUNCIATION
,
89 SDTAudio
= SPDF_AUDIO
,
90 SDTAlternates
= SPDF_ALTERNATES
,
94 typedef enum SpeechRecognizerState
96 SRSInactive
= SPRST_INACTIVE
,
97 SRSActive
= SPRST_ACTIVE
,
98 SRSActiveAlways
= SPRST_ACTIVE_ALWAYS
,
99 SRSInactiveWithPurge
= SPRST_INACTIVE_WITH_PURGE
,
100 } SpeechRecognizerState
;
102 typedef enum SpeechDisplayAttributes
104 SDA_No_Trailing_Space
= 0,
105 SDA_One_Trailing_Space
= SPAF_ONE_TRAILING_SPACE
,
106 SDA_Two_Trailing_Spaces
= SPAF_TWO_TRAILING_SPACES
,
107 SDA_Consume_Leading_Spaces
= SPAF_CONSUME_LEADING_SPACES
108 } SpeechDisplayAttributes
;
110 typedef enum SpeechFormatType
112 SFTInput
= SPWF_INPUT
,
113 SFTSREngine
= SPWF_SRENGINE
116 typedef enum SpeechGrammarState
118 SGSEnabled
= SPGS_ENABLED
,
119 SGSDisabled
= SPGS_DISABLED
,
120 SGSExclusive
= SPGS_EXCLUSIVE
,
121 } SpeechGrammarState
;
123 typedef enum SpeechRuleAttributes
125 SRATopLevel
= SPRAF_TopLevel
,
126 SRADefaultToActive
= SPRAF_Active
,
127 SRAExport
= SPRAF_Export
,
128 SRAImport
= SPRAF_Import
,
129 SRAInterpreter
= SPRAF_Interpreter
,
130 SRADynamic
= SPRAF_Dynamic
,
132 } SpeechRuleAttributes
;
134 typedef enum SpeechWordPronounceable
136 SWPUnknownWordUnpronounceable
= SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE
,
137 SWPUnknownWordPronounceable
= SPWP_UNKNOWN_WORD_PRONOUNCEABLE
,
138 SWPKnownWordPronounceable
= SPWP_KNOWN_WORD_PRONOUNCEABLE
139 } SpeechWordPronounceable
;
141 typedef enum SpeechSpecialTransitionType
146 } SpeechSpecialTransitionType
;
148 typedef [hidden] enum DISPID_SpeechRecoContext
150 DISPID_SRCRecognizer
= 1,
151 DISPID_SRCAudioInInterferenceStatus
,
152 DISPID_SRCRequestedUIType
,
154 DISPID_SRAllowVoiceFormatMatchingOnNextSet
,
155 DISPID_SRCVoicePurgeEvent
,
156 DISPID_SRCEventInterests
,
157 DISPID_SRCCmdMaxAlternates
,
159 DISPID_SRCRetainedAudio
,
160 DISPID_SRCRetainedAudioFormat
,
163 DISPID_SRCCreateGrammar
,
164 DISPID_SRCCreateResultFromMemory
,
166 DISPID_SRCSetAdaptationData
167 } DISPID_SpeechRecoContext
;
169 typedef [hidden] enum DISPID_SpeechDataKey
171 DISPID_SDKSetBinaryValue
= 1,
172 DISPID_SDKGetBinaryValue
,
173 DISPID_SDKSetStringValue
,
174 DISPID_SDKGetStringValue
,
175 DISPID_SDKSetLongValue
,
176 DISPID_SDKGetlongValue
,
180 DISPID_SDKDeleteValue
,
183 } DISPID_SpeechDataKey
;
185 typedef [hidden] enum DISPIDSPRG
188 DISPID_SRGRecoContext
,
193 DISPID_SRGCmdLoadFromFile
,
194 DISPID_SRGCmdLoadFromObject
,
195 DISPID_SRGCmdLoadFromResource
,
196 DISPID_SRGCmdLoadFromMemory
,
197 DISPID_SRGCmdLoadFromProprietaryGrammar
,
198 DISPID_SRGCmdSetRuleState
,
199 DISPID_SRGCmdSetRuleIdState
,
200 DISPID_SRGDictationLoad
,
201 DISPID_SRGDictationUnload
,
202 DISPID_SRGDictationSetState
,
203 DISPID_SRGSetWordSequenceData
,
204 DISPID_SRGSetTextSelection
,
205 DISPID_SRGIsPronounceable
208 typedef enum SpeechInterference
210 SINone
= SPINTERFERENCE_NONE
,
211 SINoise
= SPINTERFERENCE_NOISE
,
212 SINoSignal
= SPINTERFERENCE_NOSIGNAL
,
213 SITooLoud
= SPINTERFERENCE_TOOLOUD
,
214 SITooQuiet
= SPINTERFERENCE_TOOQUIET
,
215 SITooFast
= SPINTERFERENCE_TOOFAST
,
216 SITooSlow
= SPINTERFERENCE_TOOSLOW
217 } SpeechInterference
;
219 typedef enum SpeechVoiceEvents
221 SVEStartInputStream
= (1L << 1),
222 SVEEndInputStream
= (1L << 2),
223 SVEVoiceChange
= (1L << 3),
224 SVEBookmark
= (1L << 4),
225 SVEWordBoundary
= (1L << 5),
226 SVEPhoneme
= (1L << 6),
227 SVESentenceBoundary
= (1L << 7),
228 SVEViseme
= (1L << 8),
229 SVEAudioLevel
= (1L << 9),
230 SVEPrivate
= (1L << 15),
231 SVEAllEvents
= 0x083FE
234 typedef enum SpeechVoiceSpeakFlags
236 SVSFDefault
= SPF_DEFAULT
,
237 SVSFlagsAsync
= SPF_ASYNC
,
238 SVSFPurgeBeforeSpeak
= SPF_PURGEBEFORESPEAK
,
239 SVSFIsFilename
= SPF_IS_FILENAME
,
240 SVSFIsXML
= SPF_IS_XML
,
241 SVSFIsNotXML
= SPF_IS_NOT_XML
,
242 SVSFPersistXML
= SPF_PERSIST_XML
,
243 SVSFNLPSpeakPunc
= SPF_NLP_SPEAK_PUNC
,
244 SVSFParseSapi
= SPF_PARSE_SAPI
,
245 SVSFParseSsml
= SPF_PARSE_SSML
,
246 SVSFParseAutodetect
= SPF_PARSE_AUTODETECT
,
247 SVSFNLPMask
= SPF_NLP_MASK
,
248 SVSFParseMask
= SPF_PARSE_MASK
,
249 SVSFVoiceMask
= SPF_VOICE_MASK
,
250 SVSFUnusedFlags
= SPF_UNUSED_FLAGS
,
251 } SpeechVoiceSpeakFlags
;
253 typedef enum SpeechGrammarWordType
255 SGDisplay
= SPWT_DISPLAY
,
256 SGLexical
= SPWT_LEXICAL
,
257 SGPronounciation
= SPWT_PRONUNCIATION
,
258 SGLexicalNoSpecialChars
= SPWT_LEXICAL_NO_SPECIAL_CHARS
259 } SpeechGrammarWordType
;
261 typedef enum SpeechRecoEvents
263 SREStreamEnd
= (1L << 0),
264 SRESoundStart
= (1L << 1),
265 SRESoundEnd
= (1L << 2),
266 SREPhraseStart
= (1L << 3),
267 SRERecognition
= (1L << 4),
268 SREHypothesis
= (1L << 5),
269 SREBookmark
= (1L << 6),
270 SREPropertyNumChange
= (1L << 7),
271 SREPropertyStringChange
= (1L << 8),
272 SREFalseRecognition
= (1L << 9),
273 SREInterference
= (1L << 10),
274 SRERequestUI
= (1L << 11),
275 SREStateChange
= (1L << 12),
276 SREAdaptation
= (1L << 13),
277 SREStreamStart
= (1L << 14),
278 SRERecoOtherContext
= (1L << 15),
279 SREAudioLevel
= (1L << 16),
280 SREPrivate
= (1L << 18),
281 SREAllEvents
= 0x5FFFF
284 typedef enum SpeechRecoContextState
286 SRCS_Disabled
= SPCS_DISABLED
,
287 SRCS_Enabled
= SPCS_ENABLED
288 } SpeechRecoContextState
;
290 typedef enum SpeechRetainedAudioOptions
292 SRAONone
= SPAO_NONE
,
293 SRAORetainAudio
= SPAO_RETAIN_AUDIO
294 } SpeechRetainedAudioOptions
;
296 typedef enum SpeechVoicePriority
298 SVPNormal
= SPVPRI_NORMAL
,
299 SVPAlert
= SPVPRI_ALERT
,
300 SVPOver
= SPVPRI_OVER
301 } SpeechVoicePriority
;
305 uuid(ce17c09b
-4efa
-44d5
-a4c9
-59d9585ab0cd
),
307 pointer_default(unique)
309 interface ISpeechDataKey
: IDispatch
311 [id(DISPID_SDKSetBinaryValue
)]
312 HRESULT SetBinaryValue
([in] const BSTR name
, [in] VARIANT value
);
314 [id(DISPID_SDKGetBinaryValue
)]
315 HRESULT GetBinaryValue
([in] const BSTR name
, [out,retval] VARIANT *value
);
317 [id(DISPID_SDKSetStringValue
)]
318 HRESULT SetStringValue
([in] const BSTR name
, [in]const BSTR value
);
320 [id(DISPID_SDKGetStringValue
)]
321 HRESULT GetStringValue
([in] const BSTR name
, [out,retval] BSTR* value
);
323 [id(DISPID_SDKSetLongValue
)]
324 HRESULT SetLongValue
([in] const BSTR name
, [in] long value
);
326 [id(DISPID_SDKGetlongValue
)]
327 HRESULT GetLongValue
([in] const BSTR name
, [out,retval] long *value
);
329 [id(DISPID_SDKOpenKey
)]
330 HRESULT OpenKey
( [in] const BSTR name
, [out,retval] ISpeechDataKey
**key
);
332 [id(DISPID_SDKCreateKey
)]
333 HRESULT CreateKey
([in] const BSTR name
, [out,retval] ISpeechDataKey
**key
);
335 [id(DISPID_SDKDeleteKey
)]
336 HRESULT DeleteKey
([in] const BSTR name
);
338 [id(DISPID_SDKDeleteValue
)]
339 HRESULT DeleteValue
([in] const BSTR name
);
341 [id(DISPID_SDKEnumKeys
)]
342 HRESULT EnumKeys
([in] long index
, [out,retval] BSTR *name
);
344 [id(DISPID_SDKEnumValues
)]
345 HRESULT EnumValues
([in] long Index
, [out,retval] BSTR *value
);
348 typedef enum SpeechDataKeyLocation
350 SDKLDefaultLocation
= 0,
352 SDKLLocalMachine
= 2,
353 SDKLCurrentConfig
= 5
354 } SpeechDataKeyLocation
;
356 typedef enum SpeechBookmarkOptions
359 SBOPause
= SPBO_PAUSE
360 } SpeechBookmarkOptions
;
362 #define CLSCTXALL
(CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER
)
364 typedef enum SpeechTokenContext
366 STCInprocServer
= CLSCTX_INPROC_SERVER
,
367 STCInprocHandler
= CLSCTX_INPROC_HANDLER
,
368 STCLocalServer
= CLSCTX_LOCAL_SERVER
,
369 STCRemoteServer
= CLSCTX_REMOTE_SERVER
,
371 } SpeechTokenContext
;
373 typedef [hidden] enum DISPID_SpeechObjectTokenCategory
378 DISPID_SOTCGetDataKey
,
379 DISPID_SOTCEnumerateTokens
,
380 } DISPID_SpeechObjectTokenCategory
;
384 uuid(ca7eac50
-2d01
-4145-86d4
-5ae7d70f4469
),
386 pointer_default(unique)
388 interface ISpeechObjectTokenCategory
: IDispatch
390 [propget, id(DISPID_SOTCId
)]
391 HRESULT Id([out, retval] BSTR *id);
393 [propput, id(DISPID_SOTCDefault
)]
394 HRESULT Default([in] const BSTR token
);
395 [propget, id(DISPID_SOTCDefault
)]
396 HRESULT Default([out, retval] BSTR *token
);
398 [id(DISPID_SOTCSetId
)]
399 HRESULT SetId
([in] const BSTR id, [in, defaultvalue(0)] VARIANT_BOOL created
);
401 [hidden, id(DISPID_SOTCGetDataKey
)]
402 HRESULT GetDataKey
([in, defaultvalue(SDKLDefaultLocation
)] SpeechDataKeyLocation location
,
403 [out, retval] ISpeechDataKey
**key
);
405 [id(DISPID_SOTCEnumerateTokens
)]
406 HRESULT EnumerateTokens
([in, defaultvalue("")] BSTR required
,
407 [in, defaultvalue("")] BSTR optional,
408 [out, retval] ISpeechObjectTokens
**tokens
);
411 typedef [hidden] enum DISPID_SpeechObjectToken
416 DISPID_SOTGetDescription
,
418 DISPID_SOTGetAttribute
,
419 DISPID_SOTCreateInstance
,
421 DISPID_SOTGetStorageFileName
,
422 DISPID_SOTRemoveStorageFileName
,
423 DISPID_SOTIsUISupported
,
425 DISPID_SOTMatchesAttributes
426 } DISPID_SpeechObjectToken
;
430 uuid(c74a3adc
-b727
-4500-a84a
-b526721c8b8c
),
432 pointer_default(unique)
434 interface ISpeechObjectToken
: IDispatch
436 [propget, id(DISPID_SOTId
)]
437 HRESULT Id([out,retval] BSTR *object);
439 [propget, id(DISPID_SOTDataKey
), hidden]
440 HRESULT DataKey
([out,retval] ISpeechDataKey
**key
);
442 [propget, id(DISPID_SOTCategory
)]
443 HRESULT Category
([out,retval] ISpeechObjectTokenCategory
**category
);
445 [id(DISPID_SOTGetDescription
)]
446 HRESULT GetDescription
( [in,defaultvalue(0)] long locale
, [out,retval]BSTR *description
);
448 [hidden, id(DISPID_SOTSetId
)]
449 HRESULT SetId
([in] BSTR id, [in, defaultvalue("")] BSTR category
, [in, defaultvalue(0)] VARIANT_BOOL create
);
451 [id(DISPID_SOTGetAttribute
)]
452 HRESULT GetAttribute
([in] BSTR name
, [out, retval] BSTR* value
);
454 [id(DISPID_SOTCreateInstance
)]
455 HRESULT CreateInstance
([in, defaultvalue(NULL
)] IUnknown
*outer
, [in, defaultvalue(STCAll
)] SpeechTokenContext spcontext
,
456 [out, retval] IUnknown
**object);
458 [hidden, id(DISPID_SOTRemove
)]
459 HRESULT Remove
([in] BSTR clsid
);
461 [hidden, id(DISPID_SOTGetStorageFileName
)]
462 HRESULT GetStorageFileName
([in] BSTR clsid
, [in] BSTR key
, [in] BSTR name
, [in] SpeechTokenShellFolder folder
,
463 [out,retval] BSTR* path
);
465 [hidden, id(DISPID_SOTRemoveStorageFileName
)]
466 HRESULT RemoveStorageFileName
([in] BSTR clsid
, [in]BSTR key
, [in] VARIANT_BOOL delete
);
468 [hidden, id(DISPID_SOTIsUISupported
)]
469 HRESULT IsUISupported
( [in]const BSTR type
, [in, defaultvalue(NULL
)] const VARIANT *data
,
470 [in, defaultvalue(NULL
)] IUnknown
*object,
471 [out,retval] VARIANT_BOOL *supported
);
473 [hidden, id(DISPID_SOTDisplayUI
)]
474 HRESULT DisplayUI
([in] long hwnd
, [in] BSTR title
, [in]const BSTR type
,
475 [in, defaultvalue(NULL
)] const VARIANT *data
,
476 [in, defaultvalue(NULL
)] IUnknown
*object);
478 [id(DISPID_SOTMatchesAttributes
)]
479 HRESULT MatchesAttributes
([in] BSTR attributes
, [out,retval] VARIANT_BOOL *matches
);
482 typedef [hidden] enum DISPID_SpeechObjectTokens
484 DISPID_SOTsCount
= 1,
485 DISPID_SOTsItem
= DISPID_VALUE
,
486 DISPID_SOTs_NewEnum
= DISPID_NEWENUM
487 } DISPID_SpeechObjectTokens
;
491 uuid(9285b776
-2e7b
-4bc0
-b53e
-580eb6fa967f
),
493 pointer_default(unique)
495 interface ISpeechObjectTokens
: IDispatch
497 [propget, id(DISPID_SOTsCount
)]
498 HRESULT Count
([out, retval] long* count
);
501 HRESULT Item
([in] long index
, [out, retval] ISpeechObjectToken
**token
);
503 [propget, restricted, id(DISPID_NEWENUM
)]
504 HRESULT _NewEnum
([out, retval] IUnknown
**ppenum
);
507 typedef [hidden] enum DISPID_SpeechWaveFormatEx
509 DISPID_SWFEFormatTag
= 1,
511 DISPID_SWFESamplesPerSec
,
512 DISPID_SWFEAvgBytesPerSec
,
513 DISPID_SWFEBlockAlign
,
514 DISPID_SWFEBitsPerSample
,
516 } DISPID_SpeechWaveFormatEx
;
520 uuid(7a1ef0d5
-1581-4741-88e4
-209a49f11a10
),
522 pointer_default(unique)
524 interface ISpeechWaveFormatEx
: IDispatch
526 [propget, id(DISPID_SWFEFormatTag
)]
527 HRESULT FormatTag
([out,retval] short *tag
);
528 [propput, id(DISPID_SWFEFormatTag
)]
529 HRESULT FormatTag
([in] short tag
);
531 [propget, id(DISPID_SWFEChannels
)]
532 HRESULT Channels
([out,retval] short *channels
);
533 [propput, id(DISPID_SWFEChannels
)]
534 HRESULT Channels
([in] short channels
);
536 [propget, id(DISPID_SWFESamplesPerSec
)]
537 HRESULT SamplesPerSec
([out,retval] long * samples
);
538 [propput, id(DISPID_SWFESamplesPerSec
)]
539 HRESULT SamplesPerSec
([in] long samples
);
541 [propget, id(DISPID_SWFEAvgBytesPerSec
)]
542 HRESULT AvgBytesPerSec
([out,retval] long *average
);
543 [propput, id(DISPID_SWFEAvgBytesPerSec
)]
544 HRESULT AvgBytesPerSec
([in] long average
);
546 [propget, id(DISPID_SWFEBlockAlign
)]
547 HRESULT BlockAlign
([out,retval] short *alignment
);
548 [propput, id(DISPID_SWFEBlockAlign
)]
549 HRESULT BlockAlign
([in] short alignment
);
551 [propget, id(DISPID_SWFEBitsPerSample
)]
552 HRESULT BitsPerSample
([out,retval] short *bits
);
553 [propput, id(DISPID_SWFEBitsPerSample
)]
554 HRESULT BitsPerSample
([in] short bits
);
556 [propget, id(DISPID_SWFEExtraData
)]
557 HRESULT ExtraData
([out,retval] VARIANT *data
);
558 [propput, id(DISPID_SWFEExtraData
)]
559 HRESULT ExtraData
([in] VARIANT data
);
562 typedef enum SpeechAudioFormatType
565 SAFTNoAssignedFormat
= 0,
567 SAFTNonStandardFormat
,
568 SAFTExtendedAudioFormat
,
576 SAFT11kHz16BitStereo
,
580 SAFT12kHz16BitStereo
,
584 SAFT16kHz16BitStereo
,
588 SAFT22kHz16BitStereo
,
592 SAFT24kHz16BitStereo
,
596 SAFT32kHz16BitStereo
,
600 SAFT44kHz16BitStereo
,
604 SAFT48kHz16BitStereo
,
605 SAFTTrueSpeech_8kHz1BitMono
,
606 SAFTCCITT_ALaw_8kHzMono
,
607 SAFTCCITT_ALaw_8kHzStereo
,
608 SAFTCCITT_ALaw_11kHzMono
,
609 SAFTCCITT_ALaw_11kHzStereo
,
610 SAFTCCITT_ALaw_22kHzMono
,
611 SAFTCCITT_ALaw_22kHzStereo
,
612 SAFTCCITT_ALaw_44kHzMono
,
613 SAFTCCITT_ALaw_44kHzStereo
,
614 SAFTCCITT_uLaw_8kHzMono
,
615 SAFTCCITT_uLaw_8kHzStereo
,
616 SAFTCCITT_uLaw_11kHzMono
,
617 SAFTCCITT_uLaw_11kHzStereo
,
618 SAFTCCITT_uLaw_22kHzMono
,
619 SAFTCCITT_uLaw_22kHzStereo
,
620 SAFTCCITT_uLaw_44kHzMono
,
621 SAFTCCITT_uLaw_44kHzStereo
,
623 SAFTADPCM_8kHzStereo
,
625 SAFTADPCM_11kHzStereo
,
627 SAFTADPCM_22kHzStereo
,
629 SAFTADPCM_44kHzStereo
,
631 SAFTGSM610_11kHzMono
,
632 SAFTGSM610_22kHzMono
,
633 SAFTGSM610_44kHzMono
,
634 } SpeechAudioFormatType
;
636 typedef [hidden] enum DISPID_SpeechAudioFormat
640 DISPID_SAFGetWaveFormatEx
,
641 DISPID_SAFSetWaveFormatEx
642 } DISPID_SpeechAudioFormat
;
646 uuid(e6e9c590
-3e18
-40e3
-8299-061f98bde7c7
),
648 pointer_default(unique)
650 interface ISpeechAudioFormat
: IDispatch
652 [propget, id(DISPID_SAFType
)]
653 HRESULT Type
([out,retval] SpeechAudioFormatType
*format
);
654 [propput, id(DISPID_SAFType
)]
655 HRESULT Type
([in] SpeechAudioFormatType format
);
657 [propget, hidden, id(DISPID_SAFGuid
)]
658 HRESULT Guid
([out,retval] BSTR *guid
);
659 [propput, hidden, id(DISPID_SAFGuid
)]
660 HRESULT Guid
([in] BSTR guid
);
662 [hidden, id(DISPID_SAFGetWaveFormatEx
)]
663 HRESULT GetWaveFormatEx
([out,retval] ISpeechWaveFormatEx
**speechwave
);
665 [hidden, id(DISPID_SAFSetWaveFormatEx
)]
666 HRESULT SetWaveFormatEx
([in] ISpeechWaveFormatEx
*speechwave
);
669 typedef enum SpeechStreamSeekPositionType
671 SSSPTRelativeToStart
= STREAM_SEEK_SET
,
672 SSSPTRelativeToCurrentPosition
= STREAM_SEEK_CUR
,
673 SSSPTRelativeToEnd
= STREAM_SEEK_END
674 } SpeechStreamSeekPositionType
;
676 typedef [hidden] enum DISPID_SpeechBaseStream
678 DISPID_SBSFormat
= 1,
682 } DISPID_SpeechBaseStream
;
686 uuid(6450336f
-7d49
-4ced
-8097-49d6dee37294
),
688 pointer_default(unique)
690 interface ISpeechBaseStream
: IDispatch
692 [propget, id(DISPID_SBSFormat
)]
693 HRESULT Format
([out,retval] ISpeechAudioFormat
**format
);
694 [propputref, id(DISPID_SBSFormat
)]
695 HRESULT Format
([in] ISpeechAudioFormat
*format
);
698 HRESULT Read
([out] VARIANT *buffer
, [in] long written
, [out,retval] long *read
);
700 [id(DISPID_SBSWrite
)]
701 HRESULT Write
([in] VARIANT buffer
, [out,retval] long *written
);
704 HRESULT Seek
([in] VARIANT position
, [in, defaultvalue(SSSPTRelativeToStart
)] SpeechStreamSeekPositionType origin
,
705 [out,retval] VARIANT *pos
);
708 typedef [hidden] enum DISPID_SpeechAudioStatus
710 DISPID_SASFreeBufferSpace
= 1,
711 DISPID_SASNonBlockingIO
,
713 DISPID_SASCurrentSeekPosition
,
714 DISPID_SASCurrentDevicePosition
715 } DISPID_SpeechAudioStatus
;
719 uuid(c62d9c91
-7458-47f6
-862d
-1ef86fb0b278
),
721 pointer_default(unique)
723 interface ISpeechAudioStatus
: IDispatch
725 [propget, id(DISPID_SASFreeBufferSpace
)]
726 HRESULT FreeBufferSpace
([out,retval] long *space
);
728 [propget, id(DISPID_SASNonBlockingIO
)]
729 HRESULT NonBlockingIO
([out,retval] long *nonblocking
);
731 [propget, id(DISPID_SASState
)]
732 HRESULT State
([out, retval] SpeechAudioState
*state
);
734 [propget, id(DISPID_SASCurrentSeekPosition
)]
735 HRESULT CurrentSeekPosition
([out,retval] VARIANT *position
);
737 [propget, id(DISPID_SASCurrentDevicePosition
)]
738 HRESULT CurrentDevicePosition
([out,retval] VARIANT *position
);
741 typedef [hidden] enum DISPID_SpeechRecognizerStatus
743 DISPID_SRSAudioStatus
= 1,
744 DISPID_SRSCurrentStreamPosition
,
745 DISPID_SRSCurrentStreamNumber
,
746 DISPID_SRSNumberOfActiveRules
,
747 DISPID_SRSClsidEngine
,
748 DISPID_SRSSupportedLanguages
749 } DISPID_SpeechRecognizerStatus
;
753 uuid(bff9e781
-53ec
-484e
-bb8a
-0e1b5551e35c
),
755 pointer_default(unique)
757 interface ISpeechRecognizerStatus
: IDispatch
759 [propget, id(DISPID_SRSAudioStatus
)]
760 HRESULT AudioStatus
([out,retval] ISpeechAudioStatus
**audio
);
762 [propget, id(DISPID_SRSCurrentStreamPosition
)]
763 HRESULT CurrentStreamPosition
([out,retval] VARIANT *pos
);
765 [propget, id(DISPID_SRSCurrentStreamNumber
)]
766 HRESULT CurrentStreamNumber
([out,retval] long *number
);
768 [propget, id(DISPID_SRSNumberOfActiveRules
)]
769 HRESULT NumberOfActiveRules
([out,retval] long *rules
);
771 [propget, id(DISPID_SRSClsidEngine
)]
772 HRESULT ClsidEngine
([out,retval] BSTR *clsid
);
774 [propget, id(DISPID_SRSSupportedLanguages
)]
775 HRESULT SupportedLanguages
([out,retval] VARIANT *languages
);
778 typedef [hidden] enum DISPID_SpeechVoiceStatus
780 DISPID_SVSCurrentStreamNumber
= 1,
781 DISPID_SVSLastStreamNumberQueued
,
782 DISPID_SVSLastResult
,
783 DISPID_SVSRunningState
,
784 DISPID_SVSInputWordPosition
,
785 DISPID_SVSInputWordLength
,
786 DISPID_SVSInputSentencePosition
,
787 DISPID_SVSInputSentenceLength
,
788 DISPID_SVSLastBookmark
,
789 DISPID_SVSLastBookmarkId
,
792 } DISPID_SpeechVoiceStatus
;
796 uuid(8be47b07
-57f6
-11d2
-9eee
-00c04f797396
),
798 pointer_default(unique)
800 interface ISpeechVoiceStatus
: IDispatch
802 [propget, id(DISPID_SVSCurrentStreamNumber
)]
803 HRESULT CurrentStreamNumber
([out, retval] long *number
);
805 [propget, id(DISPID_SVSLastStreamNumberQueued
)]
806 HRESULT LastStreamNumberQueued
([out, retval] long *number
);
808 [propget, id(DISPID_SVSLastResult
)]
809 HRESULT LastHResult
([out, retval]long *result
);
811 [propget, id(DISPID_SVSRunningState
)]
812 HRESULT RunningState
([out, retval] SpeechRunState
*state
);
814 [propget, id(DISPID_SVSInputWordPosition
)]
815 HRESULT InputWordPosition
([out, retval] long *position
);
817 [propget, id(DISPID_SVSInputWordLength
)]
818 HRESULT InputWordLength
([out, retval] long *length
);
820 [propget, id(DISPID_SVSInputSentencePosition
)]
821 HRESULT InputSentencePosition
([out, retval] long *position
);
823 [propget, id(DISPID_SVSInputSentenceLength
)]
824 HRESULT InputSentenceLength
([out, retval] long *length
);
826 [propget, id(DISPID_SVSLastBookmark
)]
827 HRESULT LastBookmark
([out, retval] BSTR *bookmark
);
829 [propget, id(DISPID_SVSLastBookmarkId
), hidden]
830 HRESULT LastBookmarkId
([out, retval] long *bookmark
);
832 [propget, id(DISPID_SVSPhonemeId
)]
833 HRESULT PhonemeId
([out, retval] short *phone
);
835 [propget, id(DISPID_SVSVisemeId
)]
836 HRESULT VisemeId
([out, retval] short *id);
839 typedef [hidden] enum DISPID_SpeechVoice
843 DISPID_SVAudioOutput
,
844 DISPID_SVAudioOutputStream
,
847 DISPID_SVAllowAudioOuputFormatChangesOnNextSet
,
848 DISPID_SVEventInterests
,
850 DISPID_SVAlertBoundary
,
851 DISPID_SVSyncronousSpeakTimeout
,
853 DISPID_SVSpeakStream
,
858 DISPID_SVGetAudioOutputs
,
859 DISPID_SVWaitUntilDone
,
860 DISPID_SVSpeakCompleteEvent
,
861 DISPID_SVIsUISupported
,
863 } DISPID_SpeechVoice
;
867 uuid(269316d8
-57bd
-11d2
-9eee
-00c04f797396
),
869 pointer_default(unique)
871 interface ISpeechVoice
: IDispatch
873 [propget, id(DISPID_SVStatus
)]
874 HRESULT Status
([out, retval] ISpeechVoiceStatus
**Status
);
876 [propget, id(DISPID_SVVoice
)]
877 HRESULT Voice
([out, retval] ISpeechObjectToken
**voice
);
879 [propputref, id(DISPID_SVVoice
)]
880 HRESULT Voice
([in] ISpeechObjectToken
*voice
);
882 [propget, id(DISPID_SVAudioOutput
)]
883 HRESULT AudioOutput
([out, retval] ISpeechObjectToken
**output
);
885 [propputref, id(DISPID_SVAudioOutput
)]
886 HRESULT AudioOutput
([in] ISpeechObjectToken
*output
);
888 [propget, id(DISPID_SVAudioOutputStream
)]
889 HRESULT AudioOutputStream
([out, retval] ISpeechBaseStream
**output
);
891 [propputref, id(DISPID_SVAudioOutputStream
)]
892 HRESULT AudioOutputStream
([in] ISpeechBaseStream
*output
);
894 [propget, id(DISPID_SVRate
)]
895 HRESULT Rate
([out, retval] long *rate
);
897 [propput, id(DISPID_SVRate
)]
898 HRESULT Rate
([in] long rate
);
900 [propget, id(DISPID_SVVolume
)]
901 HRESULT Volume
([out, retval] long *volume
);
903 [propput, id(DISPID_SVVolume
)]
904 HRESULT Volume
([in] long volume
);
906 [propput, hidden, id(DISPID_SVAllowAudioOuputFormatChangesOnNextSet
)]
907 HRESULT AllowAudioOutputFormatChangesOnNextSet
([in] VARIANT_BOOL allow
);
909 [propget, hidden, id(DISPID_SVAllowAudioOuputFormatChangesOnNextSet
)]
910 HRESULT AllowAudioOutputFormatChangesOnNextSet
([out,retval] VARIANT_BOOL *allow
);
912 [propget, id(DISPID_SVEventInterests
)]
913 HRESULT EventInterests
([out,retval] SpeechVoiceEvents
*flags
);
915 [propput, id(DISPID_SVEventInterests
)]
916 HRESULT EventInterests
([in] SpeechVoiceEvents flags
);
918 [propput, id(DISPID_SVPriority
)]
919 HRESULT Priority
([in] SpeechVoicePriority vpriority
);
921 [propget, id(DISPID_SVPriority
)]
922 HRESULT Priority
([out,retval] SpeechVoicePriority
*vpriority
);
924 [propput, id(DISPID_SVAlertBoundary
)]
925 HRESULT AlertBoundary
([in] SpeechVoiceEvents boundary
);
927 [propget, id(DISPID_SVAlertBoundary
)]
928 HRESULT AlertBoundary
([out,retval] SpeechVoiceEvents
*boundary
);
930 [propput, id(DISPID_SVSyncronousSpeakTimeout
)]
931 HRESULT SynchronousSpeakTimeout
([in] long timeout
);
933 [propget, id(DISPID_SVSyncronousSpeakTimeout
)]
934 HRESULT SynchronousSpeakTimeout
([out,retval] long *timeout
);
937 HRESULT Speak
([in] BSTR text
, [in, defaultvalue(SPF_DEFAULT
)] SpeechVoiceSpeakFlags flags
,
938 [out, retval] long *number
);
940 [id(DISPID_SVSpeakStream
)]
941 HRESULT SpeakStream
([in] ISpeechBaseStream
*stream
, [in, defaultvalue(SPF_DEFAULT
)] SpeechVoiceSpeakFlags flags
,
942 [out, retval] long *number
);
947 [id(DISPID_SVResume
)]
948 HRESULT Resume
(void);
951 HRESULT Skip
([in] const BSTR type
, [in] long items
, [out,retval ]long *skipped
);
953 [id(DISPID_SVGetVoices
)]
954 HRESULT GetVoices
([in, defaultvalue("")] BSTR required
, [in, defaultvalue("")] BSTR optional,
955 [out,retval] ISpeechObjectTokens
**tokens
);
957 [id(DISPID_SVGetAudioOutputs
)]
958 HRESULT GetAudioOutputs
([in, defaultvalue("")] BSTR required
, [in, defaultvalue("")] BSTR optional,
959 [out,retval] ISpeechObjectTokens
**tokens
);
961 [id(DISPID_SVWaitUntilDone
)]
962 HRESULT WaitUntilDone
([in] long msTimeout
, [out,retval] VARIANT_BOOL *done
);
964 [hidden, id(DISPID_SVSpeakCompleteEvent
)]
965 HRESULT SpeakCompleteEvent
([out,retval] long *handle);
967 [id(DISPID_SVIsUISupported
)]
968 HRESULT IsUISupported
( [in] const BSTR typeui
, [in, defaultvalue(NULL
)] const VARIANT *data
,
969 [out,retval] VARIANT_BOOL *supported
);
971 [id(DISPID_SVDisplayUI
)]
972 HRESULT DisplayUI
([in] long hwnd
, [in] BSTR title
, [in] const BSTR typeui
, [in, defaultvalue(NULL
)] const VARIANT *data
);
975 typedef [hidden] enum DISPID_SpeechRecoResultTimes
977 DISPID_SRRTStreamTime
= 1,
979 DISPID_SRRTTickCount
,
980 DISPID_SRRTOffsetFromStart
981 } DISPID_SpeechRecoResultTimes
;
985 uuid(62b3b8fb
-f6e7
-41be
-bdcb
-056b1c29efc0
),
987 pointer_default(unique)
989 interface ISpeechRecoResultTimes
: IDispatch
991 [propget, id(DISPID_SRRTStreamTime
)]
992 HRESULT StreamTime
([out,retval] VARIANT *streamtime
);
994 [propget, id(DISPID_SRRTLength
)]
995 HRESULT Length
([out,retval] VARIANT *length
);
997 [propget, id(DISPID_SRRTTickCount
)]
998 HRESULT TickCount
([out,retval] long *count
);
1000 [propget, id(DISPID_SRRTOffsetFromStart
)]
1001 HRESULT OffsetFromStart
([out,retval] VARIANT *offset
);
1004 typedef [hidden] enum DISPID_SpeechPhraseRules
1006 DISPID_SPRulesCount
= 1,
1007 DISPID_SPRulesItem
= DISPID_VALUE
,
1008 DISPID_SPRules_NewEnum
= DISPID_NEWENUM
1009 } DISPID_SpeechPhraseRules
;
1013 uuid(9047d593
-01dd
-4b72
-81a3
-e4a0ca69f407
),
1015 pointer_default(unique)
1017 interface ISpeechPhraseRules
: IDispatch
1019 [propget, id(DISPID_SPRulesCount
)]
1020 HRESULT Count
([out, retval] long *count
);
1022 [id(DISPID_SPRulesItem
)]
1023 HRESULT Item
([in] long index
, [out, retval] ISpeechPhraseRule
**rule
);
1025 [propget, restricted, id(DISPID_SPRules_NewEnum
)]
1026 HRESULT _NewEnum
([out, retval] IUnknown
**obj
);
1029 typedef [hidden] enum DISPID_SpeechPhraseRule
1031 DISPID_SPRuleName
= 1,
1033 DISPID_SPRuleFirstElement
,
1034 DISPID_SPRuleNumberOfElements
,
1035 DISPID_SPRuleParent
,
1036 DISPID_SPRuleChildren
,
1037 DISPID_SPRuleConfidence
,
1038 DISPID_SPRuleEngineConfidence
1039 } DISPID_SpeechPhraseRule
;
1043 uuid(a7bfe112
-a4a0
-48d9
-b602
-c313843f6964
),
1045 pointer_default(unique)
1047 interface ISpeechPhraseRule
: IDispatch
1049 [propget, id(DISPID_SPRuleName
)]
1050 HRESULT Name
([out, retval]BSTR *name
);
1052 [propget, id(DISPID_SPRuleId
)]
1053 HRESULT Id( [out, retval] long *id);
1055 [propget, id(DISPID_SPRuleFirstElement
)]
1056 HRESULT FirstElement
([out, retval] long *element
);
1058 [propget, id(DISPID_SPRuleNumberOfElements
)]
1059 HRESULT NumberOfElements
([out, retval] long *count
);
1061 [propget, id(DISPID_SPRuleParent
)]
1062 HRESULT Parent
([out, retval] ISpeechPhraseRule
**parent
);
1064 [propget, id(DISPID_SPRuleChildren
)]
1065 HRESULT Children
([out, retval] ISpeechPhraseRules
**children
);
1067 [propget, id(DISPID_SPRuleConfidence
)]
1068 HRESULT Confidence
([out, retval] SpeechEngineConfidence
*confidence
);
1070 [propget, id(DISPID_SPRuleEngineConfidence
)]
1071 HRESULT EngineConfidence
([out, retval] float *confidence
);
1074 typedef [hidden] enum DISPID_SpeechPhraseProperty
1079 DISPID_SPPFirstElement
,
1080 DISPID_SPPNumberOfElements
,
1081 DISPID_SPPEngineConfidence
,
1082 DISPID_SPPConfidence
,
1085 } DISPID_SpeechPhraseProperty
;
1089 uuid(CE563D48
-961E-4732-A2E1
-378A42B430BE
),
1091 pointer_default(unique)
1093 interface ISpeechPhraseProperty
: IDispatch
1095 [propget, id(DISPID_SPPName
)]
1096 HRESULT Name
([out, retval] BSTR *name
);
1098 [propget, id(DISPID_SPPId
)]
1099 HRESULT Id([out, retval] long *id);
1101 [propget, id(DISPID_SPPValue
)]
1102 HRESULT Value
([out, retval] VARIANT *value
);
1104 [propget, id(DISPID_SPPFirstElement
)]
1105 HRESULT FirstElement
( [out, retval] long *element
);
1107 [propget, id(DISPID_SPPNumberOfElements
)]
1108 HRESULT NumberOfElements
([out, retval] long *elements
);
1110 [propget, id(DISPID_SPPEngineConfidence
)]
1111 HRESULT EngineConfidence
([out, retval] float *confidence
);
1113 [propget, id(DISPID_SPPConfidence
)]
1114 HRESULT Confidence
([out, retval] SpeechEngineConfidence
*Confidence
);
1116 [propget, id(DISPID_SPPParent
)]
1117 HRESULT Parent
([out, retval] ISpeechPhraseProperty
**parent
);
1119 [propget, id(DISPID_SPPChildren
)]
1120 HRESULT Children
( [out, retval] ISpeechPhraseProperties
**children
);
1123 typedef [hidden] enum DISPID_SpeechPhraseProperties
1125 DISPID_SPPsCount
= 1,
1126 DISPID_SPPsItem
= DISPID_VALUE
,
1127 DISPID_SPPs_NewEnum
= DISPID_NEWENUM
1128 } DISPID_SpeechPhraseProperties
;
1132 uuid(08166b47
-102e-4b23
-a599
-bdb98dbfd1f4
),
1134 pointer_default(unique)
1136 interface ISpeechPhraseProperties
: IDispatch
1138 [propget, id(DISPID_SPPsCount
)]
1139 HRESULT Count
([out, retval] long *count
);
1141 [id(DISPID_SPPsItem
)]
1142 HRESULT Item
([in] long index
, [out, retval] ISpeechPhraseProperty
**obj
);
1144 [propget, restricted, id(DISPID_SPPs_NewEnum
)]
1145 HRESULT _NewEnum
([out, retval] IUnknown
**obj
);
1148 typedef [hidden] enum DISPID_SpeechPhraseElement
1150 DISPID_SPEAudioTimeOffset
= 1,
1151 DISPID_SPEAudioSizeTime
,
1152 DISPID_SPEAudioStreamOffset
,
1153 DISPID_SPEAudioSizeBytes
,
1154 DISPID_SPERetainedStreamOffset
,
1155 DISPID_SPERetainedSizeBytes
,
1156 DISPID_SPEDisplayText
,
1157 DISPID_SPELexicalForm
,
1158 DISPID_SPEPronunciation
,
1159 DISPID_SPEDisplayAttributes
,
1160 DISPID_SPERequiredConfidence
,
1161 DISPID_SPEActualConfidence
,
1162 DISPID_SPEEngineConfidence
1163 } DISPID_SpeechPhraseElement
;
1167 uuid(e6176f96
-e373
-4801-b223
-3b62c068c0b4
),
1169 pointer_default(unique)
1171 interface ISpeechPhraseElement
: IDispatch
1173 [propget, id(DISPID_SPEAudioTimeOffset
)]
1174 HRESULT AudioTimeOffset
( [out, retval] long *offset
);
1176 [propget, id(DISPID_SPEAudioSizeTime
)]
1177 HRESULT AudioSizeTime
([out, retval] long *audiotime
);
1179 [propget, id(DISPID_SPEAudioStreamOffset
)]
1180 HRESULT AudioStreamOffset
([out, retval] long *offset
);
1182 [propget, id(DISPID_SPEAudioSizeBytes
)]
1183 HRESULT AudioSizeBytes
([out, retval]long *bytes
);
1185 [propget, id(DISPID_SPERetainedStreamOffset
)]
1186 HRESULT RetainedStreamOffset
([out, retval] long *offset
);
1188 [propget, id(DISPID_SPERetainedSizeBytes
)]
1189 HRESULT RetainedSizeBytes
([out, retval] long *retained
);
1191 [propget, id(DISPID_SPEDisplayText
)]
1192 HRESULT DisplayText
([out, retval] BSTR *display
);
1194 [propget, id(DISPID_SPELexicalForm
)]
1195 HRESULT LexicalForm
( [out, retval] BSTR *lexical
);
1197 [propget, id(DISPID_SPEPronunciation
)]
1198 HRESULT Pronunciation
([out, retval] VARIANT *pronunciation
);
1200 [propget, id(DISPID_SPEDisplayAttributes
)]
1201 HRESULT DisplayAttributes
([out, retval] SpeechDisplayAttributes
*attributes
);
1203 [propget, id(DISPID_SPERequiredConfidence
)]
1204 HRESULT RequiredConfidence
([out, retval] SpeechEngineConfidence
*confidence
);
1206 [propget, id(DISPID_SPEActualConfidence
)]
1207 HRESULT ActualConfidence
([out, retval] SpeechEngineConfidence
*confidence
);
1209 [propget, id(DISPID_SPEEngineConfidence
)]
1210 HRESULT EngineConfidence
([out, retval] float *confidence
);
1213 typedef [hidden] enum DISPID_SpeechPhraseElements
1215 DISPID_SPEsCount
= 1,
1216 DISPID_SPEsItem
= DISPID_VALUE
,
1217 DISPID_SPEs_NewEnum
= DISPID_NEWENUM
1218 } DISPID_SpeechPhraseElements
;
1222 uuid(0626b328
-3478-467d
-a0b3
-d0853b93dda3
),
1224 pointer_default(unique)
1226 interface ISpeechPhraseElements
: IDispatch
1228 [propget, id(DISPID_SPEsCount
)]
1229 HRESULT Count
([out, retval] long *count
);
1231 [id(DISPID_SPEsItem
)]
1232 HRESULT Item
([in] long Index
, [out, retval] ISpeechPhraseElement
**element
);
1234 [propget, restricted, id(DISPID_SPEs_NewEnum
)]
1235 HRESULT _NewEnum
([out, retval] IUnknown
**obj
);
1238 typedef [hidden] enum DISPID_SpeechPhraseReplacement
1240 DISPID_SPRDisplayAttributes
= 1,
1242 DISPID_SPRFirstElement
,
1243 DISPID_SPRNumberOfElements
1244 } DISPID_SpeechPhraseReplacement
;
1248 uuid(2890a410
-53a7
-4fb5
-94ec
-06d4998e3d02
),
1250 pointer_default(unique)
1252 interface ISpeechPhraseReplacement
: IDispatch
1254 [propget, id(DISPID_SPRDisplayAttributes
)]
1255 HRESULT DisplayAttributes
([out,retval] SpeechDisplayAttributes
*attributes
);
1257 [propget, id(DISPID_SPRText
)]
1258 HRESULT Text
([out, retval] BSTR *text
);
1260 [propget, id(DISPID_SPRFirstElement
)]
1261 HRESULT FirstElement
([out, retval] long *element
);
1263 [propget, id(DISPID_SPRNumberOfElements
)]
1264 HRESULT NumberOfElements
([out, retval] long *elements
);
1267 typedef [hidden] enum DISPID_SpeechPhraseReplacements
1269 DISPID_SPRsCount
= 1,
1270 DISPID_SPRsItem
= DISPID_VALUE
,
1271 DISPID_SPRs_NewEnum
= DISPID_NEWENUM
1272 } DISPID_SpeechPhraseReplacements
;
1276 uuid(38bc662f
-2257-4525-959e-2069d2596c05
),
1278 pointer_default(unique)
1280 interface ISpeechPhraseReplacements
: IDispatch
1282 [propget, id(DISPID_SPRsCount
)]
1283 HRESULT Count
([out, retval] long *count
);
1285 [id(DISPID_SPRsItem
)]
1286 HRESULT Item
([in] long index
, [out, retval] ISpeechPhraseReplacement
**reps
);
1288 [propget, restricted, id(DISPID_SPRs_NewEnum
)]
1289 HRESULT _NewEnum
([out, retval] IUnknown
**obj
);
1292 typedef [hidden] enum DISPID_SpeechPhraseInfo
1294 DISPID_SPILanguageId
= 1,
1295 DISPID_SPIGrammarId
,
1296 DISPID_SPIStartTime
,
1297 DISPID_SPIAudioStreamPosition
,
1298 DISPID_SPIAudioSizeBytes
,
1299 DISPID_SPIRetainedSizeBytes
,
1300 DISPID_SPIAudioSizeTime
,
1302 DISPID_SPIProperties
,
1304 DISPID_SPIReplacements
,
1306 DISPID_SPIEnginePrivateData
,
1307 DISPID_SPISaveToMemory
,
1309 DISPID_SPIGetDisplayAttributes
1310 } DISPID_SpeechPhraseInfo
;
1314 uuid(961559cf
-4e67
-4662-8bf0
-d93f1fcd61b3
),
1316 pointer_default(unique)
1318 interface ISpeechPhraseInfo
: IDispatch
1320 [propget, id(DISPID_SPILanguageId
)]
1321 HRESULT LanguageId
( [out, retval] long *language
);
1323 [propget, id(DISPID_SPIGrammarId
)]
1324 HRESULT GrammarId
([out, retval] VARIANT *grammar
);
1326 [propget, id(DISPID_SPIStartTime
)]
1327 HRESULT StartTime
([out, retval]VARIANT *start
);
1329 [propget, id(DISPID_SPIAudioStreamPosition
)]
1330 HRESULT AudioStreamPosition
([out, retval] VARIANT *position
);
1332 [propget, id(DISPID_SPIAudioSizeBytes
)]
1333 HRESULT AudioSizeBytes
([out, retval] long *bytes
);
1335 [propget, id(DISPID_SPIRetainedSizeBytes
)]
1336 HRESULT RetainedSizeBytes
([out, retval] long *bytes
);
1338 [propget, id(DISPID_SPIAudioSizeTime
)]
1339 HRESULT AudioSizeTime
([out, retval] long *audiotime
);
1341 [propget, id(DISPID_SPIRule
)]
1342 HRESULT Rule
([out, retval] ISpeechPhraseRule
**rule
);
1344 [propget, id(DISPID_SPIProperties
)]
1345 HRESULT Properties
([out, retval] ISpeechPhraseProperties
**props
);
1347 [propget, id(DISPID_SPIElements
)]
1348 HRESULT Elements
([out, retval] ISpeechPhraseElements
**elements
);
1350 [propget, id(DISPID_SPIReplacements
)]
1351 HRESULT Replacements
([out, retval] ISpeechPhraseReplacements
**replacements
);
1353 [propget, id(DISPID_SPIEngineId
)]
1354 HRESULT EngineId
([out, retval] BSTR *engine
);
1356 [propget, id(DISPID_SPIEnginePrivateData
)]
1357 HRESULT EnginePrivateData
([out, retval] VARIANT *data
);
1359 [id(DISPID_SPISaveToMemory
)]
1360 HRESULT SaveToMemory
([out,retval] VARIANT *block
);
1362 [id(DISPID_SPIGetText
)]
1363 HRESULT GetText
([in, defaultvalue(0)] long start
,
1364 [in, defaultvalue(SPPR_ALL_ELEMENTS
)] long elements
,
1365 [in, defaultvalue(-1)] VARIANT_BOOL replacements
, [out,retval] BSTR *text
);
1367 [id(DISPID_SPIGetDisplayAttributes
)]
1368 HRESULT GetDisplayAttributes
([in, defaultvalue(0)] long start
,
1369 [in, defaultvalue(SPPR_ALL_ELEMENTS
)] long elements
,
1370 [in, defaultvalue(-1)] VARIANT_BOOL replacements
,
1371 [out,retval] SpeechDisplayAttributes
*attributes
);
1374 typedef [hidden] enum DISPID_SpeechPhraseAlternate
1376 DISPID_SPARecoResult
= 1,
1377 DISPID_SPAStartElementInResult
,
1378 DISPID_SPANumberOfElementsInResult
,
1379 DISPID_SPAPhraseInfo
,
1381 } DISPID_SpeechPhraseAlternate
;
1385 uuid(27864a2a
-2b9f
-4cb8
-92d3
-0d2722fd1e73
),
1387 pointer_default(unique)
1389 interface ISpeechPhraseAlternate
: IDispatch
1391 [propget, id(DISPID_SPARecoResult
)]
1392 HRESULT RecoResult
( [out,retval] ISpeechRecoResult
**result
);
1394 [propget, id(DISPID_SPAStartElementInResult
)]
1395 HRESULT StartElementInResult
([out,retval] long *element
);
1397 [propget, id(DISPID_SPANumberOfElementsInResult
)]
1398 HRESULT NumberOfElementsInResult
([out,retval] long *elements
);
1400 [propget, id(DISPID_SPAPhraseInfo
)]
1401 HRESULT PhraseInfo
( [out,retval] ISpeechPhraseInfo
**PhraseInfo
);
1403 [id(DISPID_SPACommit
)]
1404 HRESULT Commit
(void);
1407 typedef [hidden] enum DISPID_SpeechPhraseAlternates
1409 DISPID_SPAsCount
= 1,
1410 DISPID_SPAsItem
= DISPID_VALUE
,
1411 DISPID_SPAs_NewEnum
= DISPID_NEWENUM
1412 } DISPID_SpeechPhraseAlternates
;
1416 uuid(b238b6d5
-f276
-4c3d
-a6c1
-2974801c3cc2
),
1418 pointer_default(unique)
1420 interface ISpeechPhraseAlternates
: IDispatch
1422 [propget, id(DISPID_SPAsCount
)]
1423 HRESULT Count
([out, retval] long *count
);
1425 [id(DISPID_SPAsItem
)]
1426 HRESULT Item
([in] long index
, [out, retval] ISpeechPhraseAlternate
**alternate
);
1428 [propget, restricted, id(DISPID_SPAs_NewEnum
)]
1429 HRESULT _NewEnum
([out, retval] IUnknown
**obj
);
1432 typedef [hidden] enum DISPID_SpeechMemoryStream
1434 DISPID_SMSSetData
= 100,
1436 } DISPID_SpeechMemoryStream
;
1440 uuid(eeb14b68
-808b
-4abe
-a5ea
-b51da7588008
),
1442 pointer_default(unique)
1444 interface ISpeechMemoryStream
: ISpeechBaseStream
1446 [id(DISPID_SMSSetData
)]
1447 HRESULT SetData
([in] VARIANT data
);
1449 [id(DISPID_SMSGetData
)]
1450 HRESULT GetData
([out, retval] VARIANT *data
);
1453 typedef [hidden] enum DISPID_SpeechRecoResult
1455 DISPID_SRRRecoContext
= 1,
1457 DISPID_SRRAudioFormat
,
1458 DISPID_SRRPhraseInfo
,
1459 DISPID_SRRAlternates
,
1461 DISPID_SRRSpeakAudio
,
1462 DISPID_SRRSaveToMemory
,
1463 DISPID_SRRDiscardResultInfo
1464 } DISPID_SpeechRecoResult
;
1468 uuid(ed2879cf
-ced9
-4ee6
-a534
-de0191d5468d
),
1470 pointer_default(unique)
1472 interface ISpeechRecoResult
: IDispatch
1474 [propget, id(DISPID_SRRRecoContext
)]
1475 HRESULT RecoContext
( [out,retval] ISpeechRecoContext
** RecoContext
);
1477 [propget, id(DISPID_SRRTimes
)]
1478 HRESULT Times
([out,retval] ISpeechRecoResultTimes
**times
);
1480 [propputref, id(DISPID_SRRAudioFormat
)]
1481 HRESULT AudioFormat
([in]ISpeechAudioFormat
*format
);
1482 [propget, id(DISPID_SRRAudioFormat
)]
1483 HRESULT AudioFormat
([out,retval] ISpeechAudioFormat
**format
);
1485 [propget, id(DISPID_SRRPhraseInfo
)]
1486 HRESULT PhraseInfo
([out,retval] ISpeechPhraseInfo
**phrase
);
1488 [id(DISPID_SRRAlternates
)]
1489 HRESULT Alternates
( [in] long count
, [in, defaultvalue(0)] long start
,
1490 [in, defaultvalue(SPPR_ALL_ELEMENTS
)] long elements
,
1491 [out,retval] ISpeechPhraseAlternates
**alternates
);
1493 [id(DISPID_SRRAudio
)]
1494 HRESULT Audio
([in, defaultvalue(0)] long start
,
1495 [in, defaultvalue(SPPR_ALL_ELEMENTS
)] long elements
,
1496 [out,retval] ISpeechMemoryStream
**stream
);
1498 [id(DISPID_SRRSpeakAudio
)]
1499 HRESULT SpeakAudio
([in, defaultvalue(0)] long start
,
1500 [in, defaultvalue(SPPR_ALL_ELEMENTS
)] long elements
,
1501 [in, defaultvalue(SPF_DEFAULT
)] SpeechVoiceSpeakFlags flags
,
1502 [out,retval] long *stream
);
1504 [id(DISPID_SRRSaveToMemory
)]
1505 HRESULT SaveToMemory
([out,retval] VARIANT *block
);
1507 [id(DISPID_SRRDiscardResultInfo
)]
1508 HRESULT DiscardResultInfo
([in] SpeechDiscardType types
);
1511 typedef [hidden] enum DISPID_SpeechGrammarRule
1513 DISPID_SGRAttributes
= 1,
1514 DISPID_SGRInitialState
,
1518 DISPID_SGRAddResource
,
1520 } DISPID_SpeechGrammarRule
;
1522 typedef [hidden] enum DISPID_SpeechGrammarRuleStateTransitions
1524 DISPID_SGRSTsCount
= 1,
1525 DISPID_SGRSTsItem
= DISPID_VALUE
,
1526 DISPID_SGRSTs_NewEnum
= DISPID_NEWENUM
1527 } DISPID_SpeechGrammarRuleStateTransitions
;
1529 typedef enum SpeechGrammarRuleStateTransitionType
1537 } SpeechGrammarRuleStateTransitionType
;
1539 typedef [hidden] enum DISPID_SpeechGrammarRuleStateTransition
1541 DISPID_SGRSTType
= 1,
1545 DISPID_SGRSTPropertyName
,
1546 DISPID_SGRSTPropertyId
,
1547 DISPID_SGRSTPropertyValue
,
1548 DISPID_SGRSTNextState
1549 } DISPID_SpeechGrammarRuleStateTransition
;
1553 uuid(cafd1db1
-41d1
-4a06
-9863-e2e81da17a9a
),
1555 pointer_default(unique)
1557 interface ISpeechGrammarRuleStateTransition
: IDispatch
1559 [propget, id(DISPID_SGRSTType
)]
1560 HRESULT Type
([out, retval] SpeechGrammarRuleStateTransitionType
*type
);
1562 [propget, id(DISPID_SGRSTText
)]
1563 HRESULT Text
([out, retval] BSTR *text
);
1565 [propget, id(DISPID_SGRSTRule
)]
1566 HRESULT Rule
([out, retval] ISpeechGrammarRule
**rule
);
1568 [propget, id(DISPID_SGRSTWeight
)]
1569 HRESULT Weight
([out, retval] VARIANT *weight
);
1571 [propget, id(DISPID_SGRSTPropertyName
)]
1572 HRESULT PropertyName
([out, retval] BSTR *name
);
1574 [propget, id(DISPID_SGRSTPropertyId
)]
1575 HRESULT PropertyId
([out, retval] long *id);
1577 [propget, id(DISPID_SGRSTPropertyValue
)]
1578 HRESULT PropertyValue
([out, retval] VARIANT *value
);
1580 [propget, id(DISPID_SGRSTNextState
)]
1581 HRESULT NextState
([out, retval] ISpeechGrammarRuleState
**state
);
1586 uuid(EABCE657
-75BC
-44a2
-AA7F
-C56476742963
),
1588 pointer_default(unique)
1590 interface ISpeechGrammarRuleStateTransitions
: IDispatch
1592 [propget, id(DISPID_SGRSTsCount
)]
1593 HRESULT Count
([out, retval] long *count
);
1595 [id(DISPID_SGRSTsItem
)]
1596 HRESULT Item
([in] long index
, [out, retval] ISpeechGrammarRuleStateTransition
**transition
);
1598 [propget, restricted, id(DISPID_SGRSTs_NewEnum
)]
1599 HRESULT _NewEnum
([out, retval] IUnknown
**enum_var
);
1602 typedef [hidden] enum DISPID_SpeechGrammarRuleState
1604 DISPID_SGRSRule
= 1,
1605 DISPID_SGRSTransitions
,
1606 DISPID_SGRSAddWordTransition
,
1607 DISPID_SGRSAddRuleTransition
,
1608 DISPID_SGRSAddSpecialTransition
1609 } DISPID_SpeechGrammarRuleState
;
1613 uuid(d4286f2c
-ee67
-45ae
-b928
-28d695362eda
),
1615 pointer_default(unique)
1617 interface ISpeechGrammarRuleState
: IDispatch
1619 [propget, id(DISPID_SGRSRule
)]
1620 HRESULT Rule
([out, retval] ISpeechGrammarRule
**rule
);
1622 [propget, id(DISPID_SGRSTransitions
)]
1623 HRESULT Transitions
([out, retval] ISpeechGrammarRuleStateTransitions
**transitions
);
1625 [id(DISPID_SGRSAddWordTransition
)]
1626 HRESULT AddWordTransition
([in] ISpeechGrammarRuleState
*state
, [in] const BSTR Words
,
1627 [in, defaultvalue(" ")] const BSTR separators
, [in, defaultvalue(SGLexical
)] SpeechGrammarWordType type
,
1628 [in, defaultvalue("")] const BSTR name
, [in, defaultvalue(0)] long id,
1629 [in, defaultvalue(0)] VARIANT *value
, [in, defaultvalue(1)] float weight
);
1631 [id(DISPID_SGRSAddRuleTransition
)]
1632 HRESULT AddRuleTransition
([in] ISpeechGrammarRuleState
*state
, [in] ISpeechGrammarRule
*rule
,
1633 [in, defaultvalue("")] const BSTR name
, [in, defaultvalue(0)] long id,
1634 [in, defaultvalue(0)] VARIANT *value
, [in, defaultvalue(1)] float weight
);
1636 [id(DISPID_SGRSAddSpecialTransition
)]
1637 HRESULT AddSpecialTransition
([in] ISpeechGrammarRuleState
*state
, [in] SpeechSpecialTransitionType type
,
1638 [in, defaultvalue("")] const BSTR name
, [in, defaultvalue(0)] long id,
1639 [in, defaultvalue(0)] VARIANT* value
, [in, defaultvalue(1)] float weight
);
1644 uuid(afe719cf
-5dd1
-44f2
-999c
-7a399f1cfccc
),
1646 pointer_default(unique)
1648 interface ISpeechGrammarRule
: IDispatch
1650 [propget, id(DISPID_SGRAttributes
)]
1651 HRESULT Attributes
([out, retval] SpeechRuleAttributes
*attributes
);
1653 [propget, id(DISPID_SGRInitialState
)]
1654 HRESULT InitialState
([out, retval] ISpeechGrammarRuleState
**state
);
1656 [propget, id(DISPID_SGRName
)]
1657 HRESULT Name
([out, retval] BSTR *name
);
1659 [propget, id(DISPID_SGRId
)]
1660 HRESULT Id([out, retval] long *id);
1662 [id(DISPID_SGRClear
)]
1665 [id(DISPID_SGRAddResource
)]
1666 HRESULT AddResource
([in] const BSTR name
, [in] const BSTR value
);
1668 [id(DISPID_SGRAddState
)]
1669 HRESULT AddState
([out, retval] ISpeechGrammarRuleState
**state
);
1672 typedef [hidden] enum DISPIDSPTSI
1674 DISPIDSPTSI_ActiveOffset
= 1,
1675 DISPIDSPTSI_ActiveLength
,
1676 DISPIDSPTSI_SelectionOffset
,
1677 DISPIDSPTSI_SelectionLength
1682 uuid(3b9c7e7a
-6eee
-4ded
-9092-11657279adbe
),
1684 pointer_default(unique)
1686 interface ISpeechTextSelectionInformation
: IDispatch
1688 [propput, id(DISPIDSPTSI_ActiveOffset
)]
1689 HRESULT ActiveOffset
([in] long offset
);
1690 [propget, id(DISPIDSPTSI_ActiveOffset
)]
1691 HRESULT ActiveOffset
([out, retval] long *offset
);
1693 [propput, id(DISPIDSPTSI_ActiveLength
)]
1694 HRESULT ActiveLength
([in] long length
);
1695 [propget, id(DISPIDSPTSI_ActiveLength
)]
1696 HRESULT ActiveLength
([out, retval] long *length
);
1698 [propput, id(DISPIDSPTSI_SelectionOffset
)]
1699 HRESULT SelectionOffset
([in] long offset
);
1700 [propget, id(DISPIDSPTSI_SelectionOffset
)]
1701 HRESULT SelectionOffset
([out, retval] long *offset
);
1703 [propput, id(DISPIDSPTSI_SelectionLength
)]
1704 HRESULT SelectionLength
([in] long length
);
1705 [propget, id(DISPIDSPTSI_SelectionLength
)]
1706 HRESULT SelectionLength
([out, retval] long* length
);
1709 typedef [hidden] enum DISPID_SpeechGrammarRules
1711 DISPID_SGRsCount
= 1,
1715 DISPID_SGRsCommitAndSave
,
1716 DISPID_SGRsFindRule
,
1717 DISPID_SGRsItem
= DISPID_VALUE
,
1718 DISPID_SGRs_NewEnum
= DISPID_NEWENUM
1719 } DISPID_SpeechGrammarRules
;
1723 uuid(6ffa3b44
-fc2d
-40d1
-8afc
-32911c7f1ad1
),
1725 pointer_default(unique)
1727 interface ISpeechGrammarRules
: IDispatch
1729 [propget, id(DISPID_SGRsCount
)]
1730 HRESULT Count
([out, retval] long *count
);
1732 [id(DISPID_SGRsFindRule
)]
1733 HRESULT FindRule
([in] VARIANT id, [out, retval] ISpeechGrammarRule
**rule
);
1735 [id(DISPID_SGRsItem
)]
1736 HRESULT Item
([in] long index
, [out, retval] ISpeechGrammarRule
**rule
);
1738 [id(DISPID_SGRs_NewEnum
), propget, restricted]
1739 HRESULT _NewEnum
([out, retval] IUnknown
**enum_var
);
1741 [propget, id(DISPID_SGRsDynamic
)]
1742 HRESULT Dynamic
([out, retval] VARIANT_BOOL *dynamic
);
1744 [id(DISPID_SGRsAdd
)]
1745 HRESULT Add
([in] BSTR name
, [in] SpeechRuleAttributes attributes
,
1746 [in, defaultvalue(0)] long id, [out, retval] ISpeechGrammarRule
**rule
);
1748 [id(DISPID_SGRsCommit
)]
1749 HRESULT Commit
(void);
1751 [id(DISPID_SGRsCommitAndSave
)]
1752 HRESULT CommitAndSave
([out] BSTR *text
, [out, retval] VARIANT *stream
);
1757 uuid(b6d6f79f
-2158-4e50
-b5bc
-9a9ccd852a09
),
1759 pointer_default(unique)
1761 interface ISpeechRecoGrammar
: IDispatch
1763 [propget, id(DISPID_SRGId
)]
1764 HRESULT Id([out, retval] VARIANT *id);
1766 [propget, id(DISPID_SRGRecoContext
)]
1767 HRESULT RecoContext
([out, retval] ISpeechRecoContext
**context
);
1769 [propput, id(DISPID_SRGState
)]
1770 HRESULT State
([in] SpeechGrammarState state
);
1771 [propget, id(DISPID_SRGState
)]
1772 HRESULT State
([out, retval] SpeechGrammarState
*state
);
1774 [propget, id(DISPID_SRGRules
)]
1775 HRESULT Rules
([out, retval] ISpeechGrammarRules
**rules
);
1777 [id(DISPID_SRGReset
)]
1778 HRESULT Reset
([in, defaultvalue(0)] SpeechLanguageId language
);
1780 [id(DISPID_SRGCmdLoadFromFile
)]
1781 HRESULT CmdLoadFromFile
([in] const BSTR filename
, [in, defaultvalue(SLOStatic
)] SpeechLoadOption option
);
1783 [id(DISPID_SRGCmdLoadFromObject
)]
1784 HRESULT CmdLoadFromObject
([in]const BSTR classid
, [in] const BSTR grammarname
, [in, defaultvalue(SLOStatic
)] SpeechLoadOption option
);
1786 [id(DISPID_SRGCmdLoadFromResource
)]
1787 HRESULT CmdLoadFromResource
([in]long mod
, [in] VARIANT name
, [in] VARIANT yype
, [in] SpeechLanguageId language
,
1788 [in, defaultvalue(SLOStatic
)] SpeechLoadOption option
);
1790 [id(DISPID_SRGCmdLoadFromMemory
)]
1791 HRESULT CmdLoadFromMemory
([in] VARIANT data
, [in, defaultvalue(SLOStatic
)] SpeechLoadOption option
);
1793 [id(DISPID_SRGCmdLoadFromProprietaryGrammar
)]
1794 HRESULT CmdLoadFromProprietaryGrammar
([in] const BSTR guid
, [in] const BSTR string, [in] VARIANT data
,
1795 [in, defaultvalue(SLOStatic
)] SpeechLoadOption option
);
1797 [id(DISPID_SRGCmdSetRuleState
)]
1798 HRESULT CmdSetRuleState
([in] const BSTR name
, [in] SpeechRuleState state
);
1800 [id(DISPID_SRGCmdSetRuleIdState
)]
1801 HRESULT CmdSetRuleIdState
([in] long rule
, [in] SpeechRuleState State
);
1803 [id(DISPID_SRGDictationLoad
)]
1804 HRESULT DictationLoad
([in, defaultvalue("")] const BSTR topic
, [in, defaultvalue(SLOStatic
)] SpeechLoadOption option
);
1806 [id(DISPID_SRGDictationUnload
)]
1807 HRESULT DictationUnload
(void);
1809 [id(DISPID_SRGDictationSetState
)]
1810 HRESULT DictationSetState
([in] SpeechRuleState State
);
1812 [id(DISPID_SRGSetWordSequenceData
)]
1813 HRESULT SetWordSequenceData
([in] const BSTR text
, [in] long length
, [in] ISpeechTextSelectionInformation
*info
);
1815 [id(DISPID_SRGSetTextSelection
)]
1816 HRESULT SetTextSelection
([in] ISpeechTextSelectionInformation
*info
);
1818 [id(DISPID_SRGIsPronounceable
)]
1819 HRESULT IsPronounceable
([in] const BSTR word
, [out, retval] SpeechWordPronounceable
*pronounceable
);
1824 uuid(580aa49d
-7e1e
-4809
-b8e2
-57da806104b8
),
1826 pointer_default(unique)
1828 interface ISpeechRecoContext
: IDispatch
1830 [propget, id(DISPID_SRCRecognizer
)]
1831 HRESULT Recognizer
([out,retval] ISpeechRecognizer
**recognizer
);
1833 [propget, id(DISPID_SRCAudioInInterferenceStatus
)]
1834 HRESULT AudioInputInterferenceStatus
([out,retval] SpeechInterference
*interference
);
1836 [propget, id(DISPID_SRCRequestedUIType
)]
1837 HRESULT RequestedUIType
([out,retval] BSTR *type
);
1839 [propputref, id(DISPID_SRCVoice
)]
1840 HRESULT Voice
([in] ISpeechVoice
*voice
);
1841 [propget, id(DISPID_SRCVoice
)]
1842 HRESULT Voice
([out,retval] ISpeechVoice
**voice
);
1844 [propput, hidden, id(DISPID_SRAllowVoiceFormatMatchingOnNextSet
)]
1845 HRESULT AllowVoiceFormatMatchingOnNextSet
([in] VARIANT_BOOL allow
);
1846 [propget, hidden, id(DISPID_SRAllowVoiceFormatMatchingOnNextSet
)]
1847 HRESULT AllowVoiceFormatMatchingOnNextSet
([out,retval] VARIANT_BOOL *allow
);
1849 [propput, id(DISPID_SRCVoicePurgeEvent
)]
1850 HRESULT VoicePurgeEvent
([in] SpeechRecoEvents interest
);
1851 [propget, id(DISPID_SRCVoicePurgeEvent
)]
1852 HRESULT VoicePurgeEvent
([out,retval] SpeechRecoEvents
*interest
);
1854 [propput, id(DISPID_SRCEventInterests
)]
1855 HRESULT EventInterests
([in] SpeechRecoEvents interest
);
1856 [propget, id(DISPID_SRCEventInterests
)]
1857 HRESULT EventInterests
([out,retval] SpeechRecoEvents
*interest
);
1859 [propput, id(DISPID_SRCCmdMaxAlternates
)]
1860 HRESULT CmdMaxAlternates
([in] long alternates
);
1861 [propget, id(DISPID_SRCCmdMaxAlternates
)]
1862 HRESULT CmdMaxAlternates
([out,retval] long *alternates
);
1864 [propput, id(DISPID_SRCState
)]
1865 HRESULT State
([in] SpeechRecoContextState state
);
1866 [propget, id(DISPID_SRCState
)]
1867 HRESULT State
([out,retval] SpeechRecoContextState
*state
);
1869 [propput, id(DISPID_SRCRetainedAudio
)]
1870 HRESULT RetainedAudio
([in] SpeechRetainedAudioOptions option
);
1871 [propget, id(DISPID_SRCRetainedAudio
)]
1872 HRESULT RetainedAudio
([out,retval] SpeechRetainedAudioOptions
*option
);
1874 [propputref, id(DISPID_SRCRetainedAudioFormat
)]
1875 HRESULT RetainedAudioFormat
([in] ISpeechAudioFormat
*format
);
1876 [propget, id(DISPID_SRCRetainedAudioFormat
)]
1877 HRESULT RetainedAudioFormat
([out,retval] ISpeechAudioFormat
**format
);
1879 [id(DISPID_SRCPause
)]
1880 HRESULT Pause
(void);
1882 [id(DISPID_SRCResume
)]
1883 HRESULT Resume
(void);
1885 [id(DISPID_SRCCreateGrammar
)]
1886 HRESULT CreateGrammar
([in, defaultvalue(0)] VARIANT id, [out,retval] ISpeechRecoGrammar
**grammar
);
1888 [id(DISPID_SRCCreateResultFromMemory
)]
1889 HRESULT CreateResultFromMemory
([in] VARIANT *block
, [out,retval] ISpeechRecoResult
**result
);
1891 [id(DISPID_SRCBookmark
)]
1892 HRESULT Bookmark
([in] SpeechBookmarkOptions options
, [in] VARIANT pos
, [in] VARIANT bookmark
);
1894 [id(DISPID_SRCSetAdaptationData
)]
1895 HRESULT SetAdaptationData
([in] BSTR adaptation
);
1898 typedef [hidden] enum DISPID_SpeechRecognizer
1900 DISPID_SRRecognizer
= 1,
1901 DISPID_SRAllowAudioInputFormatChangesOnNextSet
,
1902 DISPID_SRAudioInput
,
1903 DISPID_SRAudioInputStream
,
1908 DISPID_SREmulateRecognition
,
1909 DISPID_SRCreateRecoContext
,
1911 DISPID_SRSetPropertyNumber
,
1912 DISPID_SRGetPropertyNumber
,
1913 DISPID_SRSetPropertyString
,
1914 DISPID_SRGetPropertyString
,
1915 DISPID_SRIsUISupported
,
1917 DISPID_SRGetRecognizers
,
1918 DISPID_SVGetAudioInputs
,
1919 DISPID_SVGetProfiles
1920 } DISPID_SpeechRecognizer
;
1924 uuid(2d5f1c0c
-bd75
-4b08
-9478-3b11fea2586c
),
1926 pointer_default(unique)
1928 interface ISpeechRecognizer
: IDispatch
1930 [propputref, id(DISPID_SRRecognizer
)]
1931 HRESULT Recognizer
([in]ISpeechObjectToken
*recognizer
);
1932 [propget, id(DISPID_SRRecognizer
)]
1933 HRESULT Recognizer
([out,retval]ISpeechObjectToken
**recognizer
);
1935 [propput, hidden, id(DISPID_SRAllowAudioInputFormatChangesOnNextSet
)]
1936 HRESULT AllowAudioInputFormatChangesOnNextSet
([in] VARIANT_BOOL allow
);
1937 [propget, hidden, id(DISPID_SRAllowAudioInputFormatChangesOnNextSet
)]
1938 HRESULT AllowAudioInputFormatChangesOnNextSet
([out,retval] VARIANT_BOOL *allow
);
1940 [propputref, id(DISPID_SRAudioInput
)]
1941 HRESULT AudioInput
([in,defaultvalue(0)] ISpeechObjectToken
*input
);
1942 [propget, id(DISPID_SRAudioInput
)]
1943 HRESULT AudioInput
([out,retval] ISpeechObjectToken
**input
);
1945 [propputref, id(DISPID_SRAudioInputStream
)]
1946 HRESULT AudioInputStream
([in,defaultvalue(0)] ISpeechBaseStream
*input
);
1947 [propget, id(DISPID_SRAudioInputStream
)]
1948 HRESULT AudioInputStream
([out,retval] ISpeechBaseStream
**input
);
1950 [propget, id(DISPID_SRIsShared
)]
1951 HRESULT IsShared
([out,retval] VARIANT_BOOL *shared
);
1953 [propput, id(DISPID_SRState
)]
1954 HRESULT State
([in] SpeechRecognizerState state
);
1955 [propget, id(DISPID_SRState
)]
1956 HRESULT State
([out,retval] SpeechRecognizerState
*state
);
1958 [propget, id(DISPID_SRStatus
)]
1959 HRESULT Status
([out,retval] ISpeechRecognizerStatus
**satus
);
1961 [propputref, id(DISPID_SRProfile
)]
1962 HRESULT Profile
([in,defaultvalue(0)] ISpeechObjectToken
*profile
);
1963 [propget, id(DISPID_SRProfile
)]
1964 HRESULT Profile
([out,retval] ISpeechObjectToken
**profile
);
1966 [id(DISPID_SREmulateRecognition
)]
1967 HRESULT EmulateRecognition
([in] VARIANT elements
, [in, defaultvalue(NULL
)] VARIANT *attributes
,
1968 [in, defaultvalue(0)] long id);
1970 [id(DISPID_SRCreateRecoContext
)]
1971 HRESULT CreateRecoContext
([out,retval] ISpeechRecoContext
**ncontext
);
1973 [id(DISPID_SRGetFormat
)]
1974 HRESULT GetFormat
([in] SpeechFormatType speechtype
, [out,retval] ISpeechAudioFormat
**audioformat
);
1976 [hidden, id(DISPID_SRSetPropertyNumber
)]
1977 HRESULT SetPropertyNumber
([in] const BSTR name
, [in] long value
, [out,retval] VARIANT_BOOL *supported
);
1979 [hidden, id(DISPID_SRGetPropertyNumber
)]
1980 HRESULT GetPropertyNumber
([in] const BSTR name
, [in,out] long *value
, [out,retval] VARIANT_BOOL *supported
);
1982 [hidden, id(DISPID_SRSetPropertyString
)]
1983 HRESULT SetPropertyString
([in] const BSTR name
, [in] const BSTR value
, [out,retval] VARIANT_BOOL *supported
);
1985 [hidden, id(DISPID_SRGetPropertyString
)]
1986 HRESULT GetPropertyString
([in] const BSTR name
, [in,out] BSTR *value
, [out,retval] VARIANT_BOOL *supported
);
1988 [id(DISPID_SRIsUISupported
)]
1989 HRESULT IsUISupported
([in] const BSTR type
, [in, defaultvalue(NULL
)] const VARIANT *data
,
1990 [out,retval] VARIANT_BOOL *supported
);
1992 [id(DISPID_SRDisplayUI
)]
1993 HRESULT DisplayUI
( [in] long hWnd
, [in] BSTR title
, [in] const BSTR type
, [in, defaultvalue(NULL
)] const VARIANT *data
);
1995 [id(DISPID_SRGetRecognizers
)]
1996 HRESULT GetRecognizers
([in, defaultvalue("")] BSTR required
, [in, defaultvalue("")] BSTR optional,
1997 [out,retval] ISpeechObjectTokens
**tokens
);
1999 [id(DISPID_SVGetAudioInputs
)]
2000 HRESULT GetAudioInputs
([in, defaultvalue("")] BSTR required
, [in, defaultvalue("")] BSTR optional,
2001 [out,retval] ISpeechObjectTokens
**tokens
);
2003 [id(DISPID_SVGetProfiles
)]
2004 HRESULT GetProfiles
([in, defaultvalue("")] BSTR required
, [in, defaultvalue("")] BSTR optional,
2005 [out,retval] ISpeechObjectTokens
**tokens
);