source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/sapi54.idl@ 1181

Last change on this file since 1181 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 138.8 KB
RevLine 
[1166]1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5
6#ifndef _SAPI_BLD_
7#define _SAPI_BLD_ 0x54
8#endif
9
10import "oaidl.idl";
11import "ocidl.idl";
12
13cpp_quote("#ifndef _SAPI_VER")
14cpp_quote("#error \"you have to include <sapi.h> header before this.\"")
15cpp_quote("#endif")
16
17#ifndef LANGID
18#define LANGID WORD
19#endif
20
21cpp_quote("#if 0")
22typedef [restricted, hidden] struct WAVEFORMATEX {
23 WORD wFormatTag;
24 WORD nChannels;
25 DWORD nSamplesPerSec;
26 DWORD nAvgBytesPerSec;
27 WORD nBlockAlign;
28 WORD wBitsPerSample;
29 WORD cbSize;
30} WAVEFORMATEX;
31cpp_quote("#endif")
32
33interface ISpNotifySource;
34interface ISpNotifySink;
35interface ISpNotifyTranslator;
36interface ISpDataKey;
37interface ISpObjectTokenCategory;
38interface ISpObjectToken;
39interface IEnumSpObjectTokens;
40interface ISpObjectWithToken;
41interface ISpResourceManager;
42interface ISpEventSource;
43interface ISpEventSink;
44interface ISpStreamFormat;
45interface ISpStream;
46interface ISpStreamFormatConverter;
47interface ISpAudio;
48interface ISpMMSysAudio;
49interface ISpTranscript;
50interface ISpVoice;
51interface ISpRecoResult;
52interface ISpRecoContext;
53interface ISpRecognizer;
54interface ISpProperties;
55interface ISpLexicon;
56interface ISpPhoneConverter;
57interface ISpPhrase;
58#if _SAPI_BLD_ >= 0x53
59interface ISpRecoContext2;
60interface ISpRecognizer2;
61interface ISpShortcut;
62interface ISpPhoneticAlphabetConverter;
63interface ISpPhoneticAlphabetSelection;
64interface ISpRecoGrammar2;
65interface ISpeechResourceLoader;
66#endif
67#if _SAPI_BLD_ >= 0x54
68interface ISpRecognizer3;
69#endif
70
71typedef [hidden] enum SPDATAKEYLOCATION {
72 SPDKL_DefaultLocation = 0,
73 SPDKL_CurrentUser = 1,
74 SPDKL_LocalMachine = 2,
75 SPDKL_CurrentConfig = 5
76} SPDATAKEYLOCATION;
77
78typedef [hidden] enum SPSTREAMFORMAT {
79 SPSF_Default = -1,
80 SPSF_NoAssignedFormat = 0,
81 SPSF_Text,
82 SPSF_NonStandardFormat,
83 SPSF_ExtendedAudioFormat,
84 SPSF_8kHz8BitMono,
85 SPSF_8kHz8BitStereo,
86 SPSF_8kHz16BitMono,
87 SPSF_8kHz16BitStereo,
88 SPSF_11kHz8BitMono,
89 SPSF_11kHz8BitStereo,
90 SPSF_11kHz16BitMono,
91 SPSF_11kHz16BitStereo,
92 SPSF_12kHz8BitMono,
93 SPSF_12kHz8BitStereo,
94 SPSF_12kHz16BitMono,
95 SPSF_12kHz16BitStereo,
96 SPSF_16kHz8BitMono,
97 SPSF_16kHz8BitStereo,
98 SPSF_16kHz16BitMono,
99 SPSF_16kHz16BitStereo,
100 SPSF_22kHz8BitMono,
101 SPSF_22kHz8BitStereo,
102 SPSF_22kHz16BitMono,
103 SPSF_22kHz16BitStereo,
104 SPSF_24kHz8BitMono,
105 SPSF_24kHz8BitStereo,
106 SPSF_24kHz16BitMono,
107 SPSF_24kHz16BitStereo,
108 SPSF_32kHz8BitMono,
109 SPSF_32kHz8BitStereo,
110 SPSF_32kHz16BitMono,
111 SPSF_32kHz16BitStereo,
112 SPSF_44kHz8BitMono,
113 SPSF_44kHz8BitStereo,
114 SPSF_44kHz16BitMono,
115 SPSF_44kHz16BitStereo,
116 SPSF_48kHz8BitMono,
117 SPSF_48kHz8BitStereo,
118 SPSF_48kHz16BitMono,
119 SPSF_48kHz16BitStereo,
120 SPSF_TrueSpeech_8kHz1BitMono,
121 SPSF_CCITT_ALaw_8kHzMono,
122 SPSF_CCITT_ALaw_8kHzStereo,
123 SPSF_CCITT_ALaw_11kHzMono,
124 SPSF_CCITT_ALaw_11kHzStereo,
125 SPSF_CCITT_ALaw_22kHzMono,
126 SPSF_CCITT_ALaw_22kHzStereo,
127 SPSF_CCITT_ALaw_44kHzMono,
128 SPSF_CCITT_ALaw_44kHzStereo,
129 SPSF_CCITT_uLaw_8kHzMono,
130 SPSF_CCITT_uLaw_8kHzStereo,
131 SPSF_CCITT_uLaw_11kHzMono,
132 SPSF_CCITT_uLaw_11kHzStereo,
133 SPSF_CCITT_uLaw_22kHzMono,
134 SPSF_CCITT_uLaw_22kHzStereo,
135 SPSF_CCITT_uLaw_44kHzMono,
136 SPSF_CCITT_uLaw_44kHzStereo,
137 SPSF_ADPCM_8kHzMono,
138 SPSF_ADPCM_8kHzStereo,
139 SPSF_ADPCM_11kHzMono,
140 SPSF_ADPCM_11kHzStereo,
141 SPSF_ADPCM_22kHzMono,
142 SPSF_ADPCM_22kHzStereo,
143 SPSF_ADPCM_44kHzMono,
144 SPSF_ADPCM_44kHzStereo,
145 SPSF_GSM610_8kHzMono,
146 SPSF_GSM610_11kHzMono,
147 SPSF_GSM610_22kHzMono,
148 SPSF_GSM610_44kHzMono,
149 SPSF_NUM_FORMATS
150} SPSTREAMFORMAT;
151
152typedef [hidden] enum SPEVENTLPARAMTYPE {
153 SPET_LPARAM_IS_UNDEFINED = 0,
154 SPET_LPARAM_IS_TOKEN,
155 SPET_LPARAM_IS_OBJECT,
156 SPET_LPARAM_IS_POINTER,
157 SPET_LPARAM_IS_STRING
158} SPEVENTLPARAMTYPE;
159
160typedef [hidden] enum SPEVENTENUM {
161 SPEI_UNDEFINED = 0,
162 SPEI_START_INPUT_STREAM = 1,
163 SPEI_END_INPUT_STREAM = 2,
164 SPEI_VOICE_CHANGE = 3,
165 SPEI_TTS_BOOKMARK = 4,
166 SPEI_WORD_BOUNDARY = 5,
167 SPEI_PHONEME = 6,
168 SPEI_SENTENCE_BOUNDARY = 7,
169 SPEI_VISEME = 8,
170 SPEI_TTS_AUDIO_LEVEL = 9,
171 SPEI_TTS_PRIVATE = 15,
172 SPEI_MIN_TTS = 1,
173 SPEI_MAX_TTS = 15,
174 SPEI_END_SR_STREAM = 34,
175 SPEI_SOUND_START = 35,
176 SPEI_SOUND_END = 36,
177 SPEI_PHRASE_START = 37,
178 SPEI_RECOGNITION = 38,
179 SPEI_HYPOTHESIS = 39,
180 SPEI_SR_BOOKMARK = 40,
181 SPEI_PROPERTY_NUM_CHANGE = 41,
182 SPEI_PROPERTY_STRING_CHANGE= 42,
183 SPEI_FALSE_RECOGNITION = 43,
184 SPEI_INTERFERENCE = 44,
185 SPEI_REQUEST_UI = 45,
186 SPEI_RECO_STATE_CHANGE = 46,
187 SPEI_ADAPTATION = 47,
188 SPEI_START_SR_STREAM = 48,
189 SPEI_RECO_OTHER_CONTEXT = 49,
190 SPEI_SR_AUDIO_LEVEL = 50,
191#if _SAPI_BLD_ >= 0x53
192 SPEI_SR_RETAINEDAUDIO = 51,
193#endif
194 SPEI_SR_PRIVATE = 52,
195#if _SAPI_BLD_ >= 0x53
196#if _SAPI_BLD_ >= 0x54
197 SPEI_ACTIVE_CATEGORY_CHANGED = 53,
198#else
199 SPEI_RESERVED4 = 53,
200#endif
201 SPEI_RESERVED5 = 54,
202 SPEI_RESERVED6 = 55,
203#endif
204 SPEI_MIN_SR = 34,
205#if _SAPI_BLD_ >= 0x53
206 SPEI_MAX_SR = 55,
207#else
208 SPEI_MAX_SR = 52,
209#endif
210 SPEI_RESERVED1 = 30,
211 SPEI_RESERVED2 = 33,
212 SPEI_RESERVED3 = 63
213} SPEVENTENUM;
214
215typedef [hidden] enum SPINTERFERENCE {
216 SPINTERFERENCE_NONE = 0,
217 SPINTERFERENCE_NOISE,
218 SPINTERFERENCE_NOSIGNAL,
219 SPINTERFERENCE_TOOLOUD,
220 SPINTERFERENCE_TOOQUIET,
221 SPINTERFERENCE_TOOFAST,
222 SPINTERFERENCE_TOOSLOW,
223 SPINTERFERENCE_LATENCY_WARNING,
224 SPINTERFERENCE_LATENCY_TRUNCATE_BEGIN,
225 SPINTERFERENCE_LATENCY_TRUNCATE_END
226} SPINTERFERENCE;
227
228typedef [hidden] enum SPENDSRSTREAMFLAGS {
229 SPESF_NONE = 0,
230 SPESF_STREAM_RELEASED = 1
231#if _SAPI_BLD_ >= 0x53
232 , SPESF_EMULATED = 2
233#endif
234} SPENDSRSTREAMFLAGS;
235
236typedef [hidden] enum SPVFEATURE {
237 SPVFEATURE_STRESSED = 1,
238 SPVFEATURE_EMPHASIS = 2
239} SPVFEATURE;
240
241typedef [hidden] enum SPVISEMES {
242 SP_VISEME_0 = 0,
243 SP_VISEME_1,
244 SP_VISEME_2,
245 SP_VISEME_3,
246 SP_VISEME_4,
247 SP_VISEME_5,
248 SP_VISEME_6,
249 SP_VISEME_7,
250 SP_VISEME_8,
251 SP_VISEME_9,
252 SP_VISEME_10,
253 SP_VISEME_11,
254 SP_VISEME_12,
255 SP_VISEME_13,
256 SP_VISEME_14,
257 SP_VISEME_15,
258 SP_VISEME_16,
259 SP_VISEME_17,
260 SP_VISEME_18,
261 SP_VISEME_19,
262 SP_VISEME_20,
263 SP_VISEME_21,
264} SPVISEMES;
265
266typedef [hidden] enum SPFILEMODE {
267 SPFM_OPEN_READONLY,
268 SPFM_OPEN_READWRITE,
269 SPFM_CREATE,
270 SPFM_CREATE_ALWAYS,
271 SPFM_NUM_MODES
272} SPFILEMODE;
273
274typedef [hidden] enum _SPAUDIOSTATE {
275 SPAS_CLOSED,
276 SPAS_STOP,
277 SPAS_PAUSE,
278 SPAS_RUN
279} SPAUDIOSTATE;
280
281typedef [hidden] enum SPDISPLYATTRIBUTES {
282 SPAF_ONE_TRAILING_SPACE = 0x2,
283 SPAF_TWO_TRAILING_SPACES = 0x4,
284 SPAF_CONSUME_LEADING_SPACES = 0x8,
285#if _SAPI_BLD_ >= 0x53
286 SPAF_BUFFER_POSITION = 0x10,
287 SPAF_ALL = 0x1f,
288 SPAF_USER_SPECIFIED = 0x80
289#else
290 SPAF_ALL = 0x0f
291#endif
292} SPDISPLAYATTRIBUTES;
293
294typedef [hidden] enum SPPHRASEPROPERTYUNIONTYPE {
295 SPPPUT_UNUSED = 0,
296 SPPPUT_ARRAY_INDEX
297} SPPHRASEPROPERTYUNIONTYPE;
298
299#if _SAPI_BLD_ >= 0x53
300typedef enum SPSEMANTICFORMAT {
301 SPSMF_SAPI_PROPERTIES = 0,
302 SPSMF_SRGS_SEMANTICINTERPRETATION_MS = 1,
303 SPSMF_SRGS_SAPIPROPERTIES = 2,
304 SPSMF_UPS = 4,
305 SPSMF_SRGS_SEMANTICINTERPRETATION_W3C = 8
306} SPSEMANTICFORMAT;
307#endif
308
309typedef [hidden] enum SPRECOEVENTFLAGS {
310 SPREF_AutoPause = 0x1,
311 SPREF_Emulated = 0x2
312#if _SAPI_BLD_ >= 0x53
313 , SPREF_SMLTimeout = 0x4,
314 SPREF_ExtendableParse = 0x8,
315 SPREF_ReSent = 0x10,
316 SPREF_Hypothesis = 0x20,
317 SPREF_FalseRecognition = 0x40
318#endif
319} SPRECOEVENTFLAGS;
320
321typedef [hidden] enum SPPARTOFSPEECH {
322 SPPS_NotOverriden = -1,
323 SPPS_Unknown = 0,
324 SPPS_Noun = 0x1000,
325 SPPS_Verb = 0x2000,
326 SPPS_Modifier = 0x3000,
327 SPPS_Function = 0x4000,
328 SPPS_Interjection = 0x5000
329#if _SAPI_BLD_ >= 0x53
330 , SPPS_Noncontent = 0x6000,
331 SPPS_LMA = 0x7000,
332 SPPS_SuppressWord = 0xf000
333#endif
334} SPPARTOFSPEECH;
335
336typedef [hidden] enum SPLEXICONTYPE {
337 eLEXTYPE_USER = 0x1,
338 eLEXTYPE_APP = 0x2,
339 eLEXTYPE_VENDORLEXICON = 0x4,
340 eLEXTYPE_LETTERTOSOUND = 0x8,
341 eLEXTYPE_MORPHOLOGY = 0x10,
342 eLEXTYPE_RESERVED4 = 0x20,
343 eLEXTYPE_USER_SHORTCUT = 0x40,
344 eLEXTYPE_RESERVED6 = 0x80,
345 eLEXTYPE_RESERVED7 = 0x100,
346 eLEXTYPE_RESERVED8 = 0x200,
347 eLEXTYPE_RESERVED9 = 0x400,
348 eLEXTYPE_RESERVED10 = 0x800,
349 eLEXTYPE_PRIVATE1 = 0x1000,
350 eLEXTYPE_PRIVATE2 = 0x2000,
351 eLEXTYPE_PRIVATE3 = 0x4000,
352 eLEXTYPE_PRIVATE4 = 0x8000,
353 eLEXTYPE_PRIVATE5 = 0x10000,
354 eLEXTYPE_PRIVATE6 = 0x20000,
355 eLEXTYPE_PRIVATE7 = 0x40000,
356 eLEXTYPE_PRIVATE8 = 0x80000,
357 eLEXTYPE_PRIVATE9 = 0x100000,
358 eLEXTYPE_PRIVATE10 = 0x200000,
359 eLEXTYPE_PRIVATE11 = 0x400000,
360 eLEXTYPE_PRIVATE12 = 0x800000,
361 eLEXTYPE_PRIVATE13 = 0x1000000,
362 eLEXTYPE_PRIVATE14 = 0x2000000,
363 eLEXTYPE_PRIVATE15 = 0x4000000,
364 eLEXTYPE_PRIVATE16 = 0x8000000,
365 eLEXTYPE_PRIVATE17 = 0x10000000,
366 eLEXTYPE_PRIVATE18 = 0x20000000,
367 eLEXTYPE_PRIVATE19 = 0x40000000,
368 eLEXTYPE_PRIVATE20 = 0x80000000u
369} SPLEXICONTYPE;
370
371typedef [hidden] enum SPWORDTYPE {
372 eWORDTYPE_ADDED = 1,
373 eWORDTYPE_DELETED = 2
374} SPWORDTYPE;
375
376#if _SAPI_BLD_ >= 0x53
377typedef [hidden] enum SPPRONUNCIATIONFLAGS {
378 ePRONFLAG_USED = 1
379} SPPRONUNCIATIONFLAGS;
380
381typedef [hidden] enum SPSHORTCUTTYPE {
382 SPSHT_NotOverriden = -1,
383 SPSHT_Unknown = 0,
384 SPSHT_EMAIL = 0x1000,
385 SPSHT_OTHER = 0x2000,
386 SPPS_RESERVED1 = 0x3000,
387 SPPS_RESERVED2 = 0x4000,
388 SPPS_RESERVED3 = 0x5000,
389 SPPS_RESERVED4 = 0xf000
390} SPSHORTCUTTYPE;
391#endif
392
393typedef [hidden] enum SPVALUETYPE {
394 SPDF_PROPERTY = 0x1,
395 SPDF_REPLACEMENT = 0x2,
396 SPDF_RULE = 0x4,
397 SPDF_DISPLAYTEXT = 0x8,
398 SPDF_LEXICALFORM = 0x10,
399 SPDF_PRONUNCIATION = 0x20,
400 SPDF_AUDIO = 0x40,
401 SPDF_ALTERNATES = 0x80,
402 SPDF_ALL = 0xff
403} SPVALUETYPE;
404
405typedef [hidden] enum SPPHRASERNG {
406 SPPR_ALL_ELEMENTS = -1
407} SPPHRASERNG;
408
409typedef [hidden] enum SPVACTIONS {
410 SPVA_Speak = 0,
411 SPVA_Silence,
412 SPVA_Pronounce,
413 SPVA_Bookmark,
414 SPVA_SpellOut,
415 SPVA_Section,
416 SPVA_ParseUnknownTag
417} SPVACTIONS;
418
419typedef [hidden] enum SPRUNSTATE {
420 SPRS_DONE = 1,
421 SPRS_IS_SPEAKING = 2
422} SPRUNSTATE;
423
424typedef [hidden] enum SPVLIMITS {
425 SPMIN_VOLUME = 0,
426 SPMAX_VOLUME = 100,
427 SPMIN_RATE = -10,
428 SPMAX_RATE = 10
429} SPVLIMITS;
430
431typedef [hidden] enum SPVPRIORITY {
432 SPVPRI_NORMAL = 0,
433 SPVPRI_ALERT = 1,
434 SPVPRI_OVER = 2
435} SPVPRIORITY;
436
437cpp_quote("EXTERN_C const GUID SPDFID_Text;")
438cpp_quote("EXTERN_C const GUID SPDFID_WaveFormatEx;")
439
440cpp_quote("")
441const signed char SP_LOW_CONFIDENCE = -1;
442const signed char SP_NORMAL_CONFIDENCE = 0;
443const signed char SP_HIGH_CONFIDENCE = +1;
444const float DEFAULT_WEIGHT = 1;
445const ULONG SP_MAX_WORD_LENGTH = 128;
446const ULONG SP_MAX_PRON_LENGTH = 384;
447#if _SAPI_BLD_ >= 0x53
448const ULONG SP_EMULATE_RESULT = 0x40000000;
449#endif
450
451cpp_quote("")
452cpp_quote("#ifdef __cplusplus")
453cpp_quote("interface ISpNotifyCallback {")
454cpp_quote(" virtual HRESULT STDMETHODCALLTYPE NotifyCallback(WPARAM wParam, LPARAM lParam) = 0;")
455cpp_quote("};")
456cpp_quote("#else")
457typedef void *ISpNotifyCallback;
458cpp_quote("#endif")
459
460cpp_quote("#if 0")
461typedef void *SPNOTIFYCALLBACK;
462cpp_quote("#else")
463cpp_quote("typedef void __stdcall SPNOTIFYCALLBACK(WPARAM wParam, LPARAM lParam);")
464cpp_quote("#endif")
465
466[object, uuid (5eff4aef-8487-11d2-961c-00c04f8ee628), pointer_default (unique), restricted]
467interface ISpNotifySource : IUnknown {
468 HRESULT SetNotifySink ([in] ISpNotifySink *pNotifySink);
469 [local] HRESULT SetNotifyWindowMessage ([in] HWND hWnd,[in] UINT Msg,[in] WPARAM wParam,[in] LPARAM lParam);
470 [local] HRESULT SetNotifyCallbackFunction ([in] SPNOTIFYCALLBACK *pfnCallback,[in] WPARAM wParam,[in] LPARAM lParam);
471 [local] HRESULT SetNotifyCallbackInterface ([in] ISpNotifyCallback *pSpCallback,[in] WPARAM wParam,[in] LPARAM lParam);
472 [local] HRESULT SetNotifyWin32Event (void);
473 [local] HRESULT WaitForNotifyEvent ([in] DWORD dwMilliseconds);
474 [local] HANDLE GetNotifyEventHandle ();
475}
476
477[object, uuid (259684dc-37c3-11d2-9603-00c04f8ee628), pointer_default (unique), restricted]
478interface ISpNotifySink : IUnknown {
479 HRESULT Notify (void);
480}
481
482[object, local, uuid (ACA16614-5d3d-11d2-960e-00c04f8ee628), pointer_default (unique), restricted]
483interface ISpNotifyTranslator : ISpNotifySink {
484 HRESULT InitWindowMessage ([in] HWND hWnd,[in] UINT Msg,[in] WPARAM wParam,[in] LPARAM lParam);
485 HRESULT InitCallback ([in] SPNOTIFYCALLBACK *pfnCallback,[in] WPARAM wParam,[in] LPARAM lParam);
486 HRESULT InitSpNotifyCallback ([in] ISpNotifyCallback *pSpCallback,[in] WPARAM wParam,[in] LPARAM lParam);
487 HRESULT InitWin32Event ([in] HANDLE hEvent,[in] WINBOOL fCloseHandleOnRelease);
488 HRESULT Wait ([in] DWORD dwMilliseconds);
489 HANDLE GetEventHandle ();
490}
491
492[object, local, uuid (14056581-E16C-11d2-BB90-00c04f8ee6c0), pointer_default (unique), restricted]
493interface ISpDataKey : IUnknown {
494 HRESULT SetData ([in] LPCWSTR pszValueName,[in] ULONG cbData,[in] const BYTE *pData);
495 HRESULT GetData ([in] LPCWSTR pszValueName,[in] ULONG *pcbData,[out] BYTE *pData);
496 HRESULT SetStringValue ([in] LPCWSTR pszValueName,[in] LPCWSTR pszValue);
497 HRESULT GetStringValue ([in] LPCWSTR pszValueName,[out] LPWSTR *ppszValue);
498 HRESULT SetDWORD ([in] LPCWSTR pszValueName,[in] DWORD dwValue);
499 HRESULT GetDWORD ([in] LPCWSTR pszValueName,[out] DWORD *pdwValue);
500 HRESULT OpenKey ([in] LPCWSTR pszSubKeyName,[out] ISpDataKey **ppSubKey);
501 HRESULT CreateKey ([in] LPCWSTR pszSubKey,[out] ISpDataKey **ppSubKey);
502 HRESULT DeleteKey ([in] LPCWSTR pszSubKey);
503 HRESULT DeleteValue ([in] LPCWSTR pszValueName);
504 HRESULT EnumKeys ([in] ULONG Index,[out] LPWSTR *ppszSubKeyName);
505 HRESULT EnumValues ([in] ULONG Index,[out] LPWSTR *ppszValueName);
506};
507
508[object, uuid (5b559f40-E952-11d2-BB91-00c04f8ee6c0), pointer_default (unique), restricted]
509interface ISpObjectWithToken : IUnknown {
510 HRESULT SetObjectToken ([in] ISpObjectToken *pToken);
511 HRESULT GetObjectToken ([out] ISpObjectToken **ppToken);
512};
513
514[object, local, uuid (06b64f9e-7fda-11d2-B4F2-00c04f797396), pointer_default (unique), restricted]
515interface IEnumSpObjectTokens : IUnknown {
516 HRESULT Next ([in] ULONG celt,[out, size_is (celt), length_is (*pceltFetched)] ISpObjectToken **pelt,[out] ULONG *pceltFetched);
517 HRESULT Skip ([in] ULONG celt);
518 HRESULT Reset (void);
519 HRESULT Clone ([out] IEnumSpObjectTokens **ppEnum);
520 HRESULT Item ([in] ULONG Index,[out] ISpObjectToken **ppToken);
521 HRESULT GetCount ([out] ULONG *pCount);
522};
523
524[object, uuid (92a66e2b-C830-4149-83df-6fc2ba1e7a5b), pointer_default (unique), restricted]
525interface ISpRegDataKey : ISpDataKey {
526 [local] HRESULT SetKey ([in] HKEY hkey,[in] WINBOOL fReadOnly);
527}
528
529[object, local, uuid (2d3d3845-39af-4850-BBF9-40b49780011d), pointer_default (unique), restricted]
530interface ISpObjectTokenCategory : ISpDataKey {
531 HRESULT SetId ([in] LPCWSTR pszCategoryId,[in] WINBOOL fCreateIfNotExist);
532 HRESULT GetId ([out] LPWSTR *ppszCoMemCategoryId);
533 HRESULT GetDataKey ([in] SPDATAKEYLOCATION spdkl,[out] ISpDataKey **ppDataKey);
534 HRESULT EnumTokens ([in, string] LPCWSTR pzsReqAttribs,[in, string] LPCWSTR pszOptAttribs,[out] IEnumSpObjectTokens **ppEnum);
535 HRESULT SetDefaultTokenId ([in] LPCWSTR pszTokenId);
536 HRESULT GetDefaultTokenId ([out] LPWSTR *ppszCoMemTokenId);
537};
538
539[object, local, uuid (14056589-E16C-11d2-BB90-00c04f8ee6c0), pointer_default (unique), restricted]
540interface ISpObjectToken : ISpDataKey {
541 HRESULT SetId (LPCWSTR pszCategoryId,[in] LPCWSTR pszTokenId,[in] WINBOOL fCreateIfNotExist);
542 HRESULT GetId ([out] LPWSTR *ppszCoMemTokenId);
543 HRESULT GetCategory ([out] ISpObjectTokenCategory **ppTokenCategory);
544 HRESULT CreateInstance ([in] IUnknown *pUnkOuter,[in] DWORD dwClsContext,[in] REFIID riid,[out, iid_is (riid)] void **ppvObject);
545 HRESULT GetStorageFileName ([in] REFCLSID clsidCaller,[in] LPCWSTR pszValueName,[in, string] LPCWSTR pszFileNameSpecifier,[in] ULONG nFolder,[out] LPWSTR *ppszFilePath);
546 HRESULT RemoveStorageFileName ([in] REFCLSID clsidCaller,[in] LPCWSTR pszKeyName,[in] WINBOOL fDeleteFile);
547 HRESULT Remove (const CLSID *pclsidCaller);
548 [local] HRESULT IsUISupported ([in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData,[in] IUnknown *punkObject,[out] WINBOOL *pfSupported);
549 [local] HRESULT DisplayUI ([in] HWND hwndParent,[in] LPCWSTR pszTitle,[in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData,[in] IUnknown *punkObject);
550 HRESULT MatchesAttributes ([in] LPCWSTR pszAttributes,[out] WINBOOL *pfMatches);
551};
552
553[object, uuid (B8AAB0CF-346f-49d8-9499-C8B03F161D51), pointer_default (unique), restricted]
554interface ISpObjectTokenInit : ISpObjectToken {
555 HRESULT InitFromDataKey ([in] LPCWSTR pszCategoryId,[in] LPCWSTR pszTokenId,[in] ISpDataKey *pDataKey);
556};
557
558[object, uuid (93384e18-5014-43d5-ADBB-A78E055926BD), pointer_default (unique), restricted]
559interface ISpResourceManager : IServiceProvider
560{
561 HRESULT SetObject ([in] REFGUID guidServiceId,[in] IUnknown *pUnkObject);
562 HRESULT GetObject ([in] REFGUID guidServiceId,[in] REFCLSID ObjectCLSID,[in] REFIID ObjectIID,[in] WINBOOL fReleaseWhenLastExternalRefReleased,[out, iid_is (ObjectIID)] void **ppObject);
563};
564
565cpp_quote("#if 0")
566typedef [restricted, hidden] struct SPEVENT {
567 WORD eEventId;
568 WORD elParamType;
569 ULONG ulStreamNum;
570 ULONGLONG ullAudioStreamOffset;
571 WPARAM wParam;
572 LPARAM lParam;
573} SPEVENT;
574
575typedef [restricted, hidden] struct SPSERIALIZEDEVENT {
576 WORD eEventId;
577 WORD elParamType;
578 ULONG ulStreamNum;
579 ULONGLONG ullAudioStreamOffset;
580 ULONG SerializedwParam;
581 LONG SerializedlParam;
582} SPSERIALIZEDEVENT;
583
584typedef [restricted, hidden] struct SPSERIALIZEDEVENT64 {
585 WORD eEventId;
586 WORD elParamType;
587 ULONG ulStreamNum;
588 ULONGLONG ullAudioStreamOffset;
589 ULONGLONG SerializedwParam;
590 LONGLONG SerializedlParam;
591} SPSERIALIZEDEVENT64;
592cpp_quote("#else")
593cpp_quote("typedef struct SPEVENT {")
594cpp_quote(" SPEVENTENUM eEventId : 16;")
595cpp_quote(" SPEVENTLPARAMTYPE elParamType : 16;")
596cpp_quote(" ULONG ulStreamNum;")
597cpp_quote(" ULONGLONG ullAudioStreamOffset;")
598cpp_quote(" WPARAM wParam;")
599cpp_quote(" LPARAM lParam;")
600cpp_quote("} SPEVENT;")
601cpp_quote("")
602cpp_quote("typedef struct SPSERIALIZEDEVENT {")
603cpp_quote(" SPEVENTENUM eEventId : 16;")
604cpp_quote(" SPEVENTLPARAMTYPE elParamType : 16;")
605cpp_quote(" ULONG ulStreamNum;")
606cpp_quote(" ULONGLONG ullAudioStreamOffset;")
607cpp_quote(" ULONG SerializedwParam;")
608cpp_quote(" LONG SerializedlParam;")
609cpp_quote("} SPSERIALIZEDEVENT;")
610cpp_quote("")
611cpp_quote("typedef struct SPSERIALIZEDEVENT64 {")
612cpp_quote(" SPEVENTENUM eEventId : 16;")
613cpp_quote(" SPEVENTLPARAMTYPE elParamType : 16;")
614cpp_quote(" ULONG ulStreamNum;")
615cpp_quote(" ULONGLONG ullAudioStreamOffset;")
616cpp_quote(" ULONGLONG SerializedwParam;")
617cpp_quote(" LONGLONG SerializedlParam;")
618cpp_quote("} SPSERIALIZEDEVENT64;")
619cpp_quote("#endif")
620
621#if _SAPI_BLD_ >= 0x53
622cpp_quote("#if 0")
623typedef [restricted, hidden] struct SPEVENTEX {
624 WORD eEventId;
625 WORD elParamType;
626 ULONG ulStreamNum;
627 ULONGLONG ullAudioStreamOffset;
628 WPARAM wParam;
629 LPARAM lParam;
630 ULONGLONG ullAudioTimeOffset;
631} SPEVENTEX;
632cpp_quote("#else")
633cpp_quote("typedef struct SPEVENTEX {")
634cpp_quote(" SPEVENTENUM eEventId : 16;")
635cpp_quote(" SPEVENTLPARAMTYPE elParamType : 16;")
636cpp_quote(" ULONG ulStreamNum;")
637cpp_quote(" ULONGLONG ullAudioStreamOffset;")
638cpp_quote(" WPARAM wParam;")
639cpp_quote(" LPARAM lParam;")
640cpp_quote(" ULONGLONG ullAudioTimeOffset;")
641cpp_quote("} SPEVENTEX;")
642cpp_quote("#endif")
643#endif
644
645typedef [restricted, hidden] struct SPEVENTSOURCEINFO {
646 ULONGLONG ullEventInterest;
647 ULONGLONG ullQueuedInterest;
648 ULONG ulCount;
649} SPEVENTSOURCEINFO;
650
651[object, local, uuid (BE7A9CCE-5f9e-11d2-960f-00c04f8ee628), pointer_default (unique), restricted]
652interface ISpEventSource : ISpNotifySource {
653 HRESULT SetInterest ([in] ULONGLONG ullEventInterest,[in] ULONGLONG ullQueuedInterest);
654 HRESULT GetEvents ([in] ULONG ulCount,[out, size_is (ulCount)] SPEVENT *pEventArray,[out] ULONG *pulFetched);
655 HRESULT GetInfo ([out] SPEVENTSOURCEINFO *pInfo);
656};
657
658#if _SAPI_BLD_ >= 0x53
659[object, local, uuid (2373a435-6a4b-429e-A6AC-D4231A61975B), pointer_default (unique), restricted]
660interface ISpEventSource2 : ISpEventSource {
661 HRESULT GetEventsEx ([in] ULONG ulCount,[out, size_is (ulCount)] SPEVENTEX *pEventArray,[out] ULONG *pulFetched);
662};
663#endif
664
665[object, local, uuid (BE7A9CC9-5f9e-11d2-960f-00c04f8ee628), pointer_default (unique), restricted]
666interface ISpEventSink : IUnknown {
667 HRESULT AddEvents ([in] const SPEVENT *pEventArray,[in] ULONG ulCount);
668 HRESULT GetEventInterest ([out] ULONGLONG *pullEventInterest);
669};
670
671[object, uuid (BED530BE-2606-4f4d-A1C0-54c5cda5566f), pointer_default (unique), restricted]
672interface ISpStreamFormat : IStream {
673 HRESULT GetFormat ([in] GUID *pguidFormatId,[out] WAVEFORMATEX **ppCoMemWaveFormatEx);
674}
675
676[object, local, uuid (12e3cca9-7518-44c5-A5E7-BA5A79CB929E), pointer_default (unique), restricted]
677interface ISpStream : ISpStreamFormat {
678 HRESULT SetBaseStream ([in] IStream *pStream,[in] REFGUID rguidFormat,[in] const WAVEFORMATEX *pWaveFormatEx);
679 HRESULT GetBaseStream ([out] IStream **ppStream);
680 HRESULT BindToFile ([in] LPCWSTR pszFileName,[in] SPFILEMODE eMode,[in] const GUID *pFormatId, const WAVEFORMATEX *pWaveFormatEx,[in] ULONGLONG ullEventInterest);
681 HRESULT Close ();
682}
683
684[object, uuid (678a932c-EA71-4446-9b41-78fda6280a29), pointer_default (unique), restricted]
685interface ISpStreamFormatConverter : ISpStreamFormat {
686 HRESULT SetBaseStream ([in] ISpStreamFormat *pStream,[in] WINBOOL fSetFormatToBaseStreamFormat,[in] WINBOOL fWriteToBaseStream);
687 HRESULT GetBaseStream ([out] ISpStreamFormat **ppStream);
688 HRESULT SetFormat ([in] REFGUID rguidFormatIdOfConvertedStream,[in] const WAVEFORMATEX *pWaveFormatExOfConvertedStream);
689 HRESULT ResetSeekPosition ();
690 HRESULT ScaleConvertedToBaseOffset ([in] ULONGLONG ullOffsetConvertedStream,[out] ULONGLONG *pullOffsetBaseStream);
691 HRESULT ScaleBaseToConvertedOffset ([in] ULONGLONG ullOffsetBaseStream,[out] ULONGLONG *pullOffsetConvertedStream);
692};
693
694typedef [restricted, hidden] struct SPAUDIOSTATUS {
695 long cbFreeBuffSpace;
696 ULONG cbNonBlockingIO;
697 SPAUDIOSTATE State;
698 ULONGLONG CurSeekPos;
699 ULONGLONG CurDevicePos;
700 DWORD dwAudioLevel;
701 DWORD dwReserved2;
702} SPAUDIOSTATUS;
703
704typedef [restricted, hidden] struct SPAUDIOBUFFERINFO {
705 ULONG ulMsMinNotification;
706 ULONG ulMsBufferSize;
707 ULONG ulMsEventBias;
708} SPAUDIOBUFFERINFO;
709
710[object, local, uuid (C05C768F-FAE8-4ec2-8e07-338321c12452), pointer_default (unique), restricted]
711interface ISpAudio : ISpStreamFormat {
712 HRESULT SetState ([in] SPAUDIOSTATE NewState,[in] ULONGLONG ullReserved);
713 HRESULT SetFormat ([in] REFGUID rguidFmtId,[in] const WAVEFORMATEX *pWaveFormatEx);
714 HRESULT GetStatus ([out] SPAUDIOSTATUS *pStatus);
715 HRESULT SetBufferInfo ([in] const SPAUDIOBUFFERINFO *pBuffInfo);
716 HRESULT GetBufferInfo ([out] SPAUDIOBUFFERINFO *pBuffInfo);
717 HRESULT GetDefaultFormat ([out] GUID *pFormatId,[out] WAVEFORMATEX **ppCoMemWaveFormatEx);
718 HANDLE EventHandle ();
719 HRESULT GetVolumeLevel ([out] ULONG *pLevel);
720 HRESULT SetVolumeLevel ([in] ULONG Level);
721 HRESULT GetBufferNotifySize ([out] ULONG *pcbSize);
722 HRESULT SetBufferNotifySize ([in] ULONG cbSize);
723};
724
725[object, local, uuid (15806f6e-1d70-4b48-98e6-3b1a007509ab), pointer_default (unique), restricted]
726interface ISpMMSysAudio : ISpAudio {
727 HRESULT GetDeviceId ([out] UINT *puDeviceId);
728 HRESULT SetDeviceId ([in] UINT uDeviceId);
729 HRESULT GetMMHandle ([out] void **pHandle);
730 HRESULT GetLineId ([out] UINT *puLineId);
731 HRESULT SetLineId ([in] UINT uLineId);
732};
733
734[object, uuid (10f63bce-201a-11d3-AC70-00c04f8ee6c0), pointer_default (unique), restricted]
735interface ISpTranscript : IUnknown {
736 HRESULT GetTranscript ([out, string] LPWSTR *ppszTranscript);
737 HRESULT AppendTranscript ([in, string] LPCWSTR pszTranscript);
738};
739
740typedef WCHAR SPPHONEID;
741typedef LPWSTR PSPPHONEID;
742typedef LPCWSTR PCSPPHONEID;
743
744typedef [restricted, hidden] struct SPPHRASEELEMENT {
745 ULONG ulAudioTimeOffset;
746 ULONG ulAudioSizeTime;
747 ULONG ulAudioStreamOffset;
748 ULONG ulAudioSizeBytes;
749 ULONG ulRetainedStreamOffset;
750 ULONG ulRetainedSizeBytes;
751 LPCWSTR pszDisplayText;
752 LPCWSTR pszLexicalForm;
753 const SPPHONEID *pszPronunciation;
754 BYTE bDisplayAttributes;
755 signed char RequiredConfidence;
756 signed char ActualConfidence;
757 BYTE Reserved;
758 float SREngineConfidence;
759} SPPHRASEELEMENT;
760
761typedef [restricted, hidden] struct SPPHRASERULE SPPHRASERULE;
762typedef [restricted, hidden] struct SPPHRASEPROPERTY SPPHRASEPROPERTY;
763
764struct SPPHRASERULE {
765 LPCWSTR pszName;
766 ULONG ulId;
767 ULONG ulFirstElement;
768 ULONG ulCountOfElements;
769 const SPPHRASERULE *pNextSibling;
770 const SPPHRASERULE *pFirstChild;
771 float SREngineConfidence;
772 signed char Confidence;
773};
774
775struct SPPHRASEPROPERTY {
776 LPCWSTR pszName;
777 union {
778 ULONG ulId;
779 struct {
780 byte bType;
781 byte bReserved;
782 unsigned short usArrayIndex;
783 };
784 };
785 LPCWSTR pszValue;
786 VARIANT vValue;
787 ULONG ulFirstElement;
788 ULONG ulCountOfElements;
789 const SPPHRASEPROPERTY *pNextSibling;
790 const SPPHRASEPROPERTY *pFirstChild;
791 float SREngineConfidence;
792 signed char Confidence;
793};
794
795typedef [restricted, hidden] struct SPPHRASEREPLACEMENT {
796 BYTE bDisplayAttributes;
797 LPCWSTR pszReplacementText;
798 ULONG ulFirstElement;
799 ULONG ulCountOfElements;
800} SPPHRASEREPLACEMENT;
801
802#if _SAPI_BLD_ >= 0x53
803typedef [restricted, hidden] struct SPSEMANTICERRORINFO {
804 ULONG ulLineNumber;
805 LPWSTR pszScriptLine;
806 LPWSTR pszSource;
807 LPWSTR pszDescription;
808 HRESULT hrResultCode;
809} SPSEMANTICERRORINFO;
810#endif
811
812#if _SAPI_BLD_ >= 0x53
813typedef [restricted, hidden] struct SPPHRASE_50
814#else
815typedef [restricted, hidden] struct SPPHRASE
816#endif
817{
818 ULONG cbSize;
819 LANGID LangID;
820 WORD wHomophoneGroupId;
821 ULONGLONG ullGrammarID;
822 ULONGLONG ftStartTime;
823 ULONGLONG ullAudioStreamPosition;
824 ULONG ulAudioSizeBytes;
825 ULONG ulRetainedSizeBytes;
826 ULONG ulAudioSizeTime;
827 SPPHRASERULE Rule;
828 const SPPHRASEPROPERTY *pProperties;
829 const SPPHRASEELEMENT *pElements;
830 ULONG cReplacements;
831 const SPPHRASEREPLACEMENT *pReplacements;
832 GUID SREngineID;
833 ULONG ulSREnginePrivateDataSize;
834 const BYTE *pSREnginePrivateData;
835}
836#if _SAPI_BLD_ >= 0x53
837SPPHRASE_50;
838#else
839SPPHRASE;
840#endif
841
842#if _SAPI_BLD_ >= 0x53
843cpp_quote("#define SP_SPPHRASESIZE_500 sizeof (SPPHRASE_50)")
844
845cpp_quote("#ifdef __cplusplus")
846#if _SAPI_BLD_ > 0x53
847cpp_quote("typedef struct SPPHRASE_53 : public SPPHRASE_50 {")
848#else
849cpp_quote("typedef struct SPPHRASE : public SPPHRASE_50 {")
850#endif
851cpp_quote(" LPWSTR pSML;")
852cpp_quote(" SPSEMANTICERRORINFO* pSemanticErrorInfo;")
853#if _SAPI_BLD_ > 0x53
854cpp_quote("} SPPHRASE_53;")
855#else
856cpp_quote("} SPPHRASE;")
857#endif
858cpp_quote("#else")
859#if _SAPI_BLD_ > 0x53
860typedef [restricted, hidden] struct SPPHRASE_53
861#else
862typedef [restricted, hidden] struct SPPHRASE
863#endif
864{
865 ULONG cbSize;
866 LANGID LangID;
867 WORD wHomophoneGroupId;
868 ULONGLONG ullGrammarID;
869 ULONGLONG ftStartTime;
870 ULONGLONG ullAudioStreamPosition;
871 ULONG ulAudioSizeBytes;
872 ULONG ulRetainedSizeBytes;
873 ULONG ulAudioSizeTime;
874 SPPHRASERULE Rule;
875 const SPPHRASEPROPERTY *pProperties;
876 const SPPHRASEELEMENT *pElements;
877 ULONG cReplacements;
878 const SPPHRASEREPLACEMENT *pReplacements;
879 GUID SREngineID;
880 ULONG ulSREnginePrivateDataSize;
881 const BYTE *pSREnginePrivateData;
882 LPWSTR pSML;
883 SPSEMANTICERRORINFO *pSemanticErrorInfo;
884}
885#if _SAPI_BLD_ > 0x53
886SPPHRASE_53;
887#else
888SPPHRASE;
889#endif
890cpp_quote("#endif")
891#endif
892
893#if _SAPI_BLD_ >= 0x54
894cpp_quote("#define SP_SPPHRASESIZE_530 sizeof (SPPHRASE_53)")
895
896cpp_quote("#ifdef __cplusplus")
897cpp_quote("typedef struct SPPHRASE : public SPPHRASE_53 {")
898cpp_quote(" SPSEMANTICFORMAT SemanticTagFormat;")
899cpp_quote("} SPPHRASE;")
900cpp_quote("#else")
901typedef [restricted, hidden] struct SPPHRASE {
902 ULONG cbSize;
903 LANGID LangID;
904 WORD wHomophoneGroupId;
905 ULONGLONG ullGrammarID;
906 ULONGLONG ftStartTime;
907 ULONGLONG ullAudioStreamPosition;
908 ULONG ulAudioSizeBytes;
909 ULONG ulRetainedSizeBytes;
910 ULONG ulAudioSizeTime;
911 SPPHRASERULE Rule;
912 const SPPHRASEPROPERTY *pProperties;
913 const SPPHRASEELEMENT *pElements;
914 ULONG cReplacements;
915 const SPPHRASEREPLACEMENT *pReplacements;
916 GUID SREngineID;
917 ULONG ulSREnginePrivateDataSize;
918 const BYTE *pSREnginePrivateData;
919 LPWSTR pSML;
920 SPSEMANTICERRORINFO *pSemanticErrorInfo;
921 SPSEMANTICFORMAT SemanticTagFormat;
922} SPPHRASE;
923cpp_quote("#endif")
924#endif
925
926typedef [restricted, hidden] struct SPSERIALIZEDPHRASE {
927 ULONG ulSerializedSize;
928} SPSERIALIZEDPHRASE;
929
930#if _SAPI_BLD_ >= 0x53
931typedef [restricted, hidden] struct SPRULE {
932 LPCWSTR pszRuleName;
933 ULONG ulRuleId;
934 DWORD dwAttributes;
935} SPRULE;
936#endif
937
938typedef [hidden] struct SPBINARYGRAMMAR {
939 ULONG ulTotalSerializedSize;
940} SPBINARYGRAMMAR;
941
942cpp_quote("#if 0")
943typedef void *SPSTATEHANDLE;
944cpp_quote("#else")
945cpp_quote("DECLARE_HANDLE(SPSTATEHANDLE);")
946cpp_quote("#endif")
947
948typedef [restricted, hidden] struct SPWORDPRONUNCIATION {
949 struct SPWORDPRONUNCIATION *pNextWordPronunciation;
950 SPLEXICONTYPE eLexiconType;
951 LANGID LangID;
952 WORD wPronunciationFlags;
953 SPPARTOFSPEECH ePartOfSpeech;
954 SPPHONEID szPronunciation[1];
955} SPWORDPRONUNCIATION;
956
957typedef [restricted, hidden] struct SPWORDPRONUNCIATIONLIST {
958 ULONG ulSize;
959 BYTE *pvBuffer;
960 SPWORDPRONUNCIATION *pFirstWordPronunciation;
961} SPWORDPRONUNCIATIONLIST;
962
963typedef [restricted, hidden] struct SPWORD {
964 struct SPWORD *pNextWord;
965 LANGID LangID;
966 WORD wReserved;
967 SPWORDTYPE eWordType;
968 LPWSTR pszWord;
969 SPWORDPRONUNCIATION *pFirstWordPronunciation;
970} SPWORD;
971
972typedef [restricted, hidden] struct SPWORDLIST {
973 ULONG ulSize;
974 BYTE *pvBuffer;
975 SPWORD *pFirstWord;
976} SPWORDLIST;
977
978[object, local, uuid (DA41A7C2-5383-4db2-916b-6c1719e3db58), pointer_default (unique), restricted]
979interface ISpLexicon : IUnknown {
980 HRESULT GetPronunciations ([in] LPCWSTR pszWord,[in] LANGID LangID,[in] DWORD dwFlags,[in, out] SPWORDPRONUNCIATIONLIST *pWordPronunciationList);
981 HRESULT AddPronunciation ([in] LPCWSTR pszWord,[in] LANGID LangID,[in] SPPARTOFSPEECH ePartOfSpeech,[in] PCSPPHONEID pszPronunciation);
982 HRESULT RemovePronunciation ([in] LPCWSTR pszWord,[in] LANGID LangID,[in] SPPARTOFSPEECH ePartOfSpeech,[in] PCSPPHONEID pszPronunciation);
983 HRESULT GetGeneration ([out] DWORD *pdwGeneration);
984 HRESULT GetGenerationChange ([in] DWORD dwFlags,[in, out] DWORD *pdwGeneration,[in, out] SPWORDLIST *pWordList);
985 HRESULT GetWords ([in] DWORD dwFlags,[in, out] DWORD *pdwGeneration,[in, out] DWORD *pdwCookie,[in, out] SPWORDLIST *pWordList);
986};
987
988[object, uuid (8565572f-C094-41cc-B56E-10bd9c3ff044), pointer_default (unique), restricted]
989interface ISpContainerLexicon : ISpLexicon {
990 HRESULT AddLexicon ([in] ISpLexicon *pAddLexicon,[in] DWORD dwFlags);
991};
992
993#if _SAPI_BLD_ >= 0x53
994typedef [restricted, hidden] struct SPSHORTCUTPAIR {
995 struct SPSHORTCUTPAIR *pNextSHORTCUTPAIR;
996 LANGID LangID;
997 SPSHORTCUTTYPE shType;
998 LPWSTR pszDisplay;
999 LPWSTR pszSpoken;
1000} SPSHORTCUTPAIR;
1001
1002typedef [restricted, hidden] struct SPSHORTCUTPAIRLIST {
1003 ULONG ulSize;
1004 BYTE *pvBuffer;
1005 SPSHORTCUTPAIR *pFirstShortcutPair;
1006} SPSHORTCUTPAIRLIST;
1007#endif
1008
1009#if _SAPI_BLD_ >= 0x53
1010[object, uuid (3df681e2-EA56-11d9-8bde-F66BAD1E3F3A), pointer_default (unique), restricted]
1011interface ISpShortcut : IUnknown {
1012 HRESULT AddShortcut ([in] LPCWSTR pszDisplay,[in] LANGID LangID,[in] LPCWSTR pszSpoken,[in] SPSHORTCUTTYPE shType);
1013 HRESULT RemoveShortcut ([in] LPCWSTR pszDisplay,[in] LANGID LangID,[in] LPCWSTR pszSpoken,[in] SPSHORTCUTTYPE shType);
1014 HRESULT GetShortcuts ([in] LANGID LangID,[in, out] SPSHORTCUTPAIRLIST *pShortcutpairList);
1015 HRESULT GetGeneration ([out] DWORD *pdwGeneration);
1016 HRESULT GetWordsFromGenerationChange ([in, out] DWORD *pdwGeneration,[in, out] SPWORDLIST *pWordList);
1017 HRESULT GetWords ([in, out] DWORD *pdwGeneration,[in, out] DWORD *pdwCookie,[in, out] SPWORDLIST *pWordList);
1018 HRESULT GetShortcutsForGeneration ([in, out] DWORD *pdwGeneration,[in, out] DWORD *pdwCookie,[in, out] SPSHORTCUTPAIRLIST *pShortcutpairList);
1019 HRESULT GetGenerationChange ([in, out] DWORD *pdwGeneration,[in, out] SPSHORTCUTPAIRLIST *pShortcutpairList);
1020};
1021#endif
1022
1023[object, uuid (8445c581-0cac-4a38-ABFE-9b2ce2826455), pointer_default (unique), restricted]
1024interface ISpPhoneConverter : ISpObjectWithToken {
1025 HRESULT PhoneToId ([in] LPCWSTR pszPhone,[out] SPPHONEID *pId);
1026 HRESULT IdToPhone ([in] PCSPPHONEID pId,[out] WCHAR *pszPhone);
1027};
1028
1029#if _SAPI_BLD_ >= 0x53
1030[object, local, uuid (133adcd4-19b4-4020-9fdc-842e78253b17), pointer_default (unique), restricted]
1031interface ISpPhoneticAlphabetConverter : IUnknown {
1032 HRESULT GetLangId ([out] LANGID *pLangID);
1033 HRESULT SetLangId ([in] LANGID LangID);
1034 HRESULT SAPI2UPS ([in] const SPPHONEID *pszSAPIId,[out] SPPHONEID *pszUPSId,[in] DWORD cMaxLength);
1035 HRESULT UPS2SAPI ([in] const SPPHONEID *pszUPSId,[out] SPPHONEID *pszSAPIId,[in] DWORD cMaxLength);
1036 HRESULT GetMaxConvertLength ([in] DWORD cSrcLength,[in] WINBOOL bSAPI2UPS,[out] DWORD *pcMaxDestLength);
1037};
1038
1039[object, uuid (B2745EFD-42ce-48ca-81f1-A96E02538A90), pointer_default (unique), restricted]
1040interface ISpPhoneticAlphabetSelection : IUnknown {
1041 HRESULT IsAlphabetUPS ([out] WINBOOL *pfIsUPS);
1042 HRESULT SetAlphabetToUPS ([in] WINBOOL fForceUPS);
1043};
1044#endif
1045
1046typedef [restricted, hidden] struct SPVPITCH {
1047 long MiddleAdj;
1048 long RangeAdj;
1049} SPVPITCH;
1050
1051typedef [restricted, hidden] struct SPVCONTEXT {
1052 LPCWSTR pCategory;
1053 LPCWSTR pBefore;
1054 LPCWSTR pAfter;
1055} SPVCONTEXT;
1056
1057typedef [restricted, hidden] struct SPVSTATE {
1058 SPVACTIONS eAction;
1059 LANGID LangID;
1060 WORD wReserved;
1061 long EmphAdj;
1062 long RateAdj;
1063 ULONG Volume;
1064 SPVPITCH PitchAdj;
1065 ULONG SilenceMSecs;
1066 SPPHONEID *pPhoneIds;
1067 SPPARTOFSPEECH ePartOfSpeech;
1068 SPVCONTEXT Context;
1069} SPVSTATE;
1070
1071typedef [restricted, hidden] struct SPVOICESTATUS {
1072 ULONG ulCurrentStream;
1073 ULONG ulLastStreamQueued;
1074 HRESULT hrLastResult;
1075 DWORD dwRunningState;
1076 ULONG ulInputWordPos;
1077 ULONG ulInputWordLen;
1078 ULONG ulInputSentPos;
1079 ULONG ulInputSentLen;
1080 LONG lBookmarkId;
1081 SPPHONEID PhonemeId;
1082 SPVISEMES VisemeId;
1083 DWORD dwReserved1;
1084 DWORD dwReserved2;
1085} SPVOICESTATUS;
1086
1087typedef [hidden] enum SPEAKFLAGS {
1088 SPF_DEFAULT = 0,
1089 SPF_ASYNC = 1,
1090 SPF_PURGEBEFORESPEAK = 2,
1091 SPF_IS_FILENAME = 4,
1092 SPF_IS_XML = 8,
1093 SPF_IS_NOT_XML = 0x10,
1094 SPF_PERSIST_XML = 0x20,
1095 SPF_NLP_SPEAK_PUNC = 0x40,
1096#if _SAPI_BLD_ >= 0x53
1097 SPF_PARSE_SAPI = 0x80,
1098 SPF_PARSE_SSML = 0x100,
1099 SPF_PARSE_AUTODETECT = 0,
1100#endif
1101 SPF_NLP_MASK = (SPF_NLP_SPEAK_PUNC),
1102#if _SAPI_BLD_ >= 0x53
1103 SPF_PARSE_MASK = (SPF_PARSE_SAPI | SPF_PARSE_SSML),
1104 SPF_VOICE_MASK = (SPF_ASYNC | SPF_PURGEBEFORESPEAK | SPF_IS_FILENAME | SPF_IS_XML | SPF_IS_NOT_XML | SPF_NLP_MASK | SPF_PERSIST_XML | SPF_PARSE_MASK),
1105#else
1106 SPF_VOICE_MASK = (SPF_ASYNC | SPF_PURGEBEFORESPEAK | SPF_IS_FILENAME | SPF_IS_XML | SPF_IS_NOT_XML | SPF_NLP_MASK | SPF_PERSIST_XML),
1107#endif
1108 SPF_UNUSED_FLAGS = ~ (SPF_VOICE_MASK)
1109} SPEAKFLAGS;
1110
1111[object, local, uuid (6c44df74-72b9-4992-A1EC-EF996E0422D4), pointer_default (unique), restricted]
1112interface ISpVoice : ISpEventSource {
1113 HRESULT SetOutput ([in] IUnknown *pUnkOutput,[in] WINBOOL fAllowFormatChanges);
1114 HRESULT GetOutputObjectToken ([out] ISpObjectToken **ppObjectToken);
1115 HRESULT GetOutputStream ([out] ISpStreamFormat **ppStream);
1116 HRESULT Pause (void);
1117 HRESULT Resume (void);
1118 HRESULT SetVoice ([in] ISpObjectToken *pToken);
1119 HRESULT GetVoice ([out] ISpObjectToken **ppToken);
1120 HRESULT Speak ([in, string] LPCWSTR pwcs,[in] DWORD dwFlags,[out] ULONG *pulStreamNumber);
1121 HRESULT SpeakStream ([in] IStream *pStream,[in] DWORD dwFlags,[out] ULONG *pulStreamNumber);
1122 HRESULT GetStatus ([out] SPVOICESTATUS *pStatus,[out] LPWSTR *ppszLastBookmark);
1123 HRESULT Skip ([in, string] LPCWSTR pItemType,[in] long lNumItems,[out] ULONG *pulNumSkipped);
1124 HRESULT SetPriority ([in] SPVPRIORITY ePriority);
1125 HRESULT GetPriority ([out] SPVPRIORITY *pePriority);
1126 HRESULT SetAlertBoundary ([in] SPEVENTENUM eBoundary);
1127 HRESULT GetAlertBoundary ([out] SPEVENTENUM *peBoundary);
1128 HRESULT SetRate ([in] long RateAdjust);
1129 HRESULT GetRate ([out] long *pRateAdjust);
1130 HRESULT SetVolume ([in] USHORT usVolume);
1131 HRESULT GetVolume ([out] USHORT *pusVolume);
1132 HRESULT WaitUntilDone ([in] ULONG msTimeout);
1133 HRESULT SetSyncSpeakTimeout ([in] ULONG msTimeout);
1134 HRESULT GetSyncSpeakTimeout ([out] ULONG *pmsTimeout);
1135 [local] HANDLE SpeakCompleteEvent ();
1136 [local] HRESULT IsUISupported ([in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData,[out] WINBOOL *pfSupported);
1137 [local] HRESULT DisplayUI ([in] HWND hwndParent,[in] LPCWSTR pszTitle,[in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData);
1138};
1139
1140[object, local, uuid (1a5c0354-B621-4b5a-8791-D306ED379E53), pointer_default (unique), restricted]
1141interface ISpPhrase : IUnknown {
1142 HRESULT GetPhrase ([out] SPPHRASE **ppCoMemPhrase);
1143 HRESULT GetSerializedPhrase ([out] SPSERIALIZEDPHRASE **ppCoMemPhrase);
1144 HRESULT GetText ([in] ULONG ulStart,[in] ULONG ulCount,[in] WINBOOL fUseTextReplacements,[out] LPWSTR *ppszCoMemText,[out, optional] BYTE *pbDisplayAttributes);
1145 HRESULT Discard ([in] DWORD dwValueTypes);
1146};
1147
1148[object, local, uuid (8fcebc98-4e49-4067-9c6c-D86A0E092E3D), pointer_default (unique), restricted]
1149interface ISpPhraseAlt : ISpPhrase {
1150 HRESULT GetAltInfo ([out] ISpPhrase **ppParent,[out] ULONG *pulStartElementInParent,[out] ULONG *pcElementsInParent,[out] ULONG *pcElementsInAlt);
1151 HRESULT Commit ();
1152};
1153
1154#if _SAPI_BLD_ >= 0x53
1155typedef enum SPXMLRESULTOPTIONS {
1156 SPXRO_SML = 0,
1157 SPXRO_Alternates_SML = 1
1158} SPXMLRESULTOPTIONS;
1159#endif
1160
1161#if _SAPI_BLD_ >= 0x53
1162[object, local, uuid (F264DA52-E457-4696-B856-A737B717AF79), pointer_default (unique), restricted]
1163interface ISpPhrase2 : ISpPhrase {
1164 HRESULT GetXMLResult ([out] LPWSTR *ppszCoMemXMLResult,[in] SPXMLRESULTOPTIONS Options);
1165 HRESULT GetXMLErrorInfo ([out] SPSEMANTICERRORINFO *pSemanticErrorInfo);
1166 HRESULT GetAudio ([in] ULONG ulStartElement,[in] ULONG cElements,[out] ISpStreamFormat **ppStream);
1167};
1168#endif
1169
1170typedef [restricted, hidden] struct SPRECORESULTTIMES {
1171 FILETIME ftStreamTime;
1172 ULONGLONG ullLength;
1173 DWORD dwTickCount;
1174 ULONGLONG ullStart;
1175} SPRECORESULTTIMES;
1176
1177typedef [hidden] struct SPSERIALIZEDRESULT {
1178 ULONG ulSerializedSize;
1179} SPSERIALIZEDRESULT;
1180
1181[object, local, uuid (20b053be-E235-43cd-9a2a-8d17a48b7842), pointer_default (unique), restricted]
1182interface ISpRecoResult : ISpPhrase {
1183 HRESULT GetResultTimes ([out] SPRECORESULTTIMES *pTimes);
1184 HRESULT GetAlternates ([in] ULONG ulStartElement,[in] ULONG cElements,[in] ULONG ulRequestCount,[out] ISpPhraseAlt **ppPhrases,[out] ULONG *pcPhrasesReturned);
1185 HRESULT GetAudio ([in] ULONG ulStartElement,[in] ULONG cElements,[out] ISpStreamFormat **ppStream);
1186 HRESULT SpeakAudio ([in] ULONG ulStartElement,[in] ULONG cElements,[in] DWORD dwFlags,[out] ULONG *pulStreamNumber);
1187 HRESULT Serialize ([out] SPSERIALIZEDRESULT **ppCoMemSerializedResult);
1188 HRESULT ScaleAudio ([in] const GUID *pAudioFormatId,[in] const WAVEFORMATEX *pWaveFormatEx);
1189 HRESULT GetRecoContext ([out] ISpRecoContext **ppRecoContext);
1190};
1191
1192#if _SAPI_BLD_ >= 0x53
1193typedef [hidden] enum SPCOMMITFLAGS {
1194 SPCF_NONE = 0,
1195 SPCF_ADD_TO_USER_LEXICON = (1 << 0),
1196 SPCF_DEFINITE_CORRECTION = (1 << 1)
1197} SPCOMMITFLAGS;
1198#endif
1199
1200#if _SAPI_BLD_ >= 0x53
1201[object, local, uuid (27cac6c4-88f2-41f2-8817-0c95e59f1e6e), pointer_default (unique), restricted]
1202interface ISpRecoResult2 : ISpRecoResult {
1203 HRESULT CommitAlternate ([in] ISpPhraseAlt *pPhraseAlt,[out] ISpRecoResult **ppNewResult);
1204 HRESULT CommitText ([in] ULONG ulStartElement,[in] ULONG cElements,[in] LPCWSTR pszCorrectedData,[in] DWORD eCommitFlags);
1205 HRESULT SetTextFeedback ([in, string] LPCWSTR pszFeedback,[in] WINBOOL fSuccessful);
1206}
1207
1208[object, local, uuid (AE39362B-45a8-4074-9b9e-CCF49AA2D0B6), pointer_default (unique), restricted]
1209interface ISpXMLRecoResult : ISpRecoResult {
1210 HRESULT GetXMLResult ([out] LPWSTR *ppszCoMemXMLResult,[in] SPXMLRESULTOPTIONS Options);
1211 HRESULT GetXMLErrorInfo ([out] SPSEMANTICERRORINFO *pSemanticErrorInfo);
1212};
1213#endif
1214
1215typedef [hidden] struct tagSPTEXTSELECTIONINFO {
1216 ULONG ulStartActiveOffset;
1217 ULONG cchActiveChars;
1218 ULONG ulStartSelection;
1219 ULONG cchSelection;
1220} SPTEXTSELECTIONINFO;
1221
1222typedef [hidden] enum SPWORDPRONOUNCEABLE {
1223 SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE = 0,
1224 SPWP_UNKNOWN_WORD_PRONOUNCEABLE = 1,
1225 SPWP_KNOWN_WORD_PRONOUNCEABLE = 2
1226} SPWORDPRONOUNCEABLE;
1227
1228typedef [hidden] enum SPGRAMMARSTATE {
1229 SPGS_DISABLED = 0,
1230 SPGS_ENABLED = 1,
1231 SPGS_EXCLUSIVE = 3
1232} SPGRAMMARSTATE;
1233
1234typedef [hidden] enum SPCONTEXTSTATE {
1235 SPCS_DISABLED = 0,
1236 SPCS_ENABLED = 1,
1237} SPCONTEXTSTATE;
1238
1239typedef [hidden] enum SPRULESTATE {
1240 SPRS_INACTIVE = 0,
1241 SPRS_ACTIVE = 1,
1242 SPRS_ACTIVE_WITH_AUTO_PAUSE = 3
1243#if _SAPI_BLD_ >= 0x53
1244 , SPRS_ACTIVE_USER_DELIMITED = 4
1245#endif
1246} SPRULESTATE;
1247
1248const ULONGLONG SP_STREAMPOS_ASAP = 0;
1249const ULONGLONG SP_STREAMPOS_REALTIME = -1;
1250
1251cpp_quote("#define SPRULETRANS_TEXTBUFFER (SPSTATEHANDLE) (-1)")
1252cpp_quote("#define SPRULETRANS_WILDCARD (SPSTATEHANDLE) (-2)")
1253cpp_quote("#define SPRULETRANS_DICTATION (SPSTATEHANDLE) (-3)")
1254
1255typedef [hidden] enum SPGRAMMARWORDTYPE {
1256 SPWT_DISPLAY,
1257 SPWT_LEXICAL,
1258 SPWT_PRONUNCIATION
1259#if _SAPI_BLD_ >= 0x53
1260 , SPWT_LEXICAL_NO_SPECIAL_CHARS
1261#endif
1262} SPGRAMMARWORDTYPE;
1263
1264typedef [hidden] struct tagSPPROPERTYINFO {
1265 LPCWSTR pszName;
1266 ULONG ulId;
1267 LPCWSTR pszValue;
1268 VARIANT vValue;
1269} SPPROPERTYINFO;
1270
1271typedef [hidden] enum SPCFGRULEATTRIBUTES {
1272 SPRAF_TopLevel = 0x1,
1273 SPRAF_Active = 0x2,
1274 SPRAF_Export = 0x4,
1275 SPRAF_Import = 0x8,
1276 SPRAF_Interpreter = 0x10,
1277 SPRAF_Dynamic = 0x20,
1278#if _SAPI_BLD_ >= 0x53
1279 SPRAF_Root = 0x40,
1280#endif
1281 SPRAF_AutoPause = 0x10000
1282#if _SAPI_BLD_ >= 0x53
1283 , SPRAF_UserDelimited = 0x20000
1284#endif
1285} SPCFGRULEATTRIBUTES;
1286
1287[object, local, uuid (8137828f-591a-4a42-BE58-49ea7ebaac68), pointer_default (unique), restricted]
1288interface ISpGrammarBuilder : IUnknown {
1289 HRESULT ResetGrammar ([in] LANGID NewLanguage);
1290 HRESULT GetRule ([in] LPCWSTR pszRuleName,[in] DWORD dwRuleId,[in] DWORD dwAttributes,[in] WINBOOL fCreateIfNotExist,[out] SPSTATEHANDLE *phInitialState);
1291 HRESULT ClearRule ([in] SPSTATEHANDLE hState);
1292 HRESULT CreateNewState ([in] SPSTATEHANDLE hState,[out] SPSTATEHANDLE *phState);
1293 HRESULT AddWordTransition ([in] SPSTATEHANDLE hFromState,[in] SPSTATEHANDLE hToState,[in] LPCWSTR psz,[in] LPCWSTR pszSeparators,[in] SPGRAMMARWORDTYPE eWordType,[in] float Weight,[in] const SPPROPERTYINFO *pPropInfo);
1294 HRESULT AddRuleTransition ([in] SPSTATEHANDLE hFromState,[in] SPSTATEHANDLE hToState,[in] SPSTATEHANDLE hRule,[in] float Weight,[in] const SPPROPERTYINFO *pPropInfo);
1295 HRESULT AddResource ([in] SPSTATEHANDLE hRuleState,[in] LPCWSTR pszResourceName,[in] LPCWSTR pszResourceValue);
1296 HRESULT Commit ([in] DWORD dwReserved);
1297};
1298
1299typedef [hidden] enum SPLOADOPTIONS {
1300 SPLO_STATIC = 0,
1301 SPLO_DYNAMIC = 1
1302} SPLOADOPTIONS;
1303
1304[object, local, uuid (2177db29-7f45-47d0-8554-067e91c80502), pointer_default (unique), restricted]
1305interface ISpRecoGrammar : ISpGrammarBuilder {
1306 HRESULT GetGrammarId ([out] ULONGLONG *pullGrammarId);
1307 HRESULT GetRecoContext ([out] ISpRecoContext **ppRecoCtxt);
1308 HRESULT LoadCmdFromFile ([in, string] LPCWSTR pszFileName,[in] SPLOADOPTIONS Options);
1309 HRESULT LoadCmdFromObject ([in] REFCLSID rcid,[in, string] LPCWSTR pszGrammarName,[in] SPLOADOPTIONS Options);
1310 HRESULT LoadCmdFromResource ([in] HMODULE hModule,[in, string] LPCWSTR pszResourceName,[in, string] LPCWSTR pszResourceType,[in] WORD wLanguage,[in] SPLOADOPTIONS Options);
1311 HRESULT LoadCmdFromMemory ([in] const SPBINARYGRAMMAR *pGrammar,[in] SPLOADOPTIONS Options);
1312 HRESULT LoadCmdFromProprietaryGrammar ([in] REFGUID rguidParam,[in, string] LPCWSTR pszStringParam,[in] const void *pvDataPrarm,[in] ULONG cbDataSize,[in] SPLOADOPTIONS Options);
1313 HRESULT SetRuleState ([in, string] LPCWSTR pszName,[in] void *pReserved,[in] SPRULESTATE NewState);
1314 HRESULT SetRuleIdState ([in] ULONG ulRuleId,[in] SPRULESTATE NewState);
1315 HRESULT LoadDictation ([in, string] LPCWSTR pszTopicName,[in] SPLOADOPTIONS Options);
1316 HRESULT UnloadDictation ();
1317 HRESULT SetDictationState ([in] SPRULESTATE NewState);
1318 HRESULT SetWordSequenceData ([in] const WCHAR *pText,[in] ULONG cchText,[in] const SPTEXTSELECTIONINFO *pInfo);
1319 HRESULT SetTextSelection ([in] const SPTEXTSELECTIONINFO *pInfo);
1320 HRESULT IsPronounceable ([in, string] LPCWSTR pszWord,[out] SPWORDPRONOUNCEABLE *pWordPronounceable);
1321 HRESULT SetGrammarState ([in] SPGRAMMARSTATE eGrammarState);
1322 HRESULT SaveCmd ([in] IStream *pStream,[out, optional] LPWSTR *ppszCoMemErrorText);
1323 HRESULT GetGrammarState ([out] SPGRAMMARSTATE *peGrammarState);
1324};
1325
1326#if _SAPI_BLD_ >= 0x53
1327typedef enum SPMATCHINGMODE {
1328 AllWords = 0,
1329 Subsequence = 1,
1330 OrderedSubset = 3,
1331 SubsequenceContentRequired = 5,
1332 OrderedSubsetContentRequired = 7
1333} SPMATCHINGMODE;
1334
1335typedef enum PHONETICALPHABET {
1336 PA_Ipa = 0,
1337 PA_Ups = 1,
1338 PA_Sapi = 2,
1339} PHONETICALPHABET;
1340#endif
1341
1342#if _SAPI_BLD_ >= 0x53
1343[object, local, uuid (8ab10026-20cc-4b20-8c22-A49C9BA78F60), pointer_default (unique), restricted]
1344interface ISpGrammarBuilder2 : IUnknown {
1345 HRESULT AddTextSubset ([in] SPSTATEHANDLE hFromState,[in] SPSTATEHANDLE hToState,[in] LPCWSTR psz,[in] SPMATCHINGMODE eMatchMode);
1346 HRESULT SetPhoneticAlphabet ([in] PHONETICALPHABET phoneticALphabet);
1347}
1348
1349cpp_quote("#define SPRP_NORMAL 0")
1350
1351[object, local, uuid (4b37bc9e-9ed6-44a3-93d3-18f022b79ec3), pointer_default (unique), restricted]
1352interface ISpRecoGrammar2 : IUnknown {
1353 HRESULT GetRules ([out] SPRULE **ppCoMemRules,[out] UINT *puNumRules);
1354 HRESULT LoadCmdFromFile2 ([in, string] LPCWSTR pszFileName,[in] SPLOADOPTIONS Options,[in, string] LPCWSTR pszSharingUri,[in, string] LPCWSTR pszBaseUri);
1355 HRESULT LoadCmdFromMemory2 ([in] const SPBINARYGRAMMAR *pGrammar,[in] SPLOADOPTIONS Options,[in, string] LPCWSTR pszSharingUri,[in, string] LPCWSTR pszBaseUri);
1356 HRESULT SetRulePriority ([in, string] LPCWSTR pszRuleName,[in] ULONG ulRuleId,[in] int nRulePriority);
1357 HRESULT SetRuleWeight ([in, string] LPCWSTR pszRuleName,[in] ULONG ulRuleId,[in] float flWeight);
1358 HRESULT SetDictationWeight ([in] float flWeight);
1359 HRESULT SetGrammarLoader ([in] ISpeechResourceLoader *pLoader);
1360 HRESULT SetSMLSecurityManager ([in] IInternetSecurityManager *pSMLSecurityManager);
1361}
1362
1363[object, local, uuid (B9AC5783-FCD0-4b21-B119-B4F8DA8FD2C3), pointer_default (unique), dual]
1364interface ISpeechResourceLoader : IDispatch {
1365 [id (1)] HRESULT LoadResource ([in] BSTR bstrResourceUri,[in] VARIANT_BOOL fAlwaysReload,[out] IUnknown **pStream,[out] BSTR *pbstrMIMEType,[out] VARIANT_BOOL *pfModified,[out] BSTR *pbstrRedirectUrl);
1366 [id (2)] HRESULT GetLocalCopy ([in] BSTR bstrResourceUri,[out] BSTR *pbstrLocalPath,[out] BSTR *pbstrMIMEType,[out] BSTR *pbstrRedirectUrl);
1367 [id (3)] HRESULT ReleaseLocalCopy ([in] BSTR pbstrLocalPath);
1368}
1369#endif
1370
1371typedef [restricted, hidden] struct SPRECOCONTEXTSTATUS {
1372 SPINTERFERENCE eInterference;
1373 WCHAR szRequestTypeOfUI[255];
1374 DWORD dwReserved1;
1375 DWORD dwReserved2;
1376} SPRECOCONTEXTSTATUS;
1377
1378typedef [hidden] enum SPBOOKMARKOPTIONS {
1379 SPBO_NONE = 0,
1380 SPBO_PAUSE = 0x1
1381#if _SAPI_BLD_ >= 0x53
1382 , SPBO_AHEAD = 0x2,
1383 SPBO_TIME_UNITS = 0x4
1384#endif
1385} SPBOOKMARKOPTIONS;
1386
1387typedef [hidden] enum SPAUDIOOPTIONS {
1388 SPAO_NONE = 0,
1389 SPAO_RETAIN_AUDIO = 0x1
1390} SPAUDIOOPTIONS;
1391
1392[object, local, uuid (F740A62F-7c15-489e-8234-940a33d9272d), pointer_default (unique), restricted]
1393interface ISpRecoContext : ISpEventSource {
1394 HRESULT GetRecognizer ([out] ISpRecognizer **ppRecognizer);
1395 HRESULT CreateGrammar ([in] ULONGLONG ullGrammarId,[out] ISpRecoGrammar **ppGrammar);
1396 HRESULT GetStatus ([out] SPRECOCONTEXTSTATUS *pStatus);
1397 HRESULT GetMaxAlternates ([in] ULONG *pcAlternates);
1398 HRESULT SetMaxAlternates ([in] ULONG cAlternates);
1399 HRESULT SetAudioOptions ([in] SPAUDIOOPTIONS Options,[in] const GUID *pAudioFormatId,[in] const WAVEFORMATEX *pWaveFormatEx);
1400 HRESULT GetAudioOptions ([in] SPAUDIOOPTIONS *pOptions,[out] GUID *pAudioFormatId,[out] WAVEFORMATEX **ppCoMemWFEX);
1401 HRESULT DeserializeResult ([in] const SPSERIALIZEDRESULT *pSerializedResult,[out] ISpRecoResult **ppResult);
1402 HRESULT Bookmark ([in] SPBOOKMARKOPTIONS Options,[in] ULONGLONG ullStreamPosition,[in] LPARAM lparamEvent);
1403 HRESULT SetAdaptationData ([in, string] LPCWSTR pAdaptationData,[in] const ULONG cch);
1404 HRESULT Pause ([in] DWORD dwReserved);
1405 HRESULT Resume ([in] DWORD dwReserved);
1406 HRESULT SetVoice ([in] ISpVoice *pVoice,[in] WINBOOL fAllowFormatChanges);
1407 HRESULT GetVoice ([out] ISpVoice **ppVoice);
1408 HRESULT SetVoicePurgeEvent ([in] ULONGLONG ullEventInterest);
1409 HRESULT GetVoicePurgeEvent ([out] ULONGLONG *pullEventInterest);
1410 HRESULT SetContextState ([in] SPCONTEXTSTATE eContextState);
1411 HRESULT GetContextState ([out] SPCONTEXTSTATE *peContextState);
1412};
1413
1414#if _SAPI_BLD_ >= 0x53
1415typedef [hidden] enum SPGRAMMAROPTIONS {
1416 SPGO_SAPI = 0x1,
1417 SPGO_SRGS = 0x2,
1418 SPGO_UPS = 0x4,
1419 SPGO_SRGS_MS_SCRIPT = 0x8,
1420 SPGO_FILE = 0x10,
1421 SPGO_HTTP = 0x20,
1422 SPGO_RES = 0x40,
1423 SPGO_OBJECT = 0x80,
1424 SPGO_SRGS_W3C_SCRIPT = 0x100,
1425 SPGO_SRGS_STG_SCRIPT = 0x200,
1426
1427 SPGO_SRGS_SCRIPT = SPGO_SRGS | SPGO_SRGS_MS_SCRIPT | SPGO_SRGS_W3C_SCRIPT | SPGO_SRGS_STG_SCRIPT,
1428 SPGO_DEFAULT = 0x03fb,
1429 SPGO_ALL = 0x03ff
1430} SPGRAMMAROPTIONS;
1431
1432typedef [hidden] enum SPADAPTATIONSETTINGS {
1433 SPADS_Default = 0x0,
1434 SPADS_CurrentRecognizer = 0x1,
1435 SPADS_RecoProfile = 0x2,
1436 SPADS_Immediate = 0x4,
1437 SPADS_Reset = 0x8,
1438 SPADS_HighVolumeDataSource = 0x10
1439} SPADAPTATIONSETTINGS;
1440
1441typedef [hidden] enum SPADAPTATIONRELEVANCE {
1442 SPAR_Unknown = 0,
1443 SPAR_Low = 1,
1444 SPAR_Medium = 2,
1445 SPAR_High = 3
1446} SPADAPTATIONRELEVANCE;
1447#endif
1448
1449#if _SAPI_BLD_ >= 0x53
1450[object, local, uuid (BEAD311C-52ff-437f-9464-6b21054ca73d), pointer_default (unique), restricted]
1451interface ISpRecoContext2 : IUnknown {
1452 HRESULT SetGrammarOptions ([in] DWORD eGrammarOptions);
1453 HRESULT GetGrammarOptions ([out] DWORD *peGrammarOptions);
1454 HRESULT SetAdaptationData2 ([in] LPCWSTR pAdaptationData,[in] const ULONG cch,[in] LPCWSTR pTopicName,[in] DWORD eAdaptationSettings,[in] SPADAPTATIONRELEVANCE eRelevance);
1455}
1456#endif
1457
1458[object, local, uuid (5b4fb971-B115-4de1-AD97-E482E3BF6EE4), pointer_default (unique), restricted]
1459interface ISpProperties : IUnknown {
1460 HRESULT SetPropertyNum ([in] LPCWSTR pName,[in] LONG lValue);
1461 HRESULT GetPropertyNum ([in] LPCWSTR pName,[out] LONG *plValue);
1462 HRESULT SetPropertyString ([in] LPCWSTR pName,[in] LPCWSTR pValue);
1463 HRESULT GetPropertyString ([in] LPCWSTR pName,[out, string] LPWSTR *ppCoMemValue);
1464};
1465
1466const ULONG SP_MAX_LANGIDS = 20;
1467
1468typedef [restricted, hidden] struct SPRECOGNIZERSTATUS {
1469 SPAUDIOSTATUS AudioStatus;
1470 ULONGLONG ullRecognitionStreamPos;
1471 ULONG ulStreamNumber;
1472 ULONG ulNumActive;
1473 CLSID clsidEngine;
1474 ULONG cLangIDs;
1475 LANGID aLangID[SP_MAX_LANGIDS];
1476 ULONGLONG ullRecognitionStreamTime;
1477} SPRECOGNIZERSTATUS;
1478
1479typedef [hidden] enum SPWAVEFORMATTYPE {
1480 SPWF_INPUT,
1481 SPWF_SRENGINE
1482} SPSTREAMFORMATTYPE;
1483
1484typedef [hidden] enum SPRECOSTATE {
1485 SPRST_INACTIVE,
1486 SPRST_ACTIVE,
1487 SPRST_ACTIVE_ALWAYS,
1488 SPRST_INACTIVE_WITH_PURGE,
1489 SPRST_NUM_STATES
1490} SPRECOSTATE;
1491
1492#if _SAPI_BLD_ >= 0x54
1493typedef enum SPCATEGORYTYPE {
1494 SPCT_COMMAND,
1495 SPCT_DICTATION,
1496 SPCT_SLEEP,
1497 SPCT_SUB_COMMAND,
1498 SPCT_SUB_DICTATION
1499} SPCATEGORYTYPE;
1500#endif
1501
1502[object, local, uuid (C2B5F241-DAA0-4507-9e16-5a1eaa2b7a5c), pointer_default (unique), restricted]
1503interface ISpRecognizer : ISpProperties {
1504 HRESULT SetRecognizer ([in] ISpObjectToken *pRecognizer);
1505 HRESULT GetRecognizer ([out] ISpObjectToken **ppRecognizer);
1506 HRESULT SetInput ([in] IUnknown *pUnkInput,[in] WINBOOL fAllowFormatChanges);
1507 HRESULT GetInputObjectToken ([out] ISpObjectToken **ppToken);
1508 HRESULT GetInputStream ([out] ISpStreamFormat **ppStream);
1509 HRESULT CreateRecoContext ([out] ISpRecoContext **ppNewCtxt);
1510 HRESULT GetRecoProfile ([out] ISpObjectToken **ppToken);
1511 HRESULT SetRecoProfile ([in] ISpObjectToken *pToken);
1512 HRESULT IsSharedInstance (void);
1513 HRESULT GetRecoState ([out] SPRECOSTATE *pState);
1514 HRESULT SetRecoState ([in] SPRECOSTATE NewState);
1515 HRESULT GetStatus ([out] SPRECOGNIZERSTATUS *pStatus);
1516 HRESULT GetFormat ([in] SPSTREAMFORMATTYPE WaveFormatType,[out] GUID *pFormatId,[out] WAVEFORMATEX **ppCoMemWFEX);
1517 [local] HRESULT IsUISupported ([in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData,[out] WINBOOL *pfSupported);
1518 [local] HRESULT DisplayUI ([in] HWND hwndParent,[in] LPCWSTR pszTitle,[in] LPCWSTR pszTypeOfUI,[in] void *pvExtraData,[in] ULONG cbExtraData);
1519 HRESULT EmulateRecognition ([in] ISpPhrase *pPhrase);
1520};
1521
1522#if _SAPI_BLD_ >= 0x53
1523[object, uuid (21b501a0-0ec7-46c9-92c3-A2BC784C54B9), pointer_default (unique), restricted]
1524interface ISpSerializeState : IUnknown {
1525 HRESULT GetSerializedState ([out] BYTE **ppbData,[out] ULONG *pulSize,[in] DWORD dwReserved);
1526 HRESULT SetSerializedState ([in] BYTE *pbData,[in] ULONG ulSize,[in] DWORD dwReserved);
1527};
1528
1529[object, local, uuid (8fc6d974-C81E-4098-93c5-0147f61ed4d3), pointer_default (unique), restricted]
1530interface ISpRecognizer2 : IUnknown {
1531 HRESULT EmulateRecognitionEx ([in] ISpPhrase *pPhrase,[in] DWORD dwCompareFlags);
1532 HRESULT SetTrainingState ([in] WINBOOL fDoingTraining,[in] WINBOOL fAdaptFromTrainingData);
1533 HRESULT ResetAcousticModelAdaptation ();
1534}
1535
1536#if _SAPI_BLD_ >= 0x54
1537[object, local, uuid (DA0CD0F9-14a2-4f09-8c2a-85cc48979345), pointer_default (unique), restricted]
1538interface ISpRecoCategory : IUnknown {
1539 HRESULT GetType ([out] SPCATEGORYTYPE *peCategoryType);
1540}
1541
1542[object, local, uuid (DF1B943C-5838-4aa2-8706-D7CD5B333499), pointer_default (unique), restricted]
1543interface ISpRecognizer3 : IUnknown {
1544 HRESULT GetCategory ([in] SPCATEGORYTYPE categoryType,[out] ISpRecoCategory **ppCategory);
1545 HRESULT SetActiveCategory ([in] ISpRecoCategory *pCategory);
1546 HRESULT GetActiveCategory ([out] ISpRecoCategory **ppCategory);
1547}
1548#endif
1549
1550typedef [restricted, hidden] struct SPNORMALIZATIONLIST {
1551 ULONG ulSize;
1552 WCHAR **ppszzNormalizedList;
1553} SPNORMALIZATIONLIST;
1554
1555[object, local, uuid (C360CE4B-76d1-4214-AD68-52657d5083da), pointer_default (unique), restricted]
1556interface ISpEnginePronunciation : IUnknown {
1557 HRESULT Normalize ([in, string] LPCWSTR pszWord,[in, string] LPCWSTR pszLeftContext,[in, string] LPCWSTR pszRightContext,[in] LANGID LangID,[out] SPNORMALIZATIONLIST *pNormalizationList);
1558 HRESULT GetPronunciations ([in, string] LPCWSTR pszWord,[in, string] LPCWSTR pszLeftContext,[in, string] LPCWSTR pszRightContext,[in] LANGID LangID,[in, out] SPWORDPRONUNCIATIONLIST *pEnginePronunciationList);
1559}
1560
1561typedef [restricted, hidden] struct SPDISPLAYTOKEN {
1562 const WCHAR *pszLexical;
1563 const WCHAR *pszDisplay;
1564 BYTE bDisplayAttributes;
1565} SPDISPLAYTOKEN;
1566
1567typedef [restricted, hidden] struct SPDISPLAYPHRASE {
1568 ULONG ulNumTokens;
1569 SPDISPLAYTOKEN *pTokens;
1570} SPDISPLAYPHRASE;
1571
1572[object, local, uuid (C8D7C7E2-0dde-44b7-AFE3-B0C991FBEB5E), pointer_default (unique)]
1573interface ISpDisplayAlternates : IUnknown {
1574 HRESULT GetDisplayAlternates ([in] const SPDISPLAYPHRASE *pPhrase,[in] ULONG cRequestCount,[out] SPDISPLAYPHRASE **ppCoMemPhrases,[out] ULONG *pcPhrasesReturned);
1575 HRESULT SetFullStopTrailSpace ([in] ULONG ulTrailSpace);
1576}
1577#endif
1578
1579[uuid (C866CA3A-32f7-11d2-9602-00c04f8ee628), version (5.4)]
1580library SpeechLib {
1581 importlib ("stdole32.tlb");
1582 importlib ("stdole2.tlb");
1583
1584interface ISpeechDataKey;
1585interface ISpeechObjectToken;
1586interface ISpeechObjectTokens;
1587interface ISpeechObjectTokenCategory;
1588interface ISpeechAudioBufferInfo;
1589interface ISpeechAudioStatus;
1590interface ISpeechAudioFormat;
1591interface ISpeechWaveFormatEx;
1592interface ISpeechBaseStream;
1593interface ISpeechFileStream;
1594interface ISpeechMemoryStream;
1595interface ISpeechCustomStream;
1596interface ISpeechAudio;
1597interface ISpeechMMSysAudio;
1598interface ISpeechVoice;
1599interface ISpeechVoiceStatus;
1600dispinterface _ISpeechVoiceEvents;
1601interface ISpeechRecognizer;
1602interface ISpeechRecognizerStatus;
1603interface ISpeechRecoContext;
1604interface ISpeechRecoGrammar;
1605dispinterface _ISpeechRecoContextEvents;
1606interface ISpeechGrammarRule;
1607interface ISpeechGrammarRules;
1608interface ISpeechGrammarRuleState;
1609interface ISpeechGrammarRuleStateTransition;
1610interface ISpeechGrammarRuleStateTransitions;
1611interface ISpeechTextSelectionInformation;
1612interface ISpeechRecoResult;
1613#if _SAPI_BLD_ >= 0x53
1614interface ISpeechRecoResult2;
1615#endif
1616interface ISpeechRecoResultTimes;
1617interface ISpeechPhraseAlternate;
1618interface ISpeechPhraseAlternates;
1619interface ISpeechPhraseInfo;
1620interface ISpeechPhraseElement;
1621interface ISpeechPhraseElements;
1622interface ISpeechPhraseReplacement;
1623interface ISpeechPhraseReplacements;
1624interface ISpeechPhraseProperty;
1625interface ISpeechPhraseProperties;
1626interface ISpeechPhraseRule;
1627interface ISpeechPhraseRules;
1628interface ISpeechLexicon;
1629interface ISpeechLexiconWords;
1630interface ISpeechLexiconWord;
1631interface ISpeechLexiconPronunciations;
1632interface ISpeechLexiconPronunciation;
1633
1634typedef long SpeechLanguageId;
1635cpp_quote("#define __SpeechStringConstants_MODULE_DEFINED__")
1636[uuid (E58442E4-0c80-402c-9559-867337a39765)] module SpeechStringConstants {
1637 const BSTR SpeechRegistryUserRoot = L"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech";
1638 const BSTR SpeechRegistryLocalMachineRoot = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech";
1639 const BSTR SpeechCategoryAudioOut = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioOutput";
1640 const BSTR SpeechCategoryAudioIn = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioInput";
1641 const BSTR SpeechCategoryVoices = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices";
1642 const BSTR SpeechCategoryRecognizers = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Recognizers";
1643 const BSTR SpeechCategoryAppLexicons = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AppLexicons";
1644 const BSTR SpeechCategoryPhoneConverters = L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\PhoneConverters";
1645 const BSTR SpeechCategoryRecoProfiles = L"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\RecoProfiles";
1646 const BSTR SpeechTokenIdUserLexicon = L"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\CurrentUserLexicon";
1647 const BSTR SpeechTokenValueCLSID = L"CLSID";
1648 const BSTR SpeechTokenKeyFiles = L"Files";
1649 const BSTR SpeechTokenKeyUI = L"UI";
1650 const BSTR SpeechTokenKeyAttributes = L"Attributes";
1651 const BSTR SpeechVoiceCategoryTTSRate = L"DefaultTTSRate";
1652 const BSTR SpeechPropertyResourceUsage = L"ResourceUsage";
1653 const BSTR SpeechPropertyHighConfidenceThreshold = L"HighConfidenceThreshold";
1654 const BSTR SpeechPropertyNormalConfidenceThreshold = L"NormalConfidenceThreshold";
1655 const BSTR SpeechPropertyLowConfidenceThreshold = L"LowConfidenceThreshold";
1656 const BSTR SpeechPropertyResponseSpeed = L"ResponseSpeed";
1657 const BSTR SpeechPropertyComplexResponseSpeed = L"ComplexResponseSpeed";
1658 const BSTR SpeechPropertyAdaptationOn = L"AdaptationOn";
1659 const BSTR SpeechDictationTopicSpelling = L"Spelling";
1660 const BSTR SpeechGrammarTagWildcard = L"...";
1661 const BSTR SpeechGrammarTagDictation = L"*";
1662 const BSTR SpeechGrammarTagUnlimitedDictation = L"*+";
1663 const BSTR SpeechEngineProperties = L"EngineProperties";
1664 const BSTR SpeechAddRemoveWord = L"AddRemoveWord";
1665 const BSTR SpeechUserTraining = L"UserTraining";
1666 const BSTR SpeechMicTraining = L"MicTraining";
1667 const BSTR SpeechRecoProfileProperties = L"RecoProfileProperties";
1668 const BSTR SpeechAudioProperties = L"AudioProperties";
1669 const BSTR SpeechAudioVolume = L"AudioVolume";
1670 const BSTR SpeechVoiceSkipTypeSentence = L"Sentence";
1671 const BSTR SpeechAudioFormatGUIDWave = L"{C31ADBAE-527F-4ff5-A230-F62BB61FF70C}";
1672 const BSTR SpeechAudioFormatGUIDText = L"{7CEEF9F9-3D13-11d2-9EE7-00C04F797396}";
1673};
1674[uuid (F3E092B2-6bdc-410f-BCB2-4c5ed4424180)] module SpeechConstants {
1675 const float Speech_Default_Weight = DEFAULT_WEIGHT;
1676 const LONG Speech_Max_Word_Length = SP_MAX_WORD_LENGTH;
1677 const LONG Speech_Max_Pron_Length = SP_MAX_PRON_LENGTH;
1678 const LONG Speech_StreamPos_Asap = SP_STREAMPOS_ASAP;
1679 const LONG Speech_StreamPos_RealTime = SP_STREAMPOS_REALTIME;
1680 const LONG SpeechAllElements = SPPR_ALL_ELEMENTS;
1681};
1682
1683typedef [hidden] enum DISPID_SpeechDataKey {
1684 DISPID_SDKSetBinaryValue = 1,
1685 DISPID_SDKGetBinaryValue,
1686 DISPID_SDKSetStringValue,
1687 DISPID_SDKGetStringValue,
1688 DISPID_SDKSetLongValue,
1689 DISPID_SDKGetlongValue,
1690 DISPID_SDKOpenKey,
1691 DISPID_SDKCreateKey,
1692 DISPID_SDKDeleteKey,
1693 DISPID_SDKDeleteValue,
1694 DISPID_SDKEnumKeys,
1695 DISPID_SDKEnumValues
1696} DISPID_SpeechDataKey;
1697
1698typedef [hidden] enum DISPID_SpeechObjectToken {
1699 DISPID_SOTId = 1,
1700 DISPID_SOTDataKey,
1701 DISPID_SOTCategory,
1702 DISPID_SOTGetDescription,
1703 DISPID_SOTSetId,
1704 DISPID_SOTGetAttribute,
1705 DISPID_SOTCreateInstance,
1706 DISPID_SOTRemove,
1707 DISPID_SOTGetStorageFileName,
1708 DISPID_SOTRemoveStorageFileName,
1709 DISPID_SOTIsUISupported,
1710 DISPID_SOTDisplayUI,
1711 DISPID_SOTMatchesAttributes
1712} DISPID_SpeechObjectToken;
1713
1714typedef enum SpeechDataKeyLocation {
1715 SDKLDefaultLocation = SPDKL_DefaultLocation,
1716 SDKLCurrentUser = SPDKL_CurrentUser,
1717 SDKLLocalMachine = SPDKL_LocalMachine,
1718 SDKLCurrentConfig = SPDKL_CurrentConfig
1719} SpeechDataKeyLocation;
1720
1721#define CLSCTXALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
1722
1723typedef enum SpeechTokenContext {
1724 STCInprocServer = CLSCTX_INPROC_SERVER,
1725 STCInprocHandler = CLSCTX_INPROC_HANDLER,
1726 STCLocalServer = CLSCTX_LOCAL_SERVER,
1727 STCRemoteServer = CLSCTX_REMOTE_SERVER,
1728 STCAll = CLSCTXALL
1729} SpeechTokenContext;
1730
1731typedef enum SpeechTokenShellFolder {
1732 STSF_AppData = 0x001a,
1733 STSF_LocalAppData = 0x001c,
1734 STSF_CommonAppData = 0x0023,
1735 STSF_FlagCreate = 0x8000
1736} SpeechTokenShellFolder;
1737
1738typedef [hidden] enum DISPID_SpeechObjectTokens {
1739 DISPID_SOTsCount = 1,
1740 DISPID_SOTsItem = DISPID_VALUE,
1741 DISPID_SOTs_NewEnum = DISPID_NEWENUM
1742} DISPID_SpeechObjectTokens;
1743
1744typedef [hidden] enum DISPID_SpeechObjectTokenCategory {
1745 DISPID_SOTCId = 1,
1746 DISPID_SOTCDefault,
1747 DISPID_SOTCSetId,
1748 DISPID_SOTCGetDataKey,
1749 DISPID_SOTCEnumerateTokens,
1750} DISPID_SpeechObjectTokenCategory;
1751
1752[object, uuid (CE17C09B-4efa-44d5-A4C9-59d9585ab0cd), dual, pointer_default (unique)]
1753interface ISpeechDataKey : IDispatch {
1754 [id (DISPID_SDKSetBinaryValue)] HRESULT SetBinaryValue ([in]const BSTR ValueName,[in]VARIANT Value);
1755 [id (DISPID_SDKGetBinaryValue)] HRESULT GetBinaryValue ([in]const BSTR ValueName,[out, retval]VARIANT *Value);
1756 [id (DISPID_SDKSetStringValue)] HRESULT SetStringValue ([in]const BSTR ValueName,[in]const BSTR Value);
1757 [id (DISPID_SDKGetStringValue)] HRESULT GetStringValue ([in]const BSTR ValueName,[out, retval]BSTR *Value);
1758 [id (DISPID_SDKSetLongValue)] HRESULT SetLongValue ([in]const BSTR ValueName,[in]long Value);
1759 [id (DISPID_SDKGetlongValue)] HRESULT GetLongValue ([in]const BSTR ValueName,[out, retval]long *Value);
1760 [id (DISPID_SDKOpenKey)] HRESULT OpenKey ([in]const BSTR SubKeyName,[out, retval]ISpeechDataKey **SubKey);
1761 [id (DISPID_SDKCreateKey)] HRESULT CreateKey ([in]const BSTR SubKeyName,[out, retval]ISpeechDataKey **SubKey);
1762 [id (DISPID_SDKDeleteKey)] HRESULT DeleteKey ([in]const BSTR SubKeyName);
1763 [id (DISPID_SDKDeleteValue)] HRESULT DeleteValue ([in]const BSTR ValueName);
1764 [id (DISPID_SDKEnumKeys)] HRESULT EnumKeys ([in]long Index,[out, retval]BSTR *SubKeyName);
1765 [id (DISPID_SDKEnumValues)] HRESULT EnumValues ([in]long Index,[out, retval]BSTR *ValueName);
1766};
1767
1768[object, uuid (C74A3ADC-B727-4500-A84A-B526721C8B8C), dual, pointer_default (unique)]
1769interface ISpeechObjectToken : IDispatch {
1770 [propget, id (DISPID_SOTId)] HRESULT Id ([out, retval]BSTR *ObjectId);
1771 [propget, id (DISPID_SOTDataKey), hidden] HRESULT DataKey ([out, retval]ISpeechDataKey **DataKey);
1772 [propget, id (DISPID_SOTCategory)] HRESULT Category ([out, retval]ISpeechObjectTokenCategory **Category);
1773 [id (DISPID_SOTGetDescription)] HRESULT GetDescription ([in, defaultvalue (0)]long Locale,[out, retval]BSTR *Description);
1774 [hidden, id (DISPID_SOTSetId)] HRESULT SetId ([in] BSTR Id,[in, defaultvalue (L"")] BSTR CategoryID,[in, defaultvalue (0)]VARIANT_BOOL CreateIfNotExist);
1775 [id (DISPID_SOTGetAttribute)] HRESULT GetAttribute ([in] BSTR AttributeName,[out, retval]BSTR *AttributeValue);
1776 [id (DISPID_SOTCreateInstance)] HRESULT CreateInstance ([in, defaultvalue (NULL)] IUnknown *pUnkOuter,[in, defaultvalue (STCAll)] SpeechTokenContext ClsContext,[out, retval]IUnknown **Object);
1777 [hidden, id (DISPID_SOTRemove)] HRESULT Remove ([in]BSTR ObjectStorageCLSID);
1778 [hidden, id (DISPID_SOTGetStorageFileName)] HRESULT GetStorageFileName ([in]BSTR ObjectStorageCLSID,[in]BSTR KeyName,[in]BSTR FileName,[in]SpeechTokenShellFolder Folder,[out, retval]BSTR *FilePath);
1779 [hidden, id (DISPID_SOTRemoveStorageFileName)] HRESULT RemoveStorageFileName ([in]BSTR ObjectStorageCLSID,[in]BSTR KeyName,[in]VARIANT_BOOL DeleteFile);
1780 [hidden, id (DISPID_SOTIsUISupported)] HRESULT IsUISupported ([in]const BSTR TypeOfUI,[in, defaultvalue (NULL)]const VARIANT *ExtraData,[in, defaultvalue (NULL)]IUnknown *Object,[out, retval] VARIANT_BOOL *Supported);
1781 [hidden, id (DISPID_SOTDisplayUI)] HRESULT DisplayUI ([in]long hWnd,[in]BSTR Title,[in]const BSTR TypeOfUI,[in, defaultvalue (NULL)]const VARIANT *ExtraData,[in, defaultvalue (NULL)]IUnknown *Object);
1782 [id (DISPID_SOTMatchesAttributes)] HRESULT MatchesAttributes ([in]BSTR Attributes,[out, retval] VARIANT_BOOL *Matches);
1783};
1784
1785[object, uuid (9285b776-2e7b-4bc0-B53E-580eb6fa967f), dual, pointer_default (unique)]
1786interface ISpeechObjectTokens : IDispatch {
1787 [propget, id (DISPID_SOTsCount)] HRESULT Count ([out, retval] long *Count);
1788 [id (DISPID_VALUE)] HRESULT Item ([in] long Index,[out, retval]ISpeechObjectToken **Token);
1789 [propget, restricted, id (DISPID_NEWENUM)] HRESULT _NewEnum ([out, retval] IUnknown **ppEnumVARIANT);
1790};
1791
1792[object, uuid (CA7EAC50-2d01-4145-86d4-5ae7d70f4469), dual, pointer_default (unique)]
1793interface ISpeechObjectTokenCategory : IDispatch {
1794 [propget, id (DISPID_SOTCId)] HRESULT Id ([out, retval] BSTR *Id);
1795 [propput, id (DISPID_SOTCDefault)] HRESULT Default ([in] const BSTR TokenId);
1796 [propget, id (DISPID_SOTCDefault)] HRESULT Default ([out, retval] BSTR *TokenId);
1797 [id (DISPID_SOTCSetId)] HRESULT SetId ([in] const BSTR Id,[in, defaultvalue (0)]VARIANT_BOOL CreateIfNotExist);
1798 [hidden, id (DISPID_SOTCGetDataKey)] HRESULT GetDataKey ([in, defaultvalue (SDKLDefaultLocation)]SpeechDataKeyLocation Location,[out, retval]ISpeechDataKey **DataKey);
1799 [id (DISPID_SOTCEnumerateTokens)] HRESULT EnumerateTokens ([in, defaultvalue (L"")]BSTR RequiredAttributes,[in, defaultvalue (L"")]BSTR OptionalAttributes,[out, retval]ISpeechObjectTokens **Tokens);
1800};
1801
1802typedef enum SpeechAudioFormatType {
1803 SAFTDefault = -1,
1804 SAFTNoAssignedFormat = 0,
1805 SAFTText,
1806 SAFTNonStandardFormat,
1807 SAFTExtendedAudioFormat,
1808 SAFT8kHz8BitMono,
1809 SAFT8kHz8BitStereo,
1810 SAFT8kHz16BitMono,
1811 SAFT8kHz16BitStereo,
1812 SAFT11kHz8BitMono,
1813 SAFT11kHz8BitStereo,
1814 SAFT11kHz16BitMono,
1815 SAFT11kHz16BitStereo,
1816 SAFT12kHz8BitMono,
1817 SAFT12kHz8BitStereo,
1818 SAFT12kHz16BitMono,
1819 SAFT12kHz16BitStereo,
1820 SAFT16kHz8BitMono,
1821 SAFT16kHz8BitStereo,
1822 SAFT16kHz16BitMono,
1823 SAFT16kHz16BitStereo,
1824 SAFT22kHz8BitMono,
1825 SAFT22kHz8BitStereo,
1826 SAFT22kHz16BitMono,
1827 SAFT22kHz16BitStereo,
1828 SAFT24kHz8BitMono,
1829 SAFT24kHz8BitStereo,
1830 SAFT24kHz16BitMono,
1831 SAFT24kHz16BitStereo,
1832 SAFT32kHz8BitMono,
1833 SAFT32kHz8BitStereo,
1834 SAFT32kHz16BitMono,
1835 SAFT32kHz16BitStereo,
1836 SAFT44kHz8BitMono,
1837 SAFT44kHz8BitStereo,
1838 SAFT44kHz16BitMono,
1839 SAFT44kHz16BitStereo,
1840 SAFT48kHz8BitMono,
1841 SAFT48kHz8BitStereo,
1842 SAFT48kHz16BitMono,
1843 SAFT48kHz16BitStereo,
1844 SAFTTrueSpeech_8kHz1BitMono,
1845 SAFTCCITT_ALaw_8kHzMono,
1846 SAFTCCITT_ALaw_8kHzStereo,
1847 SAFTCCITT_ALaw_11kHzMono,
1848 SAFTCCITT_ALaw_11kHzStereo,
1849 SAFTCCITT_ALaw_22kHzMono,
1850 SAFTCCITT_ALaw_22kHzStereo,
1851 SAFTCCITT_ALaw_44kHzMono,
1852 SAFTCCITT_ALaw_44kHzStereo,
1853
1854 SAFTCCITT_uLaw_8kHzMono,
1855 SAFTCCITT_uLaw_8kHzStereo,
1856 SAFTCCITT_uLaw_11kHzMono,
1857 SAFTCCITT_uLaw_11kHzStereo,
1858 SAFTCCITT_uLaw_22kHzMono,
1859 SAFTCCITT_uLaw_22kHzStereo,
1860 SAFTCCITT_uLaw_44kHzMono,
1861 SAFTCCITT_uLaw_44kHzStereo,
1862
1863 SAFTADPCM_8kHzMono,
1864 SAFTADPCM_8kHzStereo,
1865 SAFTADPCM_11kHzMono,
1866 SAFTADPCM_11kHzStereo,
1867 SAFTADPCM_22kHzMono,
1868 SAFTADPCM_22kHzStereo,
1869 SAFTADPCM_44kHzMono,
1870 SAFTADPCM_44kHzStereo,
1871 SAFTGSM610_8kHzMono,
1872 SAFTGSM610_11kHzMono,
1873 SAFTGSM610_22kHzMono,
1874 SAFTGSM610_44kHzMono,
1875} SpeechAudioFormatType;
1876
1877typedef [hidden] enum DISPID_SpeechAudioFormat {
1878 DISPID_SAFType = 1,
1879 DISPID_SAFGuid,
1880 DISPID_SAFGetWaveFormatEx,
1881 DISPID_SAFSetWaveFormatEx
1882} DISPID_SpeechAudioFormat;
1883
1884typedef [hidden] enum DISPID_SpeechBaseStream {
1885 DISPID_SBSFormat = 1,
1886 DISPID_SBSRead,
1887 DISPID_SBSWrite,
1888 DISPID_SBSSeek
1889} DISPID_SpeechBaseStream;
1890
1891typedef enum SpeechStreamSeekPositionType {
1892 SSSPTRelativeToStart = STREAM_SEEK_SET,
1893 SSSPTRelativeToCurrentPosition = STREAM_SEEK_CUR,
1894 SSSPTRelativeToEnd = STREAM_SEEK_END
1895} SpeechStreamSeekPositionType;
1896
1897typedef [hidden] enum DISPID_SpeechAudio {
1898 DISPID_SAStatus = 200,
1899 DISPID_SABufferInfo,
1900 DISPID_SADefaultFormat,
1901 DISPID_SAVolume,
1902 DISPID_SABufferNotifySize,
1903 DISPID_SAEventHandle,
1904 DISPID_SASetState
1905} DISPID_SpeechAudio;
1906
1907typedef enum SpeechAudioState {
1908 SASClosed = SPAS_CLOSED,
1909 SASStop = SPAS_STOP,
1910 SASPause = SPAS_PAUSE,
1911 SASRun = SPAS_RUN
1912} SpeechAudioState;
1913
1914typedef [hidden] enum DISPID_SpeechMMSysAudio {
1915 DISPID_SMSADeviceId = 300,
1916 DISPID_SMSALineId,
1917 DISPID_SMSAMMHandle
1918} DISPID_SpeechMMSysAudio;
1919
1920typedef [hidden] enum DISPID_SpeechFileStream {
1921 DISPID_SFSOpen = 100,
1922 DISPID_SFSClose
1923} DISPID_SpeechFileStream;
1924
1925typedef enum SpeechStreamFileMode {
1926 SSFMOpenForRead = SPFM_OPEN_READONLY,
1927 SSFMOpenReadWrite = SPFM_OPEN_READWRITE,
1928 SSFMCreate = SPFM_CREATE,
1929 SSFMCreateForWrite = SPFM_CREATE_ALWAYS,
1930} SpeechStreamFileMode;
1931
1932typedef [hidden] enum DISPID_SpeechCustomStream {
1933 DISPID_SCSBaseStream = 100
1934} DISPID_SpeechCustomStream;
1935
1936typedef [hidden] enum DISPID_SpeechMemoryStream {
1937 DISPID_SMSSetData = 100,
1938 DISPID_SMSGetData
1939} DISPID_SpeechMemoryStream;
1940
1941typedef [hidden] enum DISPID_SpeechAudioStatus {
1942 DISPID_SASFreeBufferSpace = 1,
1943 DISPID_SASNonBlockingIO,
1944 DISPID_SASState,
1945 DISPID_SASCurrentSeekPosition,
1946 DISPID_SASCurrentDevicePosition
1947} DISPID_SpeechAudioStatus;
1948
1949typedef [hidden] enum DISPID_SpeechAudioBufferInfo {
1950 DISPID_SABIMinNotification = 1,
1951 DISPID_SABIBufferSize,
1952 DISPID_SABIEventBias
1953} DISPID_SpeechAudioBufferInfo;
1954
1955typedef [hidden] enum DISPID_SpeechWaveFormatEx {
1956 DISPID_SWFEFormatTag = 1,
1957 DISPID_SWFEChannels,
1958 DISPID_SWFESamplesPerSec,
1959 DISPID_SWFEAvgBytesPerSec,
1960 DISPID_SWFEBlockAlign,
1961 DISPID_SWFEBitsPerSample,
1962 DISPID_SWFEExtraData
1963} DISPID_SpeechWaveFormatEx;
1964
1965typedef [hidden] enum DISPID_SpeechVoice {
1966 DISPID_SVStatus = 1,
1967 DISPID_SVVoice,
1968 DISPID_SVAudioOutput,
1969 DISPID_SVAudioOutputStream,
1970 DISPID_SVRate,
1971 DISPID_SVVolume,
1972 DISPID_SVAllowAudioOuputFormatChangesOnNextSet,
1973 DISPID_SVEventInterests,
1974 DISPID_SVPriority,
1975 DISPID_SVAlertBoundary,
1976 DISPID_SVSyncronousSpeakTimeout,
1977 DISPID_SVSpeak,
1978 DISPID_SVSpeakStream,
1979 DISPID_SVPause,
1980 DISPID_SVResume,
1981 DISPID_SVSkip,
1982 DISPID_SVGetVoices,
1983 DISPID_SVGetAudioOutputs,
1984 DISPID_SVWaitUntilDone,
1985 DISPID_SVSpeakCompleteEvent,
1986 DISPID_SVIsUISupported,
1987 DISPID_SVDisplayUI
1988} DISPID_SpeechVoice;
1989
1990typedef enum SpeechVoicePriority {
1991 SVPNormal = SPVPRI_NORMAL,
1992 SVPAlert = SPVPRI_ALERT,
1993 SVPOver = SPVPRI_OVER
1994} SpeechVoicePriority;
1995
1996typedef enum SpeechVoiceSpeakFlags {
1997 SVSFDefault = SPF_DEFAULT,
1998 SVSFlagsAsync = SPF_ASYNC,
1999 SVSFPurgeBeforeSpeak = SPF_PURGEBEFORESPEAK,
2000 SVSFIsFilename = SPF_IS_FILENAME,
2001 SVSFIsXML = SPF_IS_XML,
2002 SVSFIsNotXML = SPF_IS_NOT_XML,
2003 SVSFPersistXML = SPF_PERSIST_XML,
2004 SVSFNLPSpeakPunc = SPF_NLP_SPEAK_PUNC,
2005#if _SAPI_BLD_ >= 0x53
2006 SVSFParseSapi = SPF_PARSE_SAPI,
2007 SVSFParseSsml = SPF_PARSE_SSML,
2008 SVSFParseAutodetect = SPF_PARSE_AUTODETECT,
2009#endif
2010 SVSFNLPMask = SPF_NLP_MASK,
2011#if _SAPI_BLD_ >= 0x53
2012 SVSFParseMask = SPF_PARSE_MASK,
2013#endif
2014 SVSFVoiceMask = SPF_VOICE_MASK,
2015 SVSFUnusedFlags = SPF_UNUSED_FLAGS,
2016} SpeechVoiceSpeakFlags;
2017
2018typedef enum SpeechVoiceEvents {
2019 SVEStartInputStream = 0x2,
2020 SVEEndInputStream = 0x4,
2021 SVEVoiceChange = 0x8,
2022 SVEBookmark = 0x10,
2023 SVEWordBoundary = 0x20,
2024 SVEPhoneme = 0x40,
2025 SVESentenceBoundary = 0x80,
2026 SVEViseme = 0x100,
2027 SVEAudioLevel = 0x200,
2028 SVEPrivate = 0x8000,
2029 SVEAllEvents = 0x83fe
2030} SpeechVoiceEvents;
2031
2032typedef [hidden] enum DISPID_SpeechVoiceStatus {
2033 DISPID_SVSCurrentStreamNumber = 1,
2034 DISPID_SVSLastStreamNumberQueued,
2035 DISPID_SVSLastResult,
2036 DISPID_SVSRunningState,
2037 DISPID_SVSInputWordPosition,
2038 DISPID_SVSInputWordLength,
2039 DISPID_SVSInputSentencePosition,
2040 DISPID_SVSInputSentenceLength,
2041 DISPID_SVSLastBookmark,
2042 DISPID_SVSLastBookmarkId,
2043 DISPID_SVSPhonemeId,
2044 DISPID_SVSVisemeId
2045} DISPID_SpeechVoiceStatus;
2046
2047typedef enum SpeechRunState {
2048 SRSEDone = SPRS_DONE,
2049 SRSEIsSpeaking = SPRS_IS_SPEAKING
2050} SpeechRunState;
2051
2052[object, uuid (E6E9C590-3e18-40e3-8299-061f98bde7c7), dual, pointer_default (unique)]
2053interface ISpeechAudioFormat : IDispatch {
2054 [propget, id (DISPID_SAFType)] HRESULT Type ([out, retval]SpeechAudioFormatType *AudioFormat);
2055 [propput, id (DISPID_SAFType)] HRESULT Type ([in]SpeechAudioFormatType AudioFormat);
2056 [propget, hidden, id (DISPID_SAFGuid)] HRESULT Guid ([out, retval]BSTR *Guid);
2057 [propput, hidden, id (DISPID_SAFGuid)] HRESULT Guid ([in]BSTR Guid);
2058 [hidden, id (DISPID_SAFGetWaveFormatEx)] HRESULT GetWaveFormatEx ([out, retval]ISpeechWaveFormatEx **SpeechWaveFormatEx);
2059 [hidden, id (DISPID_SAFSetWaveFormatEx)] HRESULT SetWaveFormatEx ([in]ISpeechWaveFormatEx *SpeechWaveFormatEx);
2060}
2061
2062[object, uuid (6450336f-7d49-4ced-8097-49d6dee37294), dual, pointer_default (unique)]
2063interface ISpeechBaseStream : IDispatch {
2064 [propget, id (DISPID_SBSFormat)] HRESULT Format ([out, retval]ISpeechAudioFormat **AudioFormat);
2065 [propputref, id (DISPID_SBSFormat)] HRESULT Format ([in]ISpeechAudioFormat *AudioFormat);
2066 [id (DISPID_SBSRead)] HRESULT Read ([out]VARIANT *Buffer,[in]long NumberOfBytes,[out, retval]long *BytesRead);
2067 [id (DISPID_SBSWrite)] HRESULT Write ([in]VARIANT Buffer,[out, retval]long *BytesWritten);
2068 [id (DISPID_SBSSeek)] HRESULT Seek ([in]VARIANT Position,[in, defaultvalue (SSSPTRelativeToStart)]SpeechStreamSeekPositionType Origin,[out, retval]VARIANT *NewPosition);
2069};
2070
2071[object, uuid (CFF8E175-019e-11d3-A08E-00c04f8ef9b5), dual, pointer_default (unique)]
2072interface ISpeechAudio : ISpeechBaseStream {
2073 [propget, id (DISPID_SAStatus)] HRESULT Status ([out, retval]ISpeechAudioStatus **Status);
2074 [propget, id (DISPID_SABufferInfo)] HRESULT BufferInfo ([out, retval]ISpeechAudioBufferInfo **BufferInfo);
2075 [propget, id (DISPID_SADefaultFormat)] HRESULT DefaultFormat ([out, retval]ISpeechAudioFormat **StreamFormat);
2076 [propget, id (DISPID_SAVolume)] HRESULT Volume ([out, retval]long *Volume);
2077 [propput, id (DISPID_SAVolume)] HRESULT Volume ([in]long Volume);
2078 [propget, id (DISPID_SABufferNotifySize)] HRESULT BufferNotifySize ([out, retval]long *BufferNotifySize);
2079 [propput, id (DISPID_SABufferNotifySize)] HRESULT BufferNotifySize ([in]long BufferNotifySize);
2080 [propget, hidden, id (DISPID_SAEventHandle)] HRESULT EventHandle ([out, retval]long *EventHandle);
2081 [id (DISPID_SASetState), hidden] HRESULT SetState ([in] SpeechAudioState State);
2082};
2083
2084[object, uuid (3c76af6d-1fd7-4831-81d1-3b71d5a13c44), dual, pointer_default (unique)]
2085interface ISpeechMMSysAudio : ISpeechAudio {
2086 [propget, id (DISPID_SMSADeviceId)] HRESULT DeviceId ([out, retval] long *DeviceId);
2087 [propput, id (DISPID_SMSADeviceId)] HRESULT DeviceId ([in] long DeviceId);
2088 [propget, id (DISPID_SMSALineId)] HRESULT LineId ([out, retval] long *LineId);
2089 [propput, id (DISPID_SMSALineId)] HRESULT LineId ([in] long LineId);
2090 [propget, hidden, id (DISPID_SMSAMMHandle)] HRESULT MMHandle ([out, retval] long *Handle);
2091};
2092
2093[object, uuid (AF67F125-AB39-4e93-B4A2-CC2E66E182A7), dual, pointer_default (unique)]
2094interface ISpeechFileStream : ISpeechBaseStream {
2095 [id (DISPID_SFSOpen)] HRESULT Open ([in] BSTR FileName,[in, defaultvalue (SSFMOpenForRead)] SpeechStreamFileMode FileMode,[in, defaultvalue (0)]VARIANT_BOOL DoEvents);
2096 [id (DISPID_SFSClose)] HRESULT Close (void);
2097};
2098
2099[object, uuid (1a9e9f4f-104f-4db8-A115-EFD7FD0C97AE), dual, pointer_default (unique)]
2100interface ISpeechCustomStream : ISpeechBaseStream {
2101 [propget, id (DISPID_SCSBaseStream)] HRESULT BaseStream ([out, retval] IUnknown **ppUnkStream);
2102 [propputref, id (DISPID_SCSBaseStream)] HRESULT BaseStream ([in] IUnknown *pUnkStream);
2103};
2104
2105[object, uuid (EEB14B68-808b-4abe-A5EA-B51DA7588008), dual, pointer_default (unique)]
2106interface ISpeechMemoryStream : ISpeechBaseStream {
2107 [id (DISPID_SMSSetData)] HRESULT SetData ([in] VARIANT Data);
2108 [id (DISPID_SMSGetData)] HRESULT GetData ([out, retval] VARIANT *pData);
2109};
2110
2111[object, uuid (C62D9C91-7458-47f6-862d-1ef86fb0b278), dual, pointer_default (unique)]
2112interface ISpeechAudioStatus : IDispatch {
2113 [propget, id (DISPID_SASFreeBufferSpace)] HRESULT FreeBufferSpace ([out, retval]long *FreeBufferSpace);
2114 [propget, id (DISPID_SASNonBlockingIO)] HRESULT NonBlockingIO ([out, retval]long *NonBlockingIO);
2115 [propget, id (DISPID_SASState)] HRESULT State ([out, retval] SpeechAudioState *State);
2116 [propget, id (DISPID_SASCurrentSeekPosition)] HRESULT CurrentSeekPosition ([out, retval]VARIANT *CurrentSeekPosition);
2117 [propget, id (DISPID_SASCurrentDevicePosition)] HRESULT CurrentDevicePosition ([out, retval]VARIANT *CurrentDevicePosition);
2118};
2119
2120[object, uuid (11b103d8-1142-4edf-A093-82fb3915f8cc), dual, pointer_default (unique)]
2121interface ISpeechAudioBufferInfo : IDispatch {
2122 [propget, id (DISPID_SABIMinNotification)] HRESULT MinNotification ([out, retval]long *MinNotification);
2123 [propput, id (DISPID_SABIMinNotification)] HRESULT MinNotification ([in]long MinNotification);
2124 [propget, id (DISPID_SABIBufferSize)] HRESULT BufferSize ([out, retval]long *BufferSize);
2125 [propput, id (DISPID_SABIBufferSize)] HRESULT BufferSize ([in]long BufferSize);
2126 [propget, id (DISPID_SABIEventBias)] HRESULT EventBias ([out, retval]long *EventBias);
2127 [propput, id (DISPID_SABIEventBias)] HRESULT EventBias ([in]long EventBias);
2128}
2129
2130[object, uuid (7a1ef0d5-1581-4741-88e4-209a49f11a10), dual, pointer_default (unique)]
2131interface ISpeechWaveFormatEx : IDispatch {
2132 [propget, id (DISPID_SWFEFormatTag)] HRESULT FormatTag ([out, retval]short *FormatTag);
2133 [propput, id (DISPID_SWFEFormatTag)] HRESULT FormatTag ([in]short FormatTag);
2134 [propget, id (DISPID_SWFEChannels)] HRESULT Channels ([out, retval]short *Channels);
2135 [propput, id (DISPID_SWFEChannels)] HRESULT Channels ([in]short Channels);
2136 [propget, id (DISPID_SWFESamplesPerSec)] HRESULT SamplesPerSec ([out, retval]long *SamplesPerSec);
2137 [propput, id (DISPID_SWFESamplesPerSec)] HRESULT SamplesPerSec ([in]long SamplesPerSec);
2138 [propget, id (DISPID_SWFEAvgBytesPerSec)] HRESULT AvgBytesPerSec ([out, retval]long *AvgBytesPerSec);
2139 [propput, id (DISPID_SWFEAvgBytesPerSec)] HRESULT AvgBytesPerSec ([in]long AvgBytesPerSec);
2140 [propget, id (DISPID_SWFEBlockAlign)] HRESULT BlockAlign ([out, retval]short *BlockAlign);
2141 [propput, id (DISPID_SWFEBlockAlign)] HRESULT BlockAlign ([in]short BlockAlign);
2142 [propget, id (DISPID_SWFEBitsPerSample)] HRESULT BitsPerSample ([out, retval]short *BitsPerSample);
2143 [propput, id (DISPID_SWFEBitsPerSample)] HRESULT BitsPerSample ([in]short BitsPerSample);
2144 [propget, id (DISPID_SWFEExtraData)] HRESULT ExtraData ([out, retval]VARIANT *ExtraData);
2145 [propput, id (DISPID_SWFEExtraData)] HRESULT ExtraData ([in]VARIANT ExtraData);
2146}
2147
2148[object, uuid (269316d8-57bd-11d2-9eee-00c04f797396), dual, pointer_default (unique)]
2149interface ISpeechVoice : IDispatch {
2150 [propget, id (DISPID_SVStatus)] HRESULT Status ([out, retval] ISpeechVoiceStatus **Status);
2151 [propget, id (DISPID_SVVoice)] HRESULT Voice ([out, retval] ISpeechObjectToken **Voice);
2152 [propputref, id (DISPID_SVVoice)] HRESULT Voice ([in]ISpeechObjectToken *Voice);
2153 [propget, id (DISPID_SVAudioOutput)] HRESULT AudioOutput ([out, retval]ISpeechObjectToken **AudioOutput);
2154 [propputref, id (DISPID_SVAudioOutput)] HRESULT AudioOutput ([in]ISpeechObjectToken *AudioOutput);
2155 [propget, id (DISPID_SVAudioOutputStream)] HRESULT AudioOutputStream ([out, retval]ISpeechBaseStream **AudioOutputStream);
2156 [propputref, id (DISPID_SVAudioOutputStream)] HRESULT AudioOutputStream ([in]ISpeechBaseStream *AudioOutputStream);
2157 [propget, id (DISPID_SVRate)] HRESULT Rate ([out, retval] long *Rate);
2158 [propput, id (DISPID_SVRate)] HRESULT Rate ([in] long Rate);
2159 [propget, id (DISPID_SVVolume)] HRESULT Volume ([out, retval] long *Volume);
2160 [propput, id (DISPID_SVVolume)] HRESULT Volume ([in] long Volume);
2161 [propput, hidden, id (DISPID_SVAllowAudioOuputFormatChangesOnNextSet)] HRESULT AllowAudioOutputFormatChangesOnNextSet ([in] VARIANT_BOOL Allow);
2162 [propget, hidden, id (DISPID_SVAllowAudioOuputFormatChangesOnNextSet)] HRESULT AllowAudioOutputFormatChangesOnNextSet ([out, retval] VARIANT_BOOL *Allow);
2163 [propget, id (DISPID_SVEventInterests)] HRESULT EventInterests ([out, retval] SpeechVoiceEvents *EventInterestFlags);
2164 [propput, id (DISPID_SVEventInterests)] HRESULT EventInterests ([in] SpeechVoiceEvents EventInterestFlags);
2165 [propput, id (DISPID_SVPriority)] HRESULT Priority ([in] SpeechVoicePriority Priority);
2166 [propget, id (DISPID_SVPriority)] HRESULT Priority ([out, retval] SpeechVoicePriority *Priority);
2167 [propput, id (DISPID_SVAlertBoundary)] HRESULT AlertBoundary ([in] SpeechVoiceEvents Boundary);
2168 [propget, id (DISPID_SVAlertBoundary)] HRESULT AlertBoundary ([out, retval] SpeechVoiceEvents *Boundary);
2169 [propput, id (DISPID_SVSyncronousSpeakTimeout)] HRESULT SynchronousSpeakTimeout ([in] long msTimeout);
2170 [propget, id (DISPID_SVSyncronousSpeakTimeout)] HRESULT SynchronousSpeakTimeout ([out, retval] long *msTimeout);
2171 [id (DISPID_SVSpeak)] HRESULT Speak ([in] BSTR Text,[in, defaultvalue (SPF_DEFAULT)] SpeechVoiceSpeakFlags Flags,[out, retval]long *StreamNumber);
2172 [id (DISPID_SVSpeakStream)] HRESULT SpeakStream ([in] ISpeechBaseStream *Stream,[in, defaultvalue (SPF_DEFAULT)] SpeechVoiceSpeakFlags Flags,[out, retval]long *StreamNumber);
2173 [id (DISPID_SVPause)] HRESULT Pause (void);
2174 [id (DISPID_SVResume)] HRESULT Resume (void);
2175 [id (DISPID_SVSkip)] HRESULT Skip ([in]const BSTR Type,[in]long NumItems,[out, retval]long *NumSkipped);
2176 [id (DISPID_SVGetVoices)] HRESULT GetVoices ([in, defaultvalue (L"")]BSTR RequiredAttributes,[in, defaultvalue (L"")]BSTR OptionalAttributes,[out, retval]ISpeechObjectTokens **ObjectTokens);
2177 [id (DISPID_SVGetAudioOutputs)] HRESULT GetAudioOutputs ([in, defaultvalue (L"")]BSTR RequiredAttributes,[in, defaultvalue (L"")]BSTR OptionalAttributes,[out, retval]ISpeechObjectTokens **ObjectTokens);
2178 [id (DISPID_SVWaitUntilDone)] HRESULT WaitUntilDone ([in]long msTimeout,[out, retval]VARIANT_BOOL *Done);
2179 [hidden, id (DISPID_SVSpeakCompleteEvent)] HRESULT SpeakCompleteEvent ([out, retval]long *Handle);
2180 [id (DISPID_SVIsUISupported)] HRESULT IsUISupported ([in]const BSTR TypeOfUI,[in, defaultvalue (NULL)]const VARIANT *ExtraData,[out, retval] VARIANT_BOOL *Supported);
2181 [id (DISPID_SVDisplayUI)] HRESULT DisplayUI ([in]long hWndParent,[in]BSTR Title,[in]const BSTR TypeOfUI,[in, defaultvalue (NULL)]const VARIANT *ExtraData);
2182};
2183
2184[object, uuid (8be47b07-57f6-11d2-9eee-00c04f797396), dual, pointer_default (unique)]
2185interface ISpeechVoiceStatus : IDispatch {
2186 [propget, id (DISPID_SVSCurrentStreamNumber)] HRESULT CurrentStreamNumber ([out, retval] long *StreamNumber);
2187 [propget, id (DISPID_SVSLastStreamNumberQueued)] HRESULT LastStreamNumberQueued ([out, retval] long *StreamNumber);
2188 [propget, id (DISPID_SVSLastResult)] HRESULT LastHResult ([out, retval]long *HResult);
2189 [propget, id (DISPID_SVSRunningState)] HRESULT RunningState ([out, retval] SpeechRunState *State);
2190 [propget, id (DISPID_SVSInputWordPosition)] HRESULT InputWordPosition ([out, retval] long *Position);
2191 [propget, id (DISPID_SVSInputWordLength)] HRESULT InputWordLength ([out, retval] long *Length);
2192 [propget, id (DISPID_SVSInputSentencePosition)] HRESULT InputSentencePosition ([out, retval] long *Position);
2193 [propget, id (DISPID_SVSInputSentenceLength)] HRESULT InputSentenceLength ([out, retval] long *Length);
2194 [propget, id (DISPID_SVSLastBookmark)] HRESULT LastBookmark ([out, retval] BSTR *Bookmark);
2195 [propget, id (DISPID_SVSLastBookmarkId), hidden] HRESULT LastBookmarkId ([out, retval] long *BookmarkId);
2196 [propget, id (DISPID_SVSPhonemeId)] HRESULT PhonemeId ([out, retval] short *PhoneId);
2197 [propget, id (DISPID_SVSVisemeId)] HRESULT VisemeId ([out, retval] short *VisemeId);
2198};
2199
2200typedef enum SpeechVisemeType {
2201 SVP_0 = 0,
2202 SVP_1,
2203 SVP_2,
2204 SVP_3,
2205 SVP_4,
2206 SVP_5,
2207 SVP_6,
2208 SVP_7,
2209 SVP_8,
2210 SVP_9,
2211 SVP_10,
2212 SVP_11,
2213 SVP_12,
2214 SVP_13,
2215 SVP_14,
2216 SVP_15,
2217 SVP_16,
2218 SVP_17,
2219 SVP_18,
2220 SVP_19,
2221 SVP_20,
2222 SVP_21,
2223} SpeechVisemeType;
2224
2225typedef enum SpeechVisemeFeature {
2226 SVF_None = 0,
2227 SVF_Stressed = SPVFEATURE_STRESSED,
2228 SVF_Emphasis = SPVFEATURE_EMPHASIS
2229} SpeechVisemeFeature;
2230
2231typedef [hidden] enum DISPID_SpeechVoiceEvent {
2232 DISPID_SVEStreamStart = 1,
2233 DISPID_SVEStreamEnd,
2234 DISPID_SVEVoiceChange,
2235 DISPID_SVEBookmark,
2236 DISPID_SVEWord,
2237 DISPID_SVEPhoneme,
2238 DISPID_SVESentenceBoundary,
2239 DISPID_SVEViseme,
2240 DISPID_SVEAudioLevel,
2241 DISPID_SVEEnginePrivate
2242} DISPID_SpeechVoiceEvent;
2243
2244typedef [hidden] enum DISPID_SpeechRecognizer {
2245 DISPID_SRRecognizer = 1,
2246 DISPID_SRAllowAudioInputFormatChangesOnNextSet,
2247 DISPID_SRAudioInput,
2248 DISPID_SRAudioInputStream,
2249 DISPID_SRIsShared,
2250 DISPID_SRState,
2251 DISPID_SRStatus,
2252 DISPID_SRProfile,
2253 DISPID_SREmulateRecognition,
2254 DISPID_SRCreateRecoContext,
2255 DISPID_SRGetFormat,
2256 DISPID_SRSetPropertyNumber,
2257 DISPID_SRGetPropertyNumber,
2258 DISPID_SRSetPropertyString,
2259 DISPID_SRGetPropertyString,
2260 DISPID_SRIsUISupported,
2261 DISPID_SRDisplayUI,
2262 DISPID_SRGetRecognizers,
2263 DISPID_SVGetAudioInputs,
2264 DISPID_SVGetProfiles
2265} DISPID_SpeechRecognizer;
2266
2267typedef enum SpeechRecognizerState {
2268 SRSInactive = SPRST_INACTIVE,
2269 SRSActive = SPRST_ACTIVE,
2270 SRSActiveAlways = SPRST_ACTIVE_ALWAYS,
2271 SRSInactiveWithPurge = SPRST_INACTIVE_WITH_PURGE,
2272} SpeechRecognizerState;
2273
2274typedef enum SpeechDisplayAttributes {
2275 SDA_No_Trailing_Space = 0,
2276 SDA_One_Trailing_Space = SPAF_ONE_TRAILING_SPACE,
2277 SDA_Two_Trailing_Spaces = SPAF_TWO_TRAILING_SPACES,
2278 SDA_Consume_Leading_Spaces = SPAF_CONSUME_LEADING_SPACES
2279} SpeechDisplayAttributes;
2280
2281typedef enum SpeechFormatType {
2282 SFTInput = SPWF_INPUT,
2283 SFTSREngine = SPWF_SRENGINE
2284} SpeechFormatType;
2285
2286typedef [hidden] enum DISPID_SpeechRecognizerStatus {
2287 DISPID_SRSAudioStatus = 1,
2288 DISPID_SRSCurrentStreamPosition,
2289 DISPID_SRSCurrentStreamNumber,
2290 DISPID_SRSNumberOfActiveRules,
2291 DISPID_SRSClsidEngine,
2292 DISPID_SRSSupportedLanguages
2293} DISPID_SpeechRecognizerStatus;
2294
2295typedef [hidden] enum DISPID_SpeechRecoContext {
2296 DISPID_SRCRecognizer = 1,
2297 DISPID_SRCAudioInInterferenceStatus,
2298 DISPID_SRCRequestedUIType,
2299 DISPID_SRCVoice,
2300 DISPID_SRAllowVoiceFormatMatchingOnNextSet,
2301 DISPID_SRCVoicePurgeEvent,
2302 DISPID_SRCEventInterests,
2303 DISPID_SRCCmdMaxAlternates,
2304 DISPID_SRCState,
2305 DISPID_SRCRetainedAudio,
2306 DISPID_SRCRetainedAudioFormat,
2307 DISPID_SRCPause,
2308 DISPID_SRCResume,
2309 DISPID_SRCCreateGrammar,
2310 DISPID_SRCCreateResultFromMemory,
2311 DISPID_SRCBookmark,
2312 DISPID_SRCSetAdaptationData
2313} DISPID_SpeechRecoContext;
2314
2315typedef enum SpeechRetainedAudioOptions {
2316 SRAONone = SPAO_NONE,
2317 SRAORetainAudio = SPAO_RETAIN_AUDIO
2318} SpeechRetainedAudioOptions;
2319
2320typedef enum SpeechBookmarkOptions {
2321 SBONone = SPBO_NONE,
2322 SBOPause = SPBO_PAUSE
2323} SpeechBookmarkOptions;
2324
2325typedef enum SpeechInterference {
2326 SINone = SPINTERFERENCE_NONE,
2327 SINoise = SPINTERFERENCE_NOISE,
2328 SINoSignal = SPINTERFERENCE_NOSIGNAL,
2329 SITooLoud = SPINTERFERENCE_TOOLOUD,
2330 SITooQuiet = SPINTERFERENCE_TOOQUIET,
2331 SITooFast = SPINTERFERENCE_TOOFAST,
2332 SITooSlow = SPINTERFERENCE_TOOSLOW
2333} SpeechInterference;
2334
2335typedef enum SpeechRecoEvents {
2336 SREStreamEnd = 0x1,
2337 SRESoundStart = 0x2,
2338 SRESoundEnd = 0x4,
2339 SREPhraseStart = 0x8,
2340 SRERecognition = 0x10,
2341 SREHypothesis = 0x20,
2342 SREBookmark = 0x40,
2343 SREPropertyNumChange = 0x80,
2344 SREPropertyStringChange = 0x100,
2345 SREFalseRecognition = 0x200,
2346 SREInterference = 0x400,
2347 SRERequestUI = 0x800,
2348 SREStateChange = 0x1000,
2349 SREAdaptation = 0x2000,
2350 SREStreamStart = 0x4000,
2351 SRERecoOtherContext = 0x8000,
2352 SREAudioLevel = 0x10000,
2353 SREPrivate = 0x40000,
2354 SREAllEvents = 0x5ffff
2355} SpeechRecoEvents;
2356
2357typedef enum SpeechRecoContextState {
2358 SRCS_Disabled = SPCS_DISABLED,
2359 SRCS_Enabled = SPCS_ENABLED
2360} SpeechRecoContextState;
2361
2362typedef [hidden] enum DISPIDSPRG {
2363 DISPID_SRGId = 1,
2364 DISPID_SRGRecoContext,
2365 DISPID_SRGState,
2366 DISPID_SRGRules,
2367 DISPID_SRGReset,
2368 DISPID_SRGCommit,
2369 DISPID_SRGCmdLoadFromFile,
2370 DISPID_SRGCmdLoadFromObject,
2371 DISPID_SRGCmdLoadFromResource,
2372 DISPID_SRGCmdLoadFromMemory,
2373 DISPID_SRGCmdLoadFromProprietaryGrammar,
2374 DISPID_SRGCmdSetRuleState,
2375 DISPID_SRGCmdSetRuleIdState,
2376 DISPID_SRGDictationLoad,
2377 DISPID_SRGDictationUnload,
2378 DISPID_SRGDictationSetState,
2379 DISPID_SRGSetWordSequenceData,
2380 DISPID_SRGSetTextSelection,
2381 DISPID_SRGIsPronounceable
2382} DISPIDSPRG;
2383
2384typedef enum SpeechLoadOption {
2385 SLOStatic = SPLO_STATIC,
2386 SLODynamic = SPLO_DYNAMIC
2387} SpeechLoadOption;
2388
2389typedef enum SpeechWordPronounceable {
2390 SWPUnknownWordUnpronounceable = SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE,
2391 SWPUnknownWordPronounceable = SPWP_UNKNOWN_WORD_PRONOUNCEABLE,
2392 SWPKnownWordPronounceable = SPWP_KNOWN_WORD_PRONOUNCEABLE
2393} SpeechWordPronounceable;
2394
2395typedef enum SpeechGrammarState {
2396 SGSEnabled = SPGS_ENABLED,
2397 SGSDisabled = SPGS_DISABLED,
2398 SGSExclusive = SPGS_EXCLUSIVE,
2399} SpeechGrammarState;
2400
2401typedef enum SpeechRuleState {
2402 SGDSInactive = SPRS_INACTIVE,
2403 SGDSActive = SPRS_ACTIVE,
2404 SGDSActiveWithAutoPause = SPRS_ACTIVE_WITH_AUTO_PAUSE,
2405#if _SAPI_BLD_ >= 0x053
2406 SGDSActiveUserDelimited = SPRS_ACTIVE_USER_DELIMITED
2407#endif
2408} SpeechRuleState;
2409
2410typedef enum SpeechRuleAttributes {
2411 SRATopLevel = SPRAF_TopLevel,
2412 SRADefaultToActive = SPRAF_Active,
2413 SRAExport = SPRAF_Export,
2414 SRAImport = SPRAF_Import,
2415 SRAInterpreter = SPRAF_Interpreter,
2416 SRADynamic = SPRAF_Dynamic,
2417#if _SAPI_BLD_ >= 0x053
2418 SRARoot = SPRAF_Root
2419#endif
2420} SpeechRuleAttributes;
2421
2422typedef enum SpeechGrammarWordType {
2423 SGDisplay = SPWT_DISPLAY,
2424 SGLexical = SPWT_LEXICAL,
2425 SGPronounciation = SPWT_PRONUNCIATION,
2426#if _SAPI_BLD_ >= 0x053
2427 SGLexicalNoSpecialChars = SPWT_LEXICAL_NO_SPECIAL_CHARS
2428#endif
2429} SpeechGrammarWordType;
2430
2431typedef [hidden] enum DISPID_SpeechRecoContextEvents {
2432 DISPID_SRCEStartStream = 1,
2433 DISPID_SRCEEndStream,
2434 DISPID_SRCEBookmark,
2435 DISPID_SRCESoundStart,
2436 DISPID_SRCESoundEnd,
2437 DISPID_SRCEPhraseStart,
2438 DISPID_SRCERecognition,
2439 DISPID_SRCEHypothesis,
2440 DISPID_SRCEPropertyNumberChange,
2441 DISPID_SRCEPropertyStringChange,
2442 DISPID_SRCEFalseRecognition,
2443 DISPID_SRCEInterference,
2444 DISPID_SRCERequestUI,
2445 DISPID_SRCERecognizerStateChange,
2446 DISPID_SRCEAdaptation,
2447 DISPID_SRCERecognitionForOtherContext,
2448 DISPID_SRCEAudioLevel,
2449 DISPID_SRCEEnginePrivate
2450} DISPID_SpeechRecoContextEvents;
2451
2452typedef enum SpeechRecognitionType {
2453 SRTStandard = 0,
2454 SRTAutopause = SPREF_AutoPause,
2455 SRTEmulated = SPREF_Emulated
2456#if _SAPI_BLD_ >= 0x053
2457 ,
2458 SRTSMLTimeout = SPREF_SMLTimeout,
2459 SRTExtendableParse = SPREF_ExtendableParse,
2460 SRTReSent = SPREF_ReSent
2461#endif
2462} SpeechRecognitionType;
2463
2464typedef [hidden] enum DISPID_SpeechGrammarRule {
2465 DISPID_SGRAttributes = 1,
2466 DISPID_SGRInitialState,
2467 DISPID_SGRName,
2468 DISPID_SGRId,
2469 DISPID_SGRClear,
2470 DISPID_SGRAddResource,
2471 DISPID_SGRAddState
2472} DISPID_SpeechGrammarRule;
2473
2474typedef [hidden] enum DISPID_SpeechGrammarRules {
2475 DISPID_SGRsCount = 1,
2476 DISPID_SGRsDynamic,
2477 DISPID_SGRsAdd,
2478 DISPID_SGRsCommit,
2479 DISPID_SGRsCommitAndSave,
2480 DISPID_SGRsFindRule,
2481 DISPID_SGRsItem = DISPID_VALUE,
2482 DISPID_SGRs_NewEnum = DISPID_NEWENUM
2483} DISPID_SpeechGrammarRules;
2484
2485typedef [hidden] enum DISPID_SpeechGrammarRuleState {
2486 DISPID_SGRSRule = 1,
2487 DISPID_SGRSTransitions,
2488 DISPID_SGRSAddWordTransition,
2489 DISPID_SGRSAddRuleTransition,
2490 DISPID_SGRSAddSpecialTransition
2491} DISPID_SpeechGrammarRuleState;
2492
2493typedef enum SpeechSpecialTransitionType {
2494 SSTTWildcard = 1,
2495 SSTTDictation,
2496 SSTTTextBuffer
2497} SpeechSpecialTransitionType;
2498
2499typedef [hidden] enum DISPID_SpeechGrammarRuleStateTransitions {
2500 DISPID_SGRSTsCount = 1,
2501 DISPID_SGRSTsItem = DISPID_VALUE,
2502 DISPID_SGRSTs_NewEnum = DISPID_NEWENUM
2503} DISPID_SpeechGrammarRuleStateTransitions;
2504
2505typedef [hidden] enum DISPID_SpeechGrammarRuleStateTransition {
2506 DISPID_SGRSTType = 1,
2507 DISPID_SGRSTText,
2508 DISPID_SGRSTRule,
2509 DISPID_SGRSTWeight,
2510 DISPID_SGRSTPropertyName,
2511 DISPID_SGRSTPropertyId,
2512 DISPID_SGRSTPropertyValue,
2513 DISPID_SGRSTNextState
2514} DISPID_SpeechGrammarRuleStateTransition;
2515
2516typedef enum SpeechGrammarRuleStateTransitionType {
2517 SGRSTTEpsilon = 0,
2518 SGRSTTWord,
2519 SGRSTTRule,
2520 SGRSTTDictation,
2521 SGRSTTWildcard,
2522 SGRSTTTextBuffer
2523} SpeechGrammarRuleStateTransitionType;
2524
2525typedef [hidden] enum DISPIDSPTSI {
2526 DISPIDSPTSI_ActiveOffset = 1,
2527 DISPIDSPTSI_ActiveLength,
2528 DISPIDSPTSI_SelectionOffset,
2529 DISPIDSPTSI_SelectionLength
2530} DISPIDSPTSI;
2531
2532typedef [hidden] enum DISPID_SpeechRecoResult {
2533 DISPID_SRRRecoContext = 1,
2534 DISPID_SRRTimes,
2535 DISPID_SRRAudioFormat,
2536 DISPID_SRRPhraseInfo,
2537 DISPID_SRRAlternates,
2538 DISPID_SRRAudio,
2539 DISPID_SRRSpeakAudio,
2540 DISPID_SRRSaveToMemory,
2541 DISPID_SRRDiscardResultInfo
2542} DISPID_SpeechRecoResult;
2543
2544typedef enum SpeechDiscardType {
2545 SDTProperty = SPDF_PROPERTY,
2546 SDTReplacement = SPDF_REPLACEMENT,
2547 SDTRule = SPDF_RULE,
2548 SDTDisplayText = SPDF_DISPLAYTEXT,
2549 SDTLexicalForm = SPDF_LEXICALFORM,
2550 SDTPronunciation = SPDF_PRONUNCIATION,
2551 SDTAudio = SPDF_AUDIO,
2552 SDTAlternates = SPDF_ALTERNATES,
2553 SDTAll = SPDF_ALL
2554} SpeechDiscardType;
2555
2556#if _SAPI_BLD_ >= 0x53
2557typedef enum SpeechEmulationCompareFlags {
2558 SECFIgnoreCase = 0x1,
2559 SECFIgnoreKanaType = 0x10000,
2560 SECFIgnoreWidth = 0x20000,
2561 SECFNoSpecialChars = 0x20000000,
2562 SECFEmulateResult = 0x40000000,
2563 SECFDefault = SECFIgnoreCase | SECFIgnoreKanaType | SECFIgnoreWidth
2564} SpeechEmulationCompareFlags;
2565
2566typedef [hidden] enum DISPID_SpeechXMLRecoResult {
2567 DISPID_SRRGetXMLResult = DISPID_SRRDiscardResultInfo + 1,
2568 DISPID_SRRGetXMLErrorInfo = DISPID_SRRGetXMLResult + 1
2569} DISPID_SpeechXMLRecoResult;
2570
2571typedef [hidden] enum DISPID_SpeechRecoResult2 {
2572 DISPID_SRRSetTextFeedback = DISPID_SRRGetXMLErrorInfo + 1
2573} DISPID_SpeechRecoResult2;
2574#endif
2575
2576typedef [hidden] enum DISPID_SpeechPhraseBuilder {
2577 DISPID_SPPBRestorePhraseFromMemory = 1
2578} DISPID_SpeechPhraseBuilder;
2579
2580typedef [hidden] enum DISPID_SpeechRecoResultTimes {
2581 DISPID_SRRTStreamTime = 1,
2582 DISPID_SRRTLength,
2583 DISPID_SRRTTickCount,
2584 DISPID_SRRTOffsetFromStart
2585} DISPID_SpeechRecoResultTimes;
2586
2587typedef [hidden] enum DISPID_SpeechPhraseAlternate {
2588 DISPID_SPARecoResult = 1,
2589 DISPID_SPAStartElementInResult,
2590 DISPID_SPANumberOfElementsInResult,
2591 DISPID_SPAPhraseInfo,
2592 DISPID_SPACommit
2593} DISPID_SpeechPhraseAlternate;
2594
2595typedef [hidden] enum DISPID_SpeechPhraseAlternates {
2596 DISPID_SPAsCount = 1,
2597 DISPID_SPAsItem = DISPID_VALUE,
2598 DISPID_SPAs_NewEnum = DISPID_NEWENUM
2599} DISPID_SpeechPhraseAlternates;
2600
2601typedef [hidden] enum DISPID_SpeechPhraseInfo {
2602 DISPID_SPILanguageId = 1,
2603 DISPID_SPIGrammarId,
2604 DISPID_SPIStartTime,
2605 DISPID_SPIAudioStreamPosition,
2606 DISPID_SPIAudioSizeBytes,
2607 DISPID_SPIRetainedSizeBytes,
2608 DISPID_SPIAudioSizeTime,
2609 DISPID_SPIRule,
2610 DISPID_SPIProperties,
2611 DISPID_SPIElements,
2612 DISPID_SPIReplacements,
2613 DISPID_SPIEngineId,
2614 DISPID_SPIEnginePrivateData,
2615 DISPID_SPISaveToMemory,
2616 DISPID_SPIGetText,
2617 DISPID_SPIGetDisplayAttributes
2618} DISPID_SpeechPhraseInfo;
2619
2620typedef [hidden] enum DISPID_SpeechPhraseElement {
2621 DISPID_SPEAudioTimeOffset = 1,
2622 DISPID_SPEAudioSizeTime,
2623 DISPID_SPEAudioStreamOffset,
2624 DISPID_SPEAudioSizeBytes,
2625 DISPID_SPERetainedStreamOffset,
2626 DISPID_SPERetainedSizeBytes,
2627 DISPID_SPEDisplayText,
2628 DISPID_SPELexicalForm,
2629 DISPID_SPEPronunciation,
2630 DISPID_SPEDisplayAttributes,
2631 DISPID_SPERequiredConfidence,
2632 DISPID_SPEActualConfidence,
2633 DISPID_SPEEngineConfidence
2634} DISPID_SpeechPhraseElement;
2635
2636typedef enum SpeechEngineConfidence {
2637 SECLowConfidence = -1,
2638 SECNormalConfidence = 0,
2639 SECHighConfidence = 1
2640} SpeechEngineConfidence;
2641
2642typedef [hidden] enum DISPID_SpeechPhraseElements {
2643 DISPID_SPEsCount = 1,
2644 DISPID_SPEsItem = DISPID_VALUE,
2645 DISPID_SPEs_NewEnum = DISPID_NEWENUM
2646} DISPID_SpeechPhraseElements;
2647
2648typedef [hidden] enum DISPID_SpeechPhraseReplacement {
2649 DISPID_SPRDisplayAttributes = 1,
2650 DISPID_SPRText,
2651 DISPID_SPRFirstElement,
2652 DISPID_SPRNumberOfElements
2653} DISPID_SpeechPhraseReplacement;
2654
2655typedef [hidden] enum DISPID_SpeechPhraseReplacements {
2656 DISPID_SPRsCount = 1,
2657 DISPID_SPRsItem = DISPID_VALUE,
2658 DISPID_SPRs_NewEnum = DISPID_NEWENUM
2659} DISPID_SpeechPhraseReplacements;
2660
2661typedef [hidden] enum DISPID_SpeechPhraseProperty {
2662 DISPID_SPPName = 1,
2663 DISPID_SPPId,
2664 DISPID_SPPValue,
2665 DISPID_SPPFirstElement,
2666 DISPID_SPPNumberOfElements,
2667 DISPID_SPPEngineConfidence,
2668 DISPID_SPPConfidence,
2669 DISPID_SPPParent,
2670 DISPID_SPPChildren
2671} DISPID_SpeechPhraseProperty;
2672
2673typedef [hidden] enum DISPID_SpeechPhraseProperties {
2674 DISPID_SPPsCount = 1,
2675 DISPID_SPPsItem = DISPID_VALUE,
2676 DISPID_SPPs_NewEnum = DISPID_NEWENUM
2677} DISPID_SpeechPhraseProperties;
2678
2679typedef [hidden] enum DISPID_SpeechPhraseRule {
2680 DISPID_SPRuleName = 1,
2681 DISPID_SPRuleId,
2682 DISPID_SPRuleFirstElement,
2683 DISPID_SPRuleNumberOfElements,
2684 DISPID_SPRuleParent,
2685 DISPID_SPRuleChildren,
2686 DISPID_SPRuleConfidence,
2687 DISPID_SPRuleEngineConfidence
2688} DISPID_SpeechPhraseRule;
2689
2690typedef [hidden] enum DISPID_SpeechPhraseRules {
2691 DISPID_SPRulesCount = 1,
2692 DISPID_SPRulesItem = DISPID_VALUE,
2693 DISPID_SPRules_NewEnum = DISPID_NEWENUM
2694} DISPID_SpeechPhraseRules;
2695
2696typedef [hidden] enum DISPID_SpeechLexicon {
2697 DISPID_SLGenerationId = 1,
2698 DISPID_SLGetWords,
2699 DISPID_SLAddPronunciation,
2700 DISPID_SLAddPronunciationByPhoneIds,
2701 DISPID_SLRemovePronunciation,
2702 DISPID_SLRemovePronunciationByPhoneIds,
2703 DISPID_SLGetPronunciations,
2704 DISPID_SLGetGenerationChange
2705} DISPID_SpeechLexicon;
2706
2707typedef enum SpeechLexiconType {
2708 SLTUser = eLEXTYPE_USER,
2709 SLTApp = eLEXTYPE_APP
2710} SpeechLexiconType;
2711
2712typedef enum SpeechPartOfSpeech {
2713 SPSNotOverriden = SPPS_NotOverriden,
2714 SPSUnknown = SPPS_Unknown,
2715 SPSNoun = SPPS_Noun,
2716 SPSVerb = SPPS_Verb,
2717 SPSModifier = SPPS_Modifier,
2718 SPSFunction = SPPS_Function,
2719 SPSInterjection = SPPS_Interjection,
2720#if _SAPI_BLD_ >= 0x53
2721 SPSLMA = SPPS_LMA,
2722 SPSSuppressWord = SPPS_SuppressWord
2723#endif
2724} SpeechPartOfSpeech;
2725
2726typedef [hidden] enum DISPID_SpeechLexiconWords {
2727 DISPID_SLWsCount = 1,
2728 DISPID_SLWsItem = DISPID_VALUE,
2729 DISPID_SLWs_NewEnum = DISPID_NEWENUM
2730} DISPID_SpeechLexiconWords;
2731
2732typedef enum SpeechWordType {
2733 SWTAdded = eWORDTYPE_ADDED,
2734 SWTDeleted = eWORDTYPE_DELETED
2735} SpeechWordType;
2736
2737typedef [hidden] enum DISPID_SpeechLexiconWord {
2738 DISPID_SLWLangId = 1,
2739 DISPID_SLWType,
2740 DISPID_SLWWord,
2741 DISPID_SLWPronunciations
2742} DISPID_SpeechLexiconWord;
2743
2744typedef [hidden] enum DISPID_SpeechLexiconProns {
2745 DISPID_SLPsCount = 1,
2746 DISPID_SLPsItem = DISPID_VALUE,
2747 DISPID_SLPs_NewEnum = DISPID_NEWENUM
2748} DISPID_SpeechLexiconProns;
2749
2750typedef [hidden] enum DISPID_SpeechLexiconPronunciation {
2751 DISPID_SLPType = 1,
2752 DISPID_SLPLangId,
2753 DISPID_SLPPartOfSpeech,
2754 DISPID_SLPPhoneIds,
2755 DISPID_SLPSymbolic,
2756} DISPID_SpeechLexiconPronunciation;
2757
2758typedef [hidden] enum DISPID_SpeechPhoneConverter {
2759 DISPID_SPCLangId = 1,
2760 DISPID_SPCPhoneToId,
2761 DISPID_SPCIdToPhone
2762} DISPID_SpeechPhoneConverter;
2763
2764[uuid (A372ACD1-3bef-4bbd-8ffb-CB3E2B416AF8)]
2765dispinterface _ISpeechVoiceEvents {
2766 properties:
2767 methods:
2768 [id (DISPID_SVEStreamStart)] void StartStream ([in]long StreamNumber,[in]VARIANT StreamPosition);
2769 [id (DISPID_SVEStreamEnd)] void EndStream ([in]long StreamNumber,[in]VARIANT StreamPosition);
2770 [id (DISPID_SVEVoiceChange)] void VoiceChange ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]ISpeechObjectToken *VoiceObjectToken);
2771 [id (DISPID_SVEBookmark)] void Bookmark ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]BSTR Bookmark,[in]long BookmarkId);
2772 [id (DISPID_SVEWord)] void Word ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]long CharacterPosition,[in]long Length);
2773 [id (DISPID_SVESentenceBoundary)] void Sentence ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]long CharacterPosition,[in]long Length);
2774 [id (DISPID_SVEPhoneme)] void Phoneme ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]long Duration,[in]short NextPhoneId,[in]SpeechVisemeFeature Feature,[in]short CurrentPhoneId);
2775 [id (DISPID_SVEViseme)] void Viseme ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]long Duration,[in]SpeechVisemeType NextVisemeId,[in]SpeechVisemeFeature Feature,[in]SpeechVisemeType CurrentVisemeId);
2776 [id (DISPID_SVEAudioLevel)] void AudioLevel ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]long AudioLevel);
2777 [id (DISPID_SVEEnginePrivate)] void EnginePrivate ([in]long StreamNumber,[in]long StreamPosition,[in]VARIANT EngineData);
2778};
2779
2780[object, uuid (2d5f1c0c-BD75-4b08-9478-3b11fea2586c), dual, pointer_default (unique)]
2781interface ISpeechRecognizer : IDispatch {
2782 [propputref, id (DISPID_SRRecognizer)] HRESULT Recognizer ([in]ISpeechObjectToken *Recognizer);
2783 [propget, id (DISPID_SRRecognizer)] HRESULT Recognizer ([out, retval]ISpeechObjectToken **Recognizer);
2784 [propput, hidden, id (DISPID_SRAllowAudioInputFormatChangesOnNextSet)] HRESULT AllowAudioInputFormatChangesOnNextSet ([in] VARIANT_BOOL Allow);
2785 [propget, hidden, id (DISPID_SRAllowAudioInputFormatChangesOnNextSet)] HRESULT AllowAudioInputFormatChangesOnNextSet ([out, retval] VARIANT_BOOL *Allow);
2786 [propputref, id (DISPID_SRAudioInput)] HRESULT AudioInput ([in, defaultvalue (0)]ISpeechObjectToken *AudioInput);
2787 [propget, id (DISPID_SRAudioInput)] HRESULT AudioInput ([out, retval]ISpeechObjectToken **AudioInput);
2788 [propputref, id (DISPID_SRAudioInputStream)] HRESULT AudioInputStream ([in, defaultvalue (0)]ISpeechBaseStream *AudioInputStream);
2789 [propget, id (DISPID_SRAudioInputStream)] HRESULT AudioInputStream ([out, retval]ISpeechBaseStream **AudioInputStream);
2790 [propget, id (DISPID_SRIsShared)] HRESULT IsShared ([out, retval]VARIANT_BOOL *Shared);
2791 [propput, id (DISPID_SRState)] HRESULT State ([in] SpeechRecognizerState State);
2792 [propget, id (DISPID_SRState)] HRESULT State ([out, retval] SpeechRecognizerState *State);
2793 [propget, id (DISPID_SRStatus)] HRESULT Status ([out, retval]ISpeechRecognizerStatus **Status);
2794 [propputref, id (DISPID_SRProfile)] HRESULT Profile ([in, defaultvalue (0)]ISpeechObjectToken *Profile);
2795 [propget, id (DISPID_SRProfile)] HRESULT Profile ([out, retval]ISpeechObjectToken **Profile);
2796 [id (DISPID_SREmulateRecognition)] HRESULT EmulateRecognition ([in]VARIANT TextElements,[in, defaultvalue (NULL)]VARIANT *ElementDisplayAttributes,[in, defaultvalue (0)]long LanguageId);
2797 [id (DISPID_SRCreateRecoContext)] HRESULT CreateRecoContext ([out, retval]ISpeechRecoContext **NewContext);
2798 [id (DISPID_SRGetFormat)] HRESULT GetFormat ([in] SpeechFormatType Type,[out, retval]ISpeechAudioFormat **Format);
2799 [id (DISPID_SRSetPropertyNumber), hidden] HRESULT SetPropertyNumber ([in]const BSTR Name,[in]long Value,[out, retval]VARIANT_BOOL *Supported);
2800 [id (DISPID_SRGetPropertyNumber), hidden] HRESULT GetPropertyNumber ([in]const BSTR Name,[in, out]long *Value,[out, retval]VARIANT_BOOL *Supported);
2801 [id (DISPID_SRSetPropertyString), hidden] HRESULT SetPropertyString ([in]const BSTR Name,[in]const BSTR Value,[out, retval]VARIANT_BOOL *Supported);
2802 [id (DISPID_SRGetPropertyString), hidden] HRESULT GetPropertyString ([in]const BSTR Name,[in, out]BSTR *Value,[out, retval]VARIANT_BOOL *Supported);
2803 [id (DISPID_SRIsUISupported)] HRESULT IsUISupported ([in]const BSTR TypeOfUI,[in, defaultvalue (NULL)]const VARIANT *ExtraData,[out, retval] VARIANT_BOOL *Supported);
2804 [id (DISPID_SRDisplayUI)] HRESULT DisplayUI ([in]long hWndParent,[in]BSTR Title,[in]const BSTR TypeOfUI,[in, defaultvalue (NULL)]const VARIANT *ExtraData);
2805 [id (DISPID_SRGetRecognizers)] HRESULT GetRecognizers ([in, defaultvalue (L"")]BSTR RequiredAttributes,[in, defaultvalue (L"")]BSTR OptionalAttributes,[out, retval]ISpeechObjectTokens **ObjectTokens);
2806 [id (DISPID_SVGetAudioInputs)] HRESULT GetAudioInputs ([in, defaultvalue (L"")]BSTR RequiredAttributes,[in, defaultvalue (L"")]BSTR OptionalAttributes,[out, retval]ISpeechObjectTokens **ObjectTokens);
2807 [id (DISPID_SVGetProfiles)] HRESULT GetProfiles ([in, defaultvalue (L"")]BSTR RequiredAttributes,[in, defaultvalue (L"")]BSTR OptionalAttributes,[out, retval]ISpeechObjectTokens **ObjectTokens);
2808};
2809
2810[object, uuid (BFF9E781-53ec-484e-BB8A-0e1b5551e35c), dual, pointer_default (unique)]
2811interface ISpeechRecognizerStatus : IDispatch {
2812 [propget, id (DISPID_SRSAudioStatus)] HRESULT AudioStatus ([out, retval]ISpeechAudioStatus **AudioStatus);
2813 [propget, id (DISPID_SRSCurrentStreamPosition)] HRESULT CurrentStreamPosition ([out, retval]VARIANT *pCurrentStreamPos);
2814 [propget, id (DISPID_SRSCurrentStreamNumber)] HRESULT CurrentStreamNumber ([out, retval]long *StreamNumber);
2815 [propget, id (DISPID_SRSNumberOfActiveRules)] HRESULT NumberOfActiveRules ([out, retval]long *NumberOfActiveRules);
2816 [propget, id (DISPID_SRSClsidEngine)] HRESULT ClsidEngine ([out, retval]BSTR *ClsidEngine);
2817 [propget, id (DISPID_SRSSupportedLanguages)] HRESULT SupportedLanguages ([out, retval]VARIANT *SupportedLanguages);
2818};
2819
2820[object, uuid (580aa49d-7e1e-4809-B8E2-57da806104b8), dual, pointer_default (unique)]
2821interface ISpeechRecoContext : IDispatch {
2822 [propget, id (DISPID_SRCRecognizer)] HRESULT Recognizer ([out, retval]ISpeechRecognizer **Recognizer);
2823 [propget, id (DISPID_SRCAudioInInterferenceStatus)] HRESULT AudioInputInterferenceStatus ([out, retval]SpeechInterference *Interference);
2824 [propget, id (DISPID_SRCRequestedUIType)] HRESULT RequestedUIType ([out, retval]BSTR *UIType);
2825 [propputref, id (DISPID_SRCVoice)] HRESULT Voice ([in]ISpeechVoice *Voice);
2826 [propget, id (DISPID_SRCVoice)] HRESULT Voice ([out, retval]ISpeechVoice **Voice);
2827 [propput, hidden, id (DISPID_SRAllowVoiceFormatMatchingOnNextSet)] HRESULT AllowVoiceFormatMatchingOnNextSet ([in] VARIANT_BOOL Allow);
2828 [propget, hidden, id (DISPID_SRAllowVoiceFormatMatchingOnNextSet)] HRESULT AllowVoiceFormatMatchingOnNextSet ([out, retval] VARIANT_BOOL *pAllow);
2829 [propput, id (DISPID_SRCVoicePurgeEvent)] HRESULT VoicePurgeEvent ([in]SpeechRecoEvents EventInterest);
2830 [propget, id (DISPID_SRCVoicePurgeEvent)] HRESULT VoicePurgeEvent ([out, retval]SpeechRecoEvents *EventInterest);
2831 [propput, id (DISPID_SRCEventInterests)] HRESULT EventInterests ([in]SpeechRecoEvents EventInterest);
2832 [propget, id (DISPID_SRCEventInterests)] HRESULT EventInterests ([out, retval]SpeechRecoEvents *EventInterest);
2833 [propput, id (DISPID_SRCCmdMaxAlternates)] HRESULT CmdMaxAlternates ([in] long MaxAlternates);
2834 [propget, id (DISPID_SRCCmdMaxAlternates)] HRESULT CmdMaxAlternates ([out, retval] long *MaxAlternates);
2835 [propput, id (DISPID_SRCState)] HRESULT State ([in] SpeechRecoContextState State);
2836 [propget, id (DISPID_SRCState)] HRESULT State ([out, retval] SpeechRecoContextState *State);
2837 [propput, id (DISPID_SRCRetainedAudio)] HRESULT RetainedAudio ([in]SpeechRetainedAudioOptions Option);
2838 [propget, id (DISPID_SRCRetainedAudio)] HRESULT RetainedAudio ([out, retval]SpeechRetainedAudioOptions *Option);
2839 [propputref, id (DISPID_SRCRetainedAudioFormat)] HRESULT RetainedAudioFormat ([in] ISpeechAudioFormat *Format);
2840 [propget, id (DISPID_SRCRetainedAudioFormat)] HRESULT RetainedAudioFormat ([out, retval] ISpeechAudioFormat **Format);
2841 [id (DISPID_SRCPause)] HRESULT Pause (void);
2842 [id (DISPID_SRCResume)] HRESULT Resume (void);
2843 [id (DISPID_SRCCreateGrammar)] HRESULT CreateGrammar ([in, defaultvalue (0)]VARIANT GrammarId,[out, retval]ISpeechRecoGrammar **Grammar);
2844 [id (DISPID_SRCCreateResultFromMemory)] HRESULT CreateResultFromMemory ([in]VARIANT *ResultBlock,[out, retval]ISpeechRecoResult **Result);
2845 [id (DISPID_SRCBookmark)] HRESULT Bookmark ([in]SpeechBookmarkOptions Options,[in]VARIANT StreamPos,[in]VARIANT BookmarkId);
2846 [id (DISPID_SRCSetAdaptationData)] HRESULT SetAdaptationData ([in]BSTR AdaptationString);
2847};
2848
2849[object, uuid (B6D6F79F-2158-4e50-B5BC-9a9ccd852a09), dual, pointer_default (unique)]
2850interface ISpeechRecoGrammar : IDispatch {
2851 [propget, id (DISPID_SRGId)] HRESULT Id ([out, retval]VARIANT *Id);
2852 [propget, id (DISPID_SRGRecoContext)] HRESULT RecoContext ([out, retval] ISpeechRecoContext **RecoContext);
2853 [propput, id (DISPID_SRGState)] HRESULT State ([in]SpeechGrammarState State);
2854 [propget, id (DISPID_SRGState)] HRESULT State ([out, retval]SpeechGrammarState *State);
2855 [propget, id (DISPID_SRGRules)] HRESULT Rules ([out, retval]ISpeechGrammarRules **Rules);
2856 [id (DISPID_SRGReset)] HRESULT Reset ([in, defaultvalue (0)]SpeechLanguageId NewLanguage);
2857 [id (DISPID_SRGCmdLoadFromFile)] HRESULT CmdLoadFromFile ([in]const BSTR FileName,[in, defaultvalue (SLOStatic)]SpeechLoadOption LoadOption);
2858 [id (DISPID_SRGCmdLoadFromObject)] HRESULT CmdLoadFromObject ([in]const BSTR ClassId,[in]const BSTR GrammarName,[in, defaultvalue (SLOStatic)]SpeechLoadOption LoadOption);
2859 [id (DISPID_SRGCmdLoadFromResource)] HRESULT CmdLoadFromResource ([in]long hModule,[in]VARIANT ResourceName,[in]VARIANT ResourceType,[in]SpeechLanguageId LanguageId,[in, defaultvalue (SLOStatic)]SpeechLoadOption LoadOption);
2860 [id (DISPID_SRGCmdLoadFromMemory)] HRESULT CmdLoadFromMemory ([in] VARIANT GrammarData,[in, defaultvalue (SLOStatic)]SpeechLoadOption LoadOption);
2861 [id (DISPID_SRGCmdLoadFromProprietaryGrammar)] HRESULT CmdLoadFromProprietaryGrammar ([in]const BSTR ProprietaryGuid,[in]const BSTR ProprietaryString,[in]VARIANT ProprietaryData,[in, defaultvalue (SLOStatic)]SpeechLoadOption LoadOption);
2862 [id (DISPID_SRGCmdSetRuleState)] HRESULT CmdSetRuleState ([in]const BSTR Name,[in]SpeechRuleState State);
2863 [id (DISPID_SRGCmdSetRuleIdState)] HRESULT CmdSetRuleIdState ([in]long RuleId,[in]SpeechRuleState State);
2864 [id (DISPID_SRGDictationLoad)] HRESULT DictationLoad ([in, defaultvalue (L"")] const BSTR TopicName,[in, defaultvalue (SLOStatic)]SpeechLoadOption LoadOption);
2865 [id (DISPID_SRGDictationUnload)] HRESULT DictationUnload (void);
2866 [id (DISPID_SRGDictationSetState)] HRESULT DictationSetState ([in]SpeechRuleState State);
2867 [id (DISPID_SRGSetWordSequenceData)] HRESULT SetWordSequenceData ([in]const BSTR Text,[in]long TextLength,[in]ISpeechTextSelectionInformation *Info);
2868 [id (DISPID_SRGSetTextSelection)] HRESULT SetTextSelection ([in]ISpeechTextSelectionInformation *Info);
2869 [id (DISPID_SRGIsPronounceable)] HRESULT IsPronounceable ([in]const BSTR Word,[out, retval]SpeechWordPronounceable *WordPronounceable);
2870};
2871
2872[uuid (7b8fcb42-0e9d-4f00-A048-7b04d6179d3d)]
2873dispinterface _ISpeechRecoContextEvents {
2874 properties:
2875 methods:
2876 [id (DISPID_SRCEStartStream)] void StartStream ([in]long StreamNumber,[in]VARIANT StreamPosition);
2877 [id (DISPID_SRCEEndStream)] void EndStream ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]VARIANT_BOOL StreamReleased);
2878 [id (DISPID_SRCEBookmark)] void Bookmark ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]VARIANT BookmarkId,[in]SpeechBookmarkOptions Options);
2879 [id (DISPID_SRCESoundStart)] void SoundStart ([in]long StreamNumber,[in]VARIANT StreamPosition);
2880 [id (DISPID_SRCESoundEnd)] void SoundEnd ([in]long StreamNumber,[in]VARIANT StreamPosition);
2881 [id (DISPID_SRCEPhraseStart)] void PhraseStart ([in]long StreamNumber,[in]VARIANT StreamPosition);
2882 [id (DISPID_SRCERecognition)] void Recognition ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]SpeechRecognitionType RecognitionType,[in]ISpeechRecoResult *Result);
2883 [id (DISPID_SRCEHypothesis)] void Hypothesis ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]ISpeechRecoResult *Result);
2884 [id (DISPID_SRCEPropertyNumberChange)] void PropertyNumberChange ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]BSTR PropertyName,[in]long NewNumberValue);
2885 [id (DISPID_SRCEPropertyStringChange)] void PropertyStringChange ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]BSTR PropertyName,[in]BSTR NewStringValue);
2886 [id (DISPID_SRCEFalseRecognition)] void FalseRecognition ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]ISpeechRecoResult *Result);
2887 [id (DISPID_SRCEInterference)] void Interference ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]SpeechInterference Interference);
2888 [id (DISPID_SRCERequestUI)] void RequestUI ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]BSTR UIType);
2889 [id (DISPID_SRCERecognizerStateChange)] void RecognizerStateChange ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]SpeechRecognizerState NewState);
2890 [id (DISPID_SRCEAdaptation)] void Adaptation ([in]long StreamNumber,[in]VARIANT StreamPosition);
2891 [id (DISPID_SRCERecognitionForOtherContext)] void RecognitionForOtherContext ([in]long StreamNumber,[in]VARIANT StreamPosition);
2892 [id (DISPID_SRCEAudioLevel)] void AudioLevel ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]long AudioLevel);
2893 [id (DISPID_SRCEEnginePrivate)] void EnginePrivate ([in]long StreamNumber,[in]VARIANT StreamPosition,[in]VARIANT EngineData);
2894};
2895
2896[object, uuid (AFE719CF-5dd1-44f2-999c-7a399f1cfccc), dual, pointer_default (unique)]
2897interface ISpeechGrammarRule : IDispatch {
2898 [propget, id (DISPID_SGRAttributes)] HRESULT Attributes ([out, retval] SpeechRuleAttributes *Attributes);
2899 [propget, id (DISPID_SGRInitialState)] HRESULT InitialState ([out, retval] ISpeechGrammarRuleState **State);
2900 [propget, id (DISPID_SGRName)] HRESULT Name ([out, retval] BSTR *Name);
2901 [propget, id (DISPID_SGRId)] HRESULT Id ([out, retval] long *Id);
2902 [id (DISPID_SGRClear)] HRESULT Clear ();
2903 [id (DISPID_SGRAddResource)] HRESULT AddResource ([in]const BSTR ResourceName,[in]const BSTR ResourceValue);
2904 [id (DISPID_SGRAddState)] HRESULT AddState ([out, retval] ISpeechGrammarRuleState **State);
2905};
2906
2907[object, uuid (6ffa3b44-FC2D-40d1-8afc-32911c7f1ad1), dual, pointer_default (unique)]
2908interface ISpeechGrammarRules : IDispatch {
2909 [propget, id (DISPID_SGRsCount)] HRESULT Count ([out, retval] long *Count);
2910 [id (DISPID_SGRsFindRule)] HRESULT FindRule ([in]VARIANT RuleNameOrId,[out, retval]ISpeechGrammarRule **Rule);
2911 [id (DISPID_SGRsItem)] HRESULT Item ([in] long Index,[out, retval]ISpeechGrammarRule **Rule);
2912 [propget, id (DISPID_SGRs_NewEnum), restricted] HRESULT _NewEnum ([out, retval] IUnknown **EnumVARIANT);
2913 [propget, id (DISPID_SGRsDynamic)] HRESULT Dynamic ([out, retval] VARIANT_BOOL *Dynamic);
2914 [id (DISPID_SGRsAdd)] HRESULT Add ([in] BSTR RuleName,[in] SpeechRuleAttributes Attributes,[in, defaultvalue (0)] long RuleId,[out, retval] ISpeechGrammarRule **Rule);
2915 [id (DISPID_SGRsCommit)] HRESULT Commit (void);
2916 [id (DISPID_SGRsCommitAndSave)] HRESULT CommitAndSave ([out] BSTR *ErrorText,[out, retval] VARIANT *SaveStream);
2917};
2918
2919[object, uuid (D4286F2C-EE67-45ae-B928-28d695362eda), dual, pointer_default (unique)]
2920interface ISpeechGrammarRuleState : IDispatch {
2921 [propget, id (DISPID_SGRSRule)] HRESULT Rule ([out, retval] ISpeechGrammarRule **Rule);
2922 [propget, id (DISPID_SGRSTransitions)] HRESULT Transitions ([out, retval] ISpeechGrammarRuleStateTransitions **Transitions);
2923 [id (DISPID_SGRSAddWordTransition)] HRESULT AddWordTransition ([in]ISpeechGrammarRuleState *DestState,[in]const BSTR Words, [in, defaultvalue (L" ")]const BSTR Separators, [in, defaultvalue (SGLexical)]SpeechGrammarWordType Type, [in, defaultvalue (L"")]const BSTR PropertyName, [in, defaultvalue (0)]long PropertyId, [in, defaultvalue (0)]VARIANT *PropertyValue, [in, defaultvalue (1)]float Weight);
2924 [id (DISPID_SGRSAddRuleTransition)] HRESULT AddRuleTransition ([in]ISpeechGrammarRuleState *DestinationState,[in]ISpeechGrammarRule *Rule,[in, defaultvalue (L"")]const BSTR PropertyName,[in, defaultvalue (0)]long PropertyId,[in, defaultvalue (0)]VARIANT *PropertyValue,[in, defaultvalue (1)]float Weight);
2925 [id (DISPID_SGRSAddSpecialTransition)] HRESULT AddSpecialTransition ([in]ISpeechGrammarRuleState *DestinationState,[in]SpeechSpecialTransitionType Type,[in, defaultvalue (L"")]const BSTR PropertyName,[in, defaultvalue (0)]long PropertyId,[in, defaultvalue (0)]VARIANT *PropertyValue,[in, defaultvalue (1)]float Weight);
2926};
2927
2928[object, uuid (EABCE657-75bc-44a2-AA7F-C56476742963), dual, pointer_default (unique)]
2929interface ISpeechGrammarRuleStateTransitions : IDispatch {
2930 [propget, id (DISPID_SGRSTsCount)] HRESULT Count ([out, retval] long *Count);
2931 [id (DISPID_SGRSTsItem)] HRESULT Item ([in] long Index,[out, retval]ISpeechGrammarRuleStateTransition **Transition);
2932 [propget, restricted, id (DISPID_SGRSTs_NewEnum)] HRESULT _NewEnum ([out, retval] IUnknown **EnumVARIANT);
2933};
2934
2935[object, uuid (CAFD1DB1-41d1-4a06-9863-E2E81DA17A9A), dual, pointer_default (unique)]
2936interface ISpeechGrammarRuleStateTransition : IDispatch {
2937 [propget, id (DISPID_SGRSTType)] HRESULT Type ([out, retval] SpeechGrammarRuleStateTransitionType *Type);
2938 [propget, id (DISPID_SGRSTText)] HRESULT Text ([out, retval] BSTR *Text);
2939 [propget, id (DISPID_SGRSTRule)] HRESULT Rule ([out, retval] ISpeechGrammarRule **Rule);
2940 [propget, id (DISPID_SGRSTWeight)] HRESULT Weight ([out, retval] VARIANT *Weight);
2941 [propget, id (DISPID_SGRSTPropertyName)] HRESULT PropertyName ([out, retval] BSTR *PropertyName);
2942 [propget, id (DISPID_SGRSTPropertyId)] HRESULT PropertyId ([out, retval] long *PropertyId);
2943 [propget, id (DISPID_SGRSTPropertyValue)] HRESULT PropertyValue ([out, retval] VARIANT *PropertyValue);
2944 [propget, id (DISPID_SGRSTNextState)] HRESULT NextState ([out, retval] ISpeechGrammarRuleState **NextState);
2945};
2946
2947[object, uuid (3b9c7e7a-6eee-4ded-9092-11657279adbe), dual, pointer_default (unique)]
2948interface ISpeechTextSelectionInformation : IDispatch {
2949 [propput, id (DISPIDSPTSI_ActiveOffset)] HRESULT ActiveOffset ([in]long ActiveOffset);
2950 [propget, id (DISPIDSPTSI_ActiveOffset)] HRESULT ActiveOffset ([out, retval]long *ActiveOffset);
2951 [propput, id (DISPIDSPTSI_ActiveLength)] HRESULT ActiveLength ([in]long ActiveLength);
2952 [propget, id (DISPIDSPTSI_ActiveLength)] HRESULT ActiveLength ([out, retval]long *ActiveLength);
2953 [propput, id (DISPIDSPTSI_SelectionOffset)] HRESULT SelectionOffset ([in]long SelectionOffset);
2954 [propget, id (DISPIDSPTSI_SelectionOffset)] HRESULT SelectionOffset ([out, retval]long *SelectionOffset);
2955 [propput, id (DISPIDSPTSI_SelectionLength)] HRESULT SelectionLength ([in]long SelectionLength);
2956 [propget, id (DISPIDSPTSI_SelectionLength)] HRESULT SelectionLength ([out, retval]long *SelectionLength);
2957};
2958
2959[object, uuid (ED2879CF-CED9-4ee6-A534-DE0191D5468D), dual, pointer_default (unique)]
2960interface ISpeechRecoResult : IDispatch {
2961 [propget, id (DISPID_SRRRecoContext)] HRESULT RecoContext ([out, retval]ISpeechRecoContext **RecoContext);
2962 [propget, id (DISPID_SRRTimes)] HRESULT Times ([out, retval]ISpeechRecoResultTimes **Times);
2963 [propputref, id (DISPID_SRRAudioFormat)] HRESULT AudioFormat ([in]ISpeechAudioFormat *Format);
2964 [propget, id (DISPID_SRRAudioFormat)] HRESULT AudioFormat ([out, retval]ISpeechAudioFormat **Format);
2965 [propget, id (DISPID_SRRPhraseInfo)] HRESULT PhraseInfo ([out, retval]ISpeechPhraseInfo **PhraseInfo);
2966 [id (DISPID_SRRAlternates)] HRESULT Alternates ([in] long RequestCount,[in, defaultvalue (0)] long StartElement,[in, defaultvalue (SPPR_ALL_ELEMENTS)] long Elements,[out, retval] ISpeechPhraseAlternates **Alternates);
2967 [id (DISPID_SRRAudio)] HRESULT Audio ([in, defaultvalue (0)] long StartElement,[in, defaultvalue (SPPR_ALL_ELEMENTS)] long Elements,[out, retval] ISpeechMemoryStream **Stream);
2968 [id (DISPID_SRRSpeakAudio)] HRESULT SpeakAudio ([in, defaultvalue (0)] long StartElement,[in, defaultvalue (SPPR_ALL_ELEMENTS)] long Elements,[in, defaultvalue (SPF_DEFAULT)] SpeechVoiceSpeakFlags Flags,[out, retval]long *StreamNumber);
2969 [id (DISPID_SRRSaveToMemory)] HRESULT SaveToMemory ([out, retval] VARIANT *ResultBlock);
2970 [id (DISPID_SRRDiscardResultInfo)] HRESULT DiscardResultInfo ([in]SpeechDiscardType ValueTypes);
2971};
2972
2973#if _SAPI_BLD_ >= 0x53
2974[object, uuid (AAEC54AF-8f85-4924-944d-B79D39D72E19), dual, pointer_default (unique)]
2975interface ISpeechXMLRecoResult : ISpeechRecoResult {
2976 [id (DISPID_SRRGetXMLResult)] HRESULT GetXMLResult ([in] SPXMLRESULTOPTIONS Options,[out, retval] BSTR *pResult);
2977 [id (DISPID_SRRGetXMLErrorInfo)] HRESULT GetXMLErrorInfo ([out] long *LineNumber,[out]BSTR *ScriptLine,[out]BSTR *Source,[out]BSTR *Description,[out]long *ResultCode,[out, retval]VARIANT_BOOL *IsError);
2978};
2979
2980[object, uuid (8e0a246d-D3C8-45de-8657-04290c458c3c), dual, pointer_default (unique)]
2981interface ISpeechRecoResult2: ISpeechRecoResult {
2982 [id (DISPID_SRRSetTextFeedback)] HRESULT SetTextFeedback ([in]BSTR Feedback,[in]VARIANT_BOOL WasSuccessful);
2983}
2984
2985[object, uuid (6d60eb64-ACED-40a6-BBF3-4e557f71dee2), dual, hidden, pointer_default (unique)]
2986interface ISpeechRecoResultDispatch : IDispatch {
2987 [propget, id (DISPID_SRRRecoContext)] HRESULT RecoContext ([out, retval]ISpeechRecoContext **RecoContext);
2988 [propget, id (DISPID_SRRTimes)] HRESULT Times ([out, retval]ISpeechRecoResultTimes **Times);
2989 [propputref, id (DISPID_SRRAudioFormat)] HRESULT AudioFormat ([in]ISpeechAudioFormat *Format);
2990 [propget, id (DISPID_SRRAudioFormat)] HRESULT AudioFormat ([out, retval]ISpeechAudioFormat **Format);
2991 [propget, id (DISPID_SRRPhraseInfo)] HRESULT PhraseInfo ([out, retval]ISpeechPhraseInfo **PhraseInfo);
2992 [id (DISPID_SRRAlternates)] HRESULT Alternates ([in] long RequestCount,[in, defaultvalue (0)] long StartElement,[in, defaultvalue (SPPR_ALL_ELEMENTS)] long Elements,[out, retval] ISpeechPhraseAlternates **Alternates);
2993 [id (DISPID_SRRAudio)] HRESULT Audio ([in, defaultvalue (0)] long StartElement,[in, defaultvalue (SPPR_ALL_ELEMENTS)] long Elements,[out, retval] ISpeechMemoryStream **Stream);
2994 [id (DISPID_SRRSpeakAudio)] HRESULT SpeakAudio ([in, defaultvalue (0)] long StartElement,[in, defaultvalue (SPPR_ALL_ELEMENTS)] long Elements,[in, defaultvalue (SPF_DEFAULT)] SpeechVoiceSpeakFlags Flags,[out, retval]long *StreamNumber);
2995 [id (DISPID_SRRSaveToMemory)] HRESULT SaveToMemory ([out, retval] VARIANT *ResultBlock);
2996 [id (DISPID_SRRDiscardResultInfo)] HRESULT DiscardResultInfo ([in]SpeechDiscardType ValueTypes);
2997 [id (DISPID_SRRGetXMLResult)] HRESULT GetXMLResult ([in] SPXMLRESULTOPTIONS Options,[out, retval] BSTR *pResult);
2998 [id (DISPID_SRRGetXMLErrorInfo)] HRESULT GetXMLErrorInfo ([out] long *LineNumber,[out]BSTR *ScriptLine,[out]BSTR *Source,[out]BSTR *Description,[out]HRESULT *ResultCode,[out, retval]VARIANT_BOOL *IsError);
2999 [id (DISPID_SRRSetTextFeedback)] HRESULT SetTextFeedback ([in] BSTR Feedback,[in] VARIANT_BOOL WasSuccessful);
3000};
3001#endif
3002
3003[object, uuid (3b151836-DF3A-4e0a-846c-D2ADC9334333), dual, pointer_default (unique)]
3004interface ISpeechPhraseInfoBuilder : IDispatch {
3005 [id (DISPID_SPPBRestorePhraseFromMemory)] HRESULT RestorePhraseFromMemory ([in] VARIANT *PhraseInMemory,[out, retval] ISpeechPhraseInfo **PhraseInfo);
3006};
3007
3008[object, uuid (62b3b8fb-F6E7-41be-BDCB-056b1c29efc0), dual, pointer_default (unique)]
3009interface ISpeechRecoResultTimes : IDispatch {
3010 [propget, id (DISPID_SRRTStreamTime)] HRESULT StreamTime ([out, retval]VARIANT *Time);
3011 [propget, id (DISPID_SRRTLength)] HRESULT Length ([out, retval]VARIANT *Length);
3012 [propget, id (DISPID_SRRTTickCount)] HRESULT TickCount ([out, retval]long *TickCount);
3013 [propget, id (DISPID_SRRTOffsetFromStart)] HRESULT OffsetFromStart ([out, retval]VARIANT *OffsetFromStart);
3014};
3015
3016[object, uuid (27864a2a-2b9f-4cb8-92d3-0d2722fd1e73), dual, pointer_default (unique)]
3017interface ISpeechPhraseAlternate : IDispatch {
3018 [propget, id (DISPID_SPARecoResult)] HRESULT RecoResult ([out, retval]ISpeechRecoResult **RecoResult);
3019 [propget, id (DISPID_SPAStartElementInResult)] HRESULT StartElementInResult ([out, retval]long *StartElement);
3020 [propget, id (DISPID_SPANumberOfElementsInResult)] HRESULT NumberOfElementsInResult ([out, retval]long *NumberOfElements);
3021 [propget, id (DISPID_SPAPhraseInfo)] HRESULT PhraseInfo ([out, retval]ISpeechPhraseInfo **PhraseInfo);
3022 [id (DISPID_SPACommit)] HRESULT Commit (void);
3023};
3024
3025[object, uuid (B238B6D5-F276-4c3d-A6C1-2974801c3cc2), dual, pointer_default (unique)]
3026interface ISpeechPhraseAlternates : IDispatch {
3027 [propget, id (DISPID_SPAsCount)] HRESULT Count ([out, retval] long *Count);
3028 [id (DISPID_SPAsItem)] HRESULT Item ([in] long Index,[out, retval]ISpeechPhraseAlternate **PhraseAlternate);
3029 [propget, restricted, id (DISPID_SPAs_NewEnum)] HRESULT _NewEnum ([out, retval] IUnknown **EnumVARIANT);
3030};
3031
3032[object, uuid (961559cf-4e67-4662-8bf0-D93F1FCD61B3), dual, pointer_default (unique)]
3033interface ISpeechPhraseInfo : IDispatch {
3034 [propget, id (DISPID_SPILanguageId)] HRESULT LanguageId ([out, retval]long *LanguageId);
3035 [propget, id (DISPID_SPIGrammarId)] HRESULT GrammarId ([out, retval]VARIANT *GrammarId);
3036 [propget, id (DISPID_SPIStartTime)] HRESULT StartTime ([out, retval]VARIANT *StartTime);
3037 [propget, id (DISPID_SPIAudioStreamPosition)] HRESULT AudioStreamPosition ([out, retval]VARIANT *AudioStreamPosition);
3038 [propget, id (DISPID_SPIAudioSizeBytes)] HRESULT AudioSizeBytes ([out, retval]long *pAudioSizeBytes);
3039 [propget, id (DISPID_SPIRetainedSizeBytes)] HRESULT RetainedSizeBytes ([out, retval]long *RetainedSizeBytes);
3040 [propget, id (DISPID_SPIAudioSizeTime)] HRESULT AudioSizeTime ([out, retval]long *AudioSizeTime);
3041 [propget, id (DISPID_SPIRule)] HRESULT Rule ([out, retval]ISpeechPhraseRule **Rule);
3042 [propget, id (DISPID_SPIProperties)] HRESULT Properties ([out, retval]ISpeechPhraseProperties **Properties);
3043 [propget, id (DISPID_SPIElements)] HRESULT Elements ([out, retval]ISpeechPhraseElements **Elements);
3044 [propget, id (DISPID_SPIReplacements)] HRESULT Replacements ([out, retval]ISpeechPhraseReplacements **Replacements);
3045 [propget, id (DISPID_SPIEngineId)] HRESULT EngineId ([out, retval]BSTR *EngineIdGuid);
3046 [propget, id (DISPID_SPIEnginePrivateData)] HRESULT EnginePrivateData ([out, retval]VARIANT *PrivateData);
3047 [id (DISPID_SPISaveToMemory)] HRESULT SaveToMemory ([out, retval]VARIANT *PhraseBlock);
3048 [id (DISPID_SPIGetText)] HRESULT GetText ([in, defaultvalue (0)] long StartElement,[in, defaultvalue (SPPR_ALL_ELEMENTS)] long Elements,[in, defaultvalue (-1)] VARIANT_BOOL UseReplacements,[out, retval]BSTR *Text);
3049 [id (DISPID_SPIGetDisplayAttributes)] HRESULT GetDisplayAttributes ([in, defaultvalue (0)] long StartElement,[in, defaultvalue (SPPR_ALL_ELEMENTS)] long Elements,[in, defaultvalue (-1)] VARIANT_BOOL UseReplacements,[out, retval]SpeechDisplayAttributes *DisplayAttributes);
3050};
3051
3052[object, uuid (E6176F96-E373-4801-B223-3b62c068c0b4), dual, pointer_default (unique)]
3053interface ISpeechPhraseElement : IDispatch {
3054 [propget, id (DISPID_SPEAudioTimeOffset)] HRESULT AudioTimeOffset ([out, retval]long *AudioTimeOffset);
3055 [propget, id (DISPID_SPEAudioSizeTime)] HRESULT AudioSizeTime ([out, retval]long *AudioSizeTime);
3056 [propget, id (DISPID_SPEAudioStreamOffset)] HRESULT AudioStreamOffset ([out, retval]long *AudioStreamOffset);
3057 [propget, id (DISPID_SPEAudioSizeBytes)] HRESULT AudioSizeBytes ([out, retval]long *AudioSizeBytes);
3058 [propget, id (DISPID_SPERetainedStreamOffset)] HRESULT RetainedStreamOffset ([out, retval]long *RetainedStreamOffset);
3059 [propget, id (DISPID_SPERetainedSizeBytes)] HRESULT RetainedSizeBytes ([out, retval]long *RetainedSizeBytes);
3060 [propget, id (DISPID_SPEDisplayText)] HRESULT DisplayText ([out, retval]BSTR *DisplayText);
3061 [propget, id (DISPID_SPELexicalForm)] HRESULT LexicalForm ([out, retval]BSTR *LexicalForm);
3062 [propget, id (DISPID_SPEPronunciation)] HRESULT Pronunciation ([out, retval]VARIANT *Pronunciation);
3063 [propget, id (DISPID_SPEDisplayAttributes)] HRESULT DisplayAttributes ([out, retval]SpeechDisplayAttributes *DisplayAttributes);
3064 [propget, id (DISPID_SPERequiredConfidence)] HRESULT RequiredConfidence ([out, retval]SpeechEngineConfidence *RequiredConfidence);
3065 [propget, id (DISPID_SPEActualConfidence)] HRESULT ActualConfidence ([out, retval]SpeechEngineConfidence *ActualConfidence);
3066 [propget, id (DISPID_SPEEngineConfidence)] HRESULT EngineConfidence ([out, retval]float *EngineConfidence);
3067};
3068
3069[object, uuid (0626b328-3478-467d-A0B3-D0853B93DDA3), dual, pointer_default (unique)]
3070interface ISpeechPhraseElements : IDispatch {
3071 [propget, id (DISPID_SPEsCount)] HRESULT Count ([out, retval] long *Count);
3072 [id (DISPID_SPEsItem)] HRESULT Item ([in] long Index,[out, retval]ISpeechPhraseElement **Element);
3073 [propget, restricted, id (DISPID_SPEs_NewEnum)] HRESULT _NewEnum ([out, retval] IUnknown **EnumVARIANT);
3074};
3075
3076[object, uuid (2890a410-53a7-4fb5-94ec-06d4998e3d02), dual, pointer_default (unique)]
3077interface ISpeechPhraseReplacement : IDispatch {
3078 [propget, id (DISPID_SPRDisplayAttributes)] HRESULT DisplayAttributes ([out, retval]SpeechDisplayAttributes *DisplayAttributes);
3079 [propget, id (DISPID_SPRText)] HRESULT Text ([out, retval]BSTR *Text);
3080 [propget, id (DISPID_SPRFirstElement)] HRESULT FirstElement ([out, retval]long *FirstElement);
3081 [propget, id (DISPID_SPRNumberOfElements)] HRESULT NumberOfElements ([out, retval]long *NumberOfElements);
3082};
3083
3084[object, uuid (38bc662f-2257-4525-959e-2069d2596c05), dual, pointer_default (unique)]
3085interface ISpeechPhraseReplacements : IDispatch {
3086 [propget, id (DISPID_SPRsCount)] HRESULT Count ([out, retval] long *Count);
3087 [id (DISPID_SPRsItem)] HRESULT Item ([in] long Index,[out, retval]ISpeechPhraseReplacement **Reps);
3088 [propget, restricted, id (DISPID_SPRs_NewEnum)] HRESULT _NewEnum ([out, retval] IUnknown **EnumVARIANT);
3089};
3090
3091[object, uuid (CE563D48-961e-4732-A2E1-378a42b430be), dual, pointer_default (unique)]
3092interface ISpeechPhraseProperty : IDispatch {
3093 [propget, id (DISPID_SPPName)] HRESULT Name ([out, retval]BSTR *Name);
3094 [propget, id (DISPID_SPPId)] HRESULT Id ([out, retval]long *Id);
3095 [propget, id (DISPID_SPPValue)] HRESULT Value ([out, retval]VARIANT *Value);
3096 [propget, id (DISPID_SPPFirstElement)] HRESULT FirstElement ([out, retval]long *FirstElement);
3097 [propget, id (DISPID_SPPNumberOfElements)] HRESULT NumberOfElements ([out, retval]long *NumberOfElements);
3098 [propget, id (DISPID_SPPEngineConfidence)] HRESULT EngineConfidence ([out, retval]float *Confidence);
3099 [propget, id (DISPID_SPPConfidence)] HRESULT Confidence ([out, retval]SpeechEngineConfidence *Confidence);
3100 [propget, id (DISPID_SPPParent)] HRESULT Parent ([out, retval]ISpeechPhraseProperty **ParentProperty);
3101 [propget, id (DISPID_SPPChildren)] HRESULT Children ([out, retval]ISpeechPhraseProperties **Children);
3102};
3103
3104[object, uuid (08166b47-102e-4b23-A599-BDB98DBFD1F4), dual, pointer_default (unique)]
3105interface ISpeechPhraseProperties : IDispatch {
3106 [propget, id (DISPID_SPPsCount)] HRESULT Count ([out, retval] long *Count);
3107 [id (DISPID_SPPsItem)] HRESULT Item ([in] long Index,[out, retval]ISpeechPhraseProperty **Property);
3108 [propget, id (DISPID_SPPs_NewEnum), restricted] HRESULT _NewEnum ([out, retval] IUnknown **EnumVARIANT);
3109};
3110
3111[object, uuid (A7BFE112-A4A0-48d9-B602-C313843F6964), dual, pointer_default (unique)]
3112interface ISpeechPhraseRule : IDispatch {
3113 [propget, id (DISPID_SPRuleName)] HRESULT Name ([out, retval]BSTR *Name);
3114 [propget, id (DISPID_SPRuleId)] HRESULT Id ([out, retval]long *Id);
3115 [propget, id (DISPID_SPRuleFirstElement)] HRESULT FirstElement ([out, retval]long *FirstElement);
3116 [propget, id (DISPID_SPRuleNumberOfElements)] HRESULT NumberOfElements ([out, retval]long *NumberOfElements);
3117 [propget, id (DISPID_SPRuleParent)] HRESULT Parent ([out, retval]ISpeechPhraseRule **Parent);
3118 [propget, id (DISPID_SPRuleChildren)] HRESULT Children ([out, retval]ISpeechPhraseRules **Children);
3119 [propget, id (DISPID_SPRuleConfidence)] HRESULT Confidence ([out, retval]SpeechEngineConfidence *ActualConfidence);
3120 [propget, id (DISPID_SPRuleEngineConfidence)] HRESULT EngineConfidence ([out, retval]float *EngineConfidence);
3121};
3122
3123[object, uuid (9047d593-01dd-4b72-81a3-E4A0CA69F407), dual, pointer_default (unique)]
3124interface ISpeechPhraseRules : IDispatch {
3125 [propget, id (DISPID_SPRulesCount)] HRESULT Count ([out, retval] long *Count);
3126 [id (DISPID_SPRulesItem)] HRESULT Item ([in] long Index,[out, retval]ISpeechPhraseRule **Rule);
3127 [propget, restricted, id (DISPID_SPRules_NewEnum)] HRESULT _NewEnum ([out, retval] IUnknown **EnumVARIANT);
3128};
3129
3130[object, uuid (8d199862-415e-47d5-AC4F-FAA608B424E6), dual, pointer_default (unique)]
3131interface ISpeechLexiconWords : IDispatch {
3132 [id (DISPID_SLWsCount), propget] HRESULT Count ([out, retval] long *Count);
3133 [id (DISPID_VALUE)] HRESULT Item ([in] long Index,[out, retval]ISpeechLexiconWord **Word);
3134 [id (DISPID_NEWENUM), propget, restricted] HRESULT _NewEnum ([out, retval] IUnknown **EnumVARIANT);
3135};
3136
3137[object, uuid (3da7627a-C7AE-4b23-8708-638c50362c25), dual, pointer_default (unique)]
3138interface ISpeechLexicon : IDispatch {
3139 [id (DISPID_SLGenerationId), propget, hidden] HRESULT GenerationId ([out, retval]long *GenerationId);
3140 [id (DISPID_SLGetWords)] HRESULT GetWords ([in, defaultvalue (eLEXTYPE_USER | eLEXTYPE_APP)]SpeechLexiconType Flags,[out, defaultvalue (NULL)]long *GenerationID,[out, retval]ISpeechLexiconWords **Words);
3141 [id (DISPID_SLAddPronunciation)] HRESULT AddPronunciation ([in]BSTR bstrWord,[in]SpeechLanguageId LangId,[in, defaultvalue (SPSUnknown)]SpeechPartOfSpeech PartOfSpeech,[in, defaultvalue (L"")]BSTR bstrPronunciation);
3142 [hidden, id (DISPID_SLAddPronunciationByPhoneIds)] HRESULT AddPronunciationByPhoneIds ([in]BSTR bstrWord,[in]SpeechLanguageId LangId,[in, defaultvalue (SPSUnknown)]SpeechPartOfSpeech PartOfSpeech,[in, defaultvalue (NULL)]VARIANT *PhoneIds);
3143 [id (DISPID_SLRemovePronunciation)] HRESULT RemovePronunciation ([in]BSTR bstrWord,[in]SpeechLanguageId LangId,[in, defaultvalue (SPSUnknown)]SpeechPartOfSpeech PartOfSpeech,[in, defaultvalue (L"")]BSTR bstrPronunciation);
3144 [id (DISPID_SLRemovePronunciationByPhoneIds), hidden] HRESULT RemovePronunciationByPhoneIds ([in]BSTR bstrWord,[in]SpeechLanguageId LangId,[in, defaultvalue (SPSUnknown)]SpeechPartOfSpeech PartOfSpeech,[in, defaultvalue (NULL)]VARIANT *PhoneIds);
3145 [id (DISPID_SLGetPronunciations)] HRESULT GetPronunciations ([in]BSTR bstrWord,[in, defaultvalue (0)]SpeechLanguageId LangId,[in, defaultvalue (eLEXTYPE_USER | eLEXTYPE_APP)]SpeechLexiconType TypeFlags,[out, retval]ISpeechLexiconPronunciations **ppPronunciations);
3146 [id (DISPID_SLGetGenerationChange), hidden] HRESULT GetGenerationChange ([in, out]long *GenerationID,[out, retval]ISpeechLexiconWords **ppWords);
3147};
3148
3149[object, uuid (4e5b933c-C9BE-48ed-8842-1ee51bb1d4ff), dual, pointer_default (unique)]
3150interface ISpeechLexiconWord : IDispatch {
3151 [id (DISPID_SLWLangId), propget] HRESULT LangId ([out, retval]SpeechLanguageId *LangId);
3152 [id (DISPID_SLWType), propget] HRESULT Type ([out, retval]SpeechWordType *WordType);
3153 [id (DISPID_SLWWord), propget] HRESULT Word ([out, retval]BSTR *Word);
3154 [id (DISPID_SLWPronunciations), propget] HRESULT Pronunciations ([out, retval]ISpeechLexiconPronunciations **Pronunciations);
3155};
3156
3157[object, uuid (72829128-5682-4704-A0D4-3e2bb6f2ead3), dual, pointer_default (unique)]
3158interface ISpeechLexiconPronunciations : IDispatch {
3159 [id (DISPID_SLPsCount), propget] HRESULT Count ([out, retval] long *Count);
3160 [id (DISPID_VALUE)] HRESULT Item ([in] long Index,[out, retval]ISpeechLexiconPronunciation **Pronunciation);
3161 [id (DISPID_NEWENUM), propget, restricted] HRESULT _NewEnum ([out, retval] IUnknown **EnumVARIANT);
3162};
3163
3164[object, uuid (95252c5d-9e43-4f4a-9899-48ee73352f9f), dual, pointer_default (unique)]
3165interface ISpeechLexiconPronunciation : IDispatch {
3166 [id (DISPID_SLPType), propget] HRESULT Type ([out, retval]SpeechLexiconType *LexiconType);
3167 [id (DISPID_SLPLangId), propget] HRESULT LangId ([out, retval]SpeechLanguageId *LangId);
3168 [id (DISPID_SLPPartOfSpeech), propget] HRESULT PartOfSpeech ([out, retval]SpeechPartOfSpeech *PartOfSpeech);
3169 [id (DISPID_SLPPhoneIds), propget] HRESULT PhoneIds ([out, retval]VARIANT *PhoneIds);
3170 [id (DISPID_SLPSymbolic), propget] HRESULT Symbolic ([out, retval]BSTR *Symbolic);
3171};
3172
3173[object, uuid (C3E4F353-433f-43d6-89a1-6a62a7054c3d), dual, pointer_default (unique)]
3174interface ISpeechPhoneConverter : IDispatch {
3175 [propget, id (DISPID_SPCLangId)] HRESULT LanguageId ([out, retval]SpeechLanguageId *LanguageId);
3176 [propput, id (DISPID_SPCLangId)] HRESULT LanguageId ([in]SpeechLanguageId LanguageId);
3177 [id (DISPID_SPCPhoneToId)] HRESULT PhoneToId ([in]const BSTR Phonemes,[out, retval]VARIANT *IdArray);
3178 [id (DISPID_SPCIdToPhone)] HRESULT IdToPhone ([in]const VARIANT IdArray,[out, retval]BSTR *Phonemes);
3179}
3180
3181 [uuid (E2AE5372-5d40-11d2-960e-00c04f8ee628), hidden]
3182 coclass SpNotifyTranslator {
3183 interface ISpNotifyTranslator;
3184 }
3185
3186 [uuid (A910187F-0c7a-45ac-92cc-59edafb77b53)]
3187 coclass SpObjectTokenCategory {
3188 [default] interface ISpeechObjectTokenCategory;
3189 interface ISpObjectTokenCategory;
3190 }
3191
3192 [uuid (EF411752-3736-4cb4-9c8c-8ef4ccb58efe)]
3193 coclass SpObjectToken {
3194 [default] interface ISpeechObjectToken;
3195 interface ISpObjectToken;
3196 }
3197
3198 [uuid (96749373-3391-11d2-9ee3-00c04f797396), hidden]
3199 coclass SpResourceManager {
3200 [default] interface ISpResourceManager;
3201 };
3202
3203 [uuid (7013943a-E2EC-11d2-A086-00c04f8ef9b5), hidden]
3204 coclass SpStreamFormatConverter {
3205 [default] interface ISpStreamFormatConverter;
3206 };
3207
3208 [uuid (AB1890A0-E91F-11d2-BB91-00c04f8ee6c0), hidden]
3209 coclass SpMMAudioEnum {
3210 interface IEnumSpObjectTokens;
3211 };
3212
3213 [uuid (CF3D2E50-53f2-11d2-960c-00c04f8ee628)]
3214 coclass SpMMAudioIn {
3215 [default] interface ISpeechMMSysAudio;
3216 interface ISpEventSource;
3217 interface ISpEventSink;
3218 interface ISpObjectWithToken;
3219 interface ISpMMSysAudio;
3220 };
3221
3222 [uuid (A8C680EB-3d32-11d2-9ee7-00c04f797396)]
3223 coclass SpMMAudioOut {
3224 [default] interface ISpeechMMSysAudio;
3225 interface ISpEventSource;
3226 interface ISpEventSink;
3227 interface ISpObjectWithToken;
3228 interface ISpMMSysAudio;
3229 };
3230
3231 [uuid (715d9c59-4442-11d2-9605-00c04f8ee628), hidden]
3232 coclass SpStream {
3233 interface ISpStream;
3234 };
3235
3236 [uuid (96749377-3391-11d2-9ee3-00c04f797396)]
3237 coclass SpVoice {
3238 [default] interface ISpeechVoice;
3239 interface ISpVoice;
3240#if _SAPI_BLD_ >= 0x53
3241 interface ISpPhoneticAlphabetSelection;
3242#endif
3243 [default, source] dispinterface _ISpeechVoiceEvents;
3244 };
3245 [uuid (47206204-5eca-11d2-960f-00c04f8ee628)]
3246 coclass SpSharedRecoContext {
3247 [default] interface ISpeechRecoContext;
3248 interface ISpRecoContext;
3249#if _SAPI_BLD_ >= 0x53
3250 interface ISpRecoContext2;
3251 interface ISpPhoneticAlphabetSelection;
3252#endif
3253 [default, source] dispinterface _ISpeechRecoContextEvents;
3254 };
3255
3256 [uuid (41b89b6b-9399-11d2-9623-00c04f8ee628)]
3257 coclass SpInprocRecognizer {
3258 [default] interface ISpeechRecognizer;
3259 interface ISpRecognizer;
3260#if _SAPI_BLD_ >= 0x053
3261 interface ISpRecognizer2;
3262#if _SAPI_BLD_ >= 0x54
3263 interface ISpRecognizer3;
3264#endif
3265 interface ISpSerializeState;
3266#endif
3267 };
3268
3269 [uuid (3bee4890-4fe9-4a37-8c1e-5e7e12791c1f)]
3270 coclass SpSharedRecognizer {
3271 [default] interface ISpeechRecognizer;
3272 interface ISpRecognizer;
3273#if _SAPI_BLD_ >= 0x53
3274 interface ISpRecognizer2;
3275#if _SAPI_BLD_ >= 0x054
3276 interface ISpRecognizer3;
3277#endif
3278 interface ISpSerializeState;
3279#endif
3280 };
3281
3282 [uuid (0655e396-25d0-11d3-9c26-00c04f8ef87c)]
3283 coclass SpLexicon {
3284 [default] interface ISpeechLexicon;
3285 interface ISpLexicon;
3286#if _SAPI_BLD_ >= 0x53
3287 interface ISpPhoneticAlphabetSelection;
3288#endif
3289 };
3290
3291 [uuid (C9E37C15-DF92-4727-85d6-72e5eeb6995a)]
3292 coclass SpUnCompressedLexicon {
3293 [default] interface ISpeechLexicon;
3294 interface ISpLexicon;
3295 interface ISpObjectWithToken;
3296#if _SAPI_BLD_ >= 0x53
3297 interface ISpPhoneticAlphabetSelection;
3298#endif
3299 };
3300
3301 [uuid (90903716-2f42-11d3-9c26-00c04f8ef87c), hidden]
3302 coclass SpCompressedLexicon {
3303 [default] interface ISpLexicon;
3304 interface ISpObjectWithToken;
3305 };
3306
3307#if _SAPI_BLD_ >= 0x053
3308 [uuid (0d722f1a-9fcf-4e62-96d8-6df8f01a26aa)]
3309 coclass SpShortcut {
3310 interface ISpShortcut;
3311 interface ISpObjectWithToken;
3312 };
3313#endif
3314
3315 [uuid (9185f743-1143-4c28-86b5-BFF14F20E5C8)]
3316 coclass SpPhoneConverter {
3317 [default] interface ISpeechPhoneConverter;
3318 interface ISpPhoneConverter;
3319#if _SAPI_BLD_ >= 0x53
3320 interface ISpPhoneticAlphabetSelection;
3321#endif
3322 };
3323
3324#if _SAPI_BLD_ >= 0x53
3325 [uuid (4f414126-DFE3-4629-99ee-797978317ead)]
3326 coclass SpPhoneticAlphabetConverter {
3327 interface ISpPhoneticAlphabetConverter;
3328 };
3329#endif
3330
3331 [uuid (455f24e9-7396-4a16-9715-7c0fdbe3efe3), hidden]
3332 coclass SpNullPhoneConverter {
3333 [default] interface ISpPhoneConverter;
3334 };
3335
3336 [uuid (0f92030a-CBFD-4ab8-A164-FF5985547FF6)]
3337 coclass SpTextSelectionInformation {
3338 [default] interface ISpeechTextSelectionInformation;
3339 };
3340
3341 [uuid (C23FC28D-C55F-4720-8b32-91f73c2bd5d1)]
3342 coclass SpPhraseInfoBuilder {
3343 [default] interface ISpeechPhraseInfoBuilder;
3344 };
3345
3346 [uuid (9ef96870-E160-4792-820d-48cf0649e4ec)]
3347 coclass SpAudioFormat {
3348 [default] interface ISpeechAudioFormat;
3349 };
3350
3351 [uuid (C79A574C-63be-44b9-801f-283f87f898be)]
3352 coclass SpWaveFormatEx {
3353 [default] interface ISpeechWaveFormatEx;
3354 };
3355
3356 [uuid (73ad6842-ACE0-45e8-A4DD-8795881a2c2a)]
3357 coclass SpInProcRecoContext {
3358 [default] interface ISpeechRecoContext;
3359 interface ISpRecoContext;
3360#if _SAPI_BLD_ >= 0x53
3361 interface ISpRecoContext2;
3362 interface ISpPhoneticAlphabetSelection;
3363#endif
3364 [default, source] dispinterface _ISpeechRecoContextEvents;
3365 };
3366
3367 [uuid (8dbef13f-1948-4aa8-8cf0-048eebed95d8)]
3368 coclass SpCustomStream {
3369 [default] interface ISpeechCustomStream;
3370 interface ISpStream;
3371 };
3372
3373 [uuid (947812b3-2ae1-4644-BA86-9e90ded7ec91)]
3374 coclass SpFileStream {
3375 [default] interface ISpeechFileStream;
3376 interface ISpStream;
3377 };
3378
3379 [uuid (5fb7ef7d-DFF4-468a-B6B7-2fcbd188f994)]
3380 coclass SpMemoryStream {
3381 [default] interface ISpeechMemoryStream;
3382 interface ISpStream;
3383 };
3384
3385#if _SAPI_BLD_ >= 0x53
3386 interface ISpXMLRecoResult;
3387 interface ISpRecoGrammar2;
3388 interface ISpeechResourceLoader;
3389#endif
3390}
Note: See TracBrowser for help on using the repository browser.