Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4847 lines
158 KiB

  1. /****************************************************************************
  2. * sapiaut.idl
  3. *
  4. * This is the interface definition file for the Microsoft Speech API
  5. * Version 5.0.
  6. *
  7. * It contains definitions for the Automation layer.
  8. *
  9. * Copyright (c) Microsoft Corporation. All rights reserved.
  10. *****************************************************************************/
  11. // Includes
  12. import "oaidl.idl";
  13. import "ocidl.idl";
  14. // Token object declarations
  15. interface ISpeechDataKey;
  16. interface ISpeechObjectToken; // Token object
  17. interface ISpeechObjectTokens; // Collection of Token Objects
  18. interface ISpeechObjectTokenCategory;
  19. // Audio object declarations
  20. interface ISpeechAudioBufferInfo;
  21. interface ISpeechAudioStatus;
  22. interface ISpeechAudioFormat;
  23. interface ISpeechWaveFormatEx;
  24. interface ISpeechBaseStream;
  25. interface ISpeechFileStream;
  26. interface ISpeechMemoryStream;
  27. interface ISpeechCustomStream;
  28. interface ISpeechAudio;
  29. interface ISpeechMMSysAudio;
  30. // Voice object declarations
  31. interface ISpeechVoice;
  32. interface ISpeechVoiceStatus;
  33. dispinterface _ISpeechVoiceEvents;
  34. // Recognizer object declarations
  35. interface ISpeechRecognizer;
  36. interface ISpeechRecognizerStatus;
  37. interface ISpeechRecoContext;
  38. interface ISpeechRecoGrammar;
  39. dispinterface _ISpeechRecoContextEvents;
  40. // Grammar object declarations
  41. interface ISpeechGrammarRule;
  42. interface ISpeechGrammarRules;
  43. interface ISpeechGrammarRuleState;
  44. interface ISpeechGrammarRuleStateTransition;
  45. interface ISpeechGrammarRuleStateTransitions;
  46. interface ISpeechTextSelectionInformation;
  47. // RecoResult and phrase object declarations
  48. interface ISpeechRecoResult;
  49. interface ISpeechRecoResultTimes;
  50. interface ISpeechPhraseAlternate;
  51. interface ISpeechPhraseAlternates;
  52. interface ISpeechPhraseInfo;
  53. interface ISpeechPhraseElement;
  54. interface ISpeechPhraseElements;
  55. interface ISpeechPhraseReplacement;
  56. interface ISpeechPhraseReplacements;
  57. interface ISpeechPhraseProperty;
  58. interface ISpeechPhraseProperties;
  59. interface ISpeechPhraseRule;
  60. interface ISpeechPhraseRules;
  61. // Lexicon declarations
  62. interface ISpeechLexicon;
  63. interface ISpeechLexiconWords;
  64. interface ISpeechLexiconWord;
  65. interface ISpeechLexiconPronunciations;
  66. interface ISpeechLexiconPronunciation;
  67. typedef long SpeechLanguageId;
  68. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  69. //
  70. // String constants
  71. //
  72. //
  73. //
  74. //
  75. //
  76. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  77. // Line below (#define) is to work around getting these strings just defined in the typelib (Ignore our definition in the .H file)
  78. // Strings will fail to be defined properly in .H unless they have four backslashes ("\\\\") but for being in the typelib
  79. // can't do this and have the strings defined propertly. So for VC just use the existing SAPI defines in SAPI.IDL.
  80. cpp_quote("#define __SpeechStringConstants_MODULE_DEFINED__")
  81. [
  82. uuid(E58442E4-0C80-402c-9559-867337A39765)
  83. ]
  84. module SpeechStringConstants
  85. {
  86. //--- Root of registry entries for speech use
  87. const BSTR SpeechRegistryUserRoot = L"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech";
  88. const BSTR SpeechRegistryLocalMachineRoot = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech";
  89. //--- Object Token Categories for speech resource management
  90. const BSTR SpeechCategoryAudioOut = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioOutput";
  91. const BSTR SpeechCategoryAudioIn = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioInput";
  92. const BSTR SpeechCategoryVoices = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices";
  93. const BSTR SpeechCategoryRecognizers = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Recognizers";
  94. const BSTR SpeechCategoryAppLexicons = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AppLexicons";
  95. const BSTR SpeechCategoryPhoneConverters = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\PhoneConverters";
  96. const BSTR SpeechCategoryRecoProfiles = L"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech\RecoProfiles";
  97. //--- User Lexicon Token Id
  98. const BSTR SpeechTokenIdUserLexicon = L"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech\CurrentUserLexicon";
  99. //--- Standard token values
  100. const BSTR SpeechTokenValueCLSID = L"CLSID";
  101. const BSTR SpeechTokenKeyFiles = L"Files";
  102. const BSTR SpeechTokenKeyUI = L"UI";
  103. const BSTR SpeechTokenKeyAttributes = L"Attributes";
  104. //--- Standard voice category values
  105. const BSTR SpeechVoiceCategoryTTSRate = L"DefaultTTSRate";
  106. //--- Standard SR Engine properties
  107. const BSTR SpeechPropertyResourceUsage = L"ResourceUsage";
  108. const BSTR SpeechPropertyHighConfidenceThreshold = L"HighConfidenceThreshold";
  109. const BSTR SpeechPropertyNormalConfidenceThreshold = L"NormalConfidenceThreshold";
  110. const BSTR SpeechPropertyLowConfidenceThreshold = L"LowConfidenceThreshold";
  111. const BSTR SpeechPropertyResponseSpeed = L"ResponseSpeed";
  112. const BSTR SpeechPropertyComplexResponseSpeed = L"ComplexResponseSpeed";
  113. const BSTR SpeechPropertyAdaptationOn = L"AdaptationOn";
  114. //--- Standard SAPI Recognition Topics
  115. const BSTR SpeechDictationTopicSpelling = L"Spelling";
  116. //--- Special Tags used in SR grammars
  117. const BSTR SpeechGrammarTagWildcard = L"...";
  118. const BSTR SpeechGrammarTagDictation = L"*";
  119. const BSTR SpeechGrammarTagUnlimitedDictation = L"*+";
  120. //--- TokenUI constants
  121. const BSTR SpeechEngineProperties = L"EngineProperties";
  122. const BSTR SpeechAddRemoveWord = L"AddRemoveWord";
  123. const BSTR SpeechUserTraining = L"UserTraining";
  124. const BSTR SpeechMicTraining = L"MicTraining";
  125. const BSTR SpeechRecoProfileProperties = L"RecoProfileProperties";
  126. const BSTR SpeechAudioProperties = L"AudioProperties";
  127. const BSTR SpeechAudioVolume = L"AudioVolume";
  128. //--- ISpeechVoice::Skip constant
  129. const BSTR SpeechVoiceSkipTypeSentence = L"Sentence";
  130. // The SpeechAudioFormat object includes a guid that can be used to set the format to
  131. // a custom value.
  132. const BSTR SpeechAudioFormatGUIDWave = L"{C31ADBAE-527F-4ff5-A230-F62BB61FF70C}";
  133. const BSTR SpeechAudioFormatGUIDText = L"{7CEEF9F9-3D13-11d2-9EE7-00C04F797396}";
  134. };
  135. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  136. //
  137. // Number Constants
  138. //
  139. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  140. [
  141. uuid(F3E092B2-6BDC-410f-BCB2-4C5ED4424180)
  142. ]
  143. module SpeechConstants
  144. {
  145. const float Speech_Default_Weight = DEFAULT_WEIGHT;
  146. const LONG Speech_Max_Word_Length = SP_MAX_WORD_LENGTH;
  147. const LONG Speech_Max_Pron_Length = SP_MAX_PRON_LENGTH;
  148. const LONG Speech_StreamPos_Asap = SP_STREAMPOS_ASAP;
  149. const LONG Speech_StreamPos_RealTime = SP_STREAMPOS_REALTIME;
  150. const LONG SpeechAllElements = SPPR_ALL_ELEMENTS;
  151. };
  152. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  153. //
  154. // ISpeechDataKey
  155. // SAPI C++ Only Interface Equivalent: ISpDataKey Interface
  156. // Default Property: N/A
  157. //
  158. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  159. typedef [hidden] enum DISPID_SpeechDataKey
  160. {
  161. DISPID_SDKSetBinaryValue = 1,
  162. DISPID_SDKGetBinaryValue,
  163. DISPID_SDKSetStringValue,
  164. DISPID_SDKGetStringValue,
  165. DISPID_SDKSetLongValue,
  166. DISPID_SDKGetlongValue,
  167. DISPID_SDKOpenKey,
  168. DISPID_SDKCreateKey,
  169. DISPID_SDKDeleteKey,
  170. DISPID_SDKDeleteValue,
  171. DISPID_SDKEnumKeys,
  172. DISPID_SDKEnumValues
  173. } DISPID_SpeechDataKey;
  174. [
  175. object,
  176. uuid(CE17C09B-4EFA-44d5-A4C9-59D9585AB0CD),
  177. dual,
  178. helpstring("ISpeechDataKey Interface"),
  179. pointer_default(unique)
  180. ]
  181. interface ISpeechDataKey : IDispatch
  182. {
  183. // Methods
  184. // SetBinaryValue
  185. // SAPI C++ Only Interface Equivalent: SetData
  186. //
  187. [helpstring("SetBinaryValue"), id(DISPID_SDKSetBinaryValue)]
  188. HRESULT SetBinaryValue( [in]const BSTR ValueName,
  189. [in]VARIANT Value );
  190. // GetBinaryValue
  191. // SAPI C++ Only Interface Equivalent: GetData
  192. //
  193. [helpstring("GetBinaryValue"), id(DISPID_SDKGetBinaryValue)]
  194. HRESULT GetBinaryValue( [in]const BSTR ValueName,
  195. [out,retval]VARIANT* Value );
  196. // SetStringValue
  197. // SAPI C++ Only Interface Equivalent: Same
  198. //
  199. [helpstring("SetStringValue"), id(DISPID_SDKSetStringValue)]
  200. HRESULT SetStringValue( [in]const BSTR ValueName,
  201. [in]const BSTR Value );
  202. // GetStringValue
  203. // SAPI C++ Only Interface Equivalent: Same
  204. //
  205. [helpstring("GetStringValue"), id(DISPID_SDKGetStringValue)]
  206. HRESULT GetStringValue( [in]const BSTR ValueName,
  207. [out,retval]BSTR* Value );
  208. // SetLongValue
  209. // SAPI C++ Only Interface Equivalent: SetDWORD
  210. //
  211. [helpstring("SetLongValue"), id(DISPID_SDKSetLongValue)]
  212. HRESULT SetLongValue( [in]const BSTR ValueName,
  213. [in]long Value );
  214. // GetLongValue
  215. // SAPI C++ Only Interface Equivalent: GetDWORD
  216. //
  217. [helpstring("GetlongValue"), id(DISPID_SDKGetlongValue)]
  218. HRESULT GetLongValue( [in]const BSTR ValueName,
  219. [out,retval]long* Value );
  220. // OpenKey
  221. // SAPI C++ Only Interface Equivalent: Same
  222. //
  223. [helpstring("OpenKey"), id(DISPID_SDKOpenKey)]
  224. HRESULT OpenKey( [in]const BSTR SubKeyName, [out,retval]ISpeechDataKey** SubKey );
  225. // CreateKey
  226. // SAPI C++ Only Interface Equivalent: Same
  227. //
  228. [helpstring("CreateKey"), id(DISPID_SDKCreateKey)]
  229. HRESULT CreateKey( [in]const BSTR SubKeyName, [out,retval]ISpeechDataKey** SubKey );
  230. // DeleteKey
  231. // SAPI C++ Only Interface Equivalent: Same
  232. //
  233. [helpstring("DeleteKey"), id(DISPID_SDKDeleteKey)]
  234. HRESULT DeleteKey( [in]const BSTR SubKeyName );
  235. // DeleteValue
  236. // SAPI C++ Only Interface Equivalent: Same
  237. //
  238. [helpstring("DeleteValue"), id(DISPID_SDKDeleteValue)]
  239. HRESULT DeleteValue( [in]const BSTR ValueName );
  240. // EnumKeys
  241. // SAPI C++ Only Interface Equivalent: Same
  242. //
  243. [helpstring("EnumKeys"), id(DISPID_SDKEnumKeys)]
  244. HRESULT EnumKeys( [in]long Index, [out,retval]BSTR* SubKeyName );
  245. // EnumValues
  246. // SAPI C++ Only Interface Equivalent: Same
  247. //
  248. [helpstring("EnumValues"), id(DISPID_SDKEnumValues)]
  249. HRESULT EnumValues( [in]long Index, [out,retval]BSTR* ValueName );
  250. };
  251. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  252. //
  253. // ISpeechObjectToken
  254. // SAPI C++ Only Interface Equivalent: ISpObjectToken
  255. // Default Property: Id
  256. //
  257. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  258. typedef [hidden] enum DISPID_SpeechObjectToken
  259. {
  260. DISPID_SOTId = 1,
  261. DISPID_SOTDataKey,
  262. DISPID_SOTCategory,
  263. DISPID_SOTGetDescription,
  264. DISPID_SOTSetId,
  265. DISPID_SOTGetAttribute,
  266. DISPID_SOTCreateInstance,
  267. DISPID_SOTRemove,
  268. DISPID_SOTGetStorageFileName,
  269. DISPID_SOTRemoveStorageFileName,
  270. DISPID_SOTIsUISupported,
  271. DISPID_SOTDisplayUI,
  272. DISPID_SOTMatchesAttributes
  273. } DISPID_SpeechObjectToken;
  274. //////////////////////////////////
  275. //
  276. // SpeechDataKeyLocation Enum
  277. // SAPI C++ Only Interface Equivalent: SPDATAKEYLOCATION
  278. //
  279. //////////////////////////////////
  280. typedef enum SpeechDataKeyLocation
  281. {
  282. SDKLDefaultLocation = SPDKL_DefaultLocation,
  283. SDKLCurrentUser = SPDKL_CurrentUser,
  284. SDKLLocalMachine = SPDKL_LocalMachine,
  285. SDKLCurrentConfig = SPDKL_CurrentConfig
  286. } SpeechDataKeyLocation;
  287. #define CLSCTXALL (CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)
  288. //////////////////////////////////
  289. //
  290. // SpeechTokenContext Enum
  291. // SAPI C++ Only Interface Equivalent: N/A
  292. //
  293. //////////////////////////////////
  294. typedef enum SpeechTokenContext
  295. {
  296. STCInprocServer = CLSCTX_INPROC_SERVER,
  297. STCInprocHandler = CLSCTX_INPROC_HANDLER,
  298. STCLocalServer = CLSCTX_LOCAL_SERVER,
  299. STCRemoteServer = CLSCTX_REMOTE_SERVER,
  300. STCAll = CLSCTXALL
  301. } SpeechTokenContext;
  302. //////////////////////////////////
  303. //
  304. // SpeechTokenShellFolder Enum
  305. // SAPI C++ Only Interface Equivalent: N/A
  306. //
  307. //////////////////////////////////
  308. // CSIDL_* symbols are from SHLOBJ.H
  309. typedef enum SpeechTokenShellFolder
  310. {
  311. STSF_AppData = 0x001a, // CSIDL_APPDATA,
  312. STSF_LocalAppData = 0x001c, // CSIDL_LOCAL_APPDATA
  313. STSF_CommonAppData = 0x0023, // CSIDL_COMMON_APPDATA
  314. STSF_FlagCreate = 0x8000 // CSIDL_FLAG_CREATE
  315. } SpeechTokenShellFolder;
  316. [
  317. object,
  318. uuid(C74A3ADC-B727-4500-A84A-B526721C8B8C),
  319. dual,
  320. helpstring("ISpeechObjectToken Interface"),
  321. pointer_default(unique)
  322. ]
  323. interface ISpeechObjectToken : IDispatch
  324. {
  325. // Properties
  326. // Id
  327. // SAPI C++ Only Interface Equivalent: GetId
  328. // Default: N/A
  329. //
  330. [propget, helpstring("Id"), id(DISPID_SOTId)]
  331. HRESULT Id( [out,retval]BSTR* ObjectId );
  332. // DataKey
  333. // SAPI C++ Only Interface Equivalent: Inherited from ISpDataKey
  334. // Default: N/A
  335. //
  336. [propget, helpstring("DataKey"), id(DISPID_SOTDataKey), hidden]
  337. HRESULT DataKey( [out,retval]ISpeechDataKey** DataKey );
  338. // Category
  339. // SAPI C++ Only Interface Equivalent: GetCategory
  340. // Default: N/A
  341. //
  342. [propget, helpstring("Category"), id(DISPID_SOTCategory)]
  343. HRESULT Category( [out,retval]ISpeechObjectTokenCategory** Category);
  344. // Methods
  345. // GetDescription
  346. // SAPI C++ Only Interface Equivalent: New
  347. //
  348. [helpstring("GetDescription"), id(DISPID_SOTGetDescription)]
  349. HRESULT GetDescription( [in,defaultvalue(0)]long Locale,
  350. [out,retval]BSTR* Description );
  351. // SetId
  352. // SAPI C++ Only Interface Equivalent: Same
  353. //
  354. [helpstring("SetId"), hidden, id(DISPID_SOTSetId)]
  355. HRESULT SetId( [in] BSTR Id,
  356. [in, defaultvalue("")] BSTR CategoryID,
  357. [in, defaultvalue(0)]VARIANT_BOOL CreateIfNotExist);
  358. // GetAttribute
  359. // SAPI C++ Only Interface Equivalent: Same
  360. //
  361. [helpstring("GetAttribute"), id(DISPID_SOTGetAttribute)]
  362. HRESULT GetAttribute( [in] BSTR AttributeName,
  363. [out, retval]BSTR* AttributeValue);
  364. // CreateInstance
  365. // SAPI C++ Only Interface Equivalent: Same
  366. //
  367. [helpstring("CreateInstance"), id(DISPID_SOTCreateInstance)]
  368. HRESULT CreateInstance( [in, defaultvalue(NULL)] IUnknown *pUnkOuter,
  369. [in,defaultvalue(STCALL)] SpeechTokenContext ClsContext,
  370. [out, retval]IUnknown **Object);
  371. // Remove
  372. // SAPI C++ Only Interface Equivalent: Same
  373. //
  374. [helpstring("Remove"), hidden, id(DISPID_SOTRemove)]
  375. HRESULT Remove( [in]BSTR ObjectStorageCLSID );
  376. // GetStorageFileName
  377. // SAPI C++ Only Interface Equivalent: Same
  378. //
  379. [helpstring("GetStorageFileName"), hidden, id(DISPID_SOTGetStorageFileName)]
  380. HRESULT GetStorageFileName( [in]BSTR ObjectStorageCLSID,
  381. [in]BSTR KeyName,
  382. [in]BSTR FileName,
  383. [in]SpeechTokenShellFolder Folder,
  384. [out,retval]BSTR* FilePath );
  385. // Remove
  386. // SAPI C++ Only Interface Equivalent: Same
  387. //
  388. [helpstring("RemoveStorageFileName"), hidden, id(DISPID_SOTRemoveStorageFileName)]
  389. HRESULT RemoveStorageFileName( [in]BSTR ObjectStorageCLSID,
  390. [in]BSTR KeyName,
  391. [in]VARIANT_BOOL DeleteFile);
  392. // IsUISupported
  393. // SAPI C++ Only Interface Equivalent: Same
  394. //
  395. [helpstring("IsUISupported"), hidden, id(DISPID_SOTIsUISupported)]
  396. HRESULT IsUISupported( [in]const BSTR TypeOfUI,
  397. [in, defaultvalue(NULL)]const VARIANT* ExtraData,
  398. [in, defaultvalue(NULL)]IUnknown* Object,
  399. [out,retval] VARIANT_BOOL *Supported );
  400. // DisplayUI
  401. // SAPI C++ Only Interface Equivalent: Same
  402. //
  403. [helpstring("DisplayUI"), hidden, id(DISPID_SOTDisplayUI)]
  404. HRESULT DisplayUI( [in]long hWnd,
  405. [in]BSTR Title,
  406. [in]const BSTR TypeOfUI,
  407. [in, defaultvalue(NULL)]const VARIANT* ExtraData,
  408. [in, defaultvalue(NULL)]IUnknown* Object);
  409. // MatchesAttributes
  410. // SAPI C++ Only Interface Equivalent: Same
  411. //
  412. [helpstring("MatchesAttributes"), id(DISPID_SOTMatchesAttributes)]
  413. HRESULT MatchesAttributes([in]BSTR Attributes,
  414. [out,retval] VARIANT_BOOL* Matches);
  415. };
  416. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  417. //
  418. // ISpeechObjectTokens
  419. // SAPI C++ Only Interface Equivalent: IEnumObjectTokens
  420. // Default Property: Item
  421. //
  422. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  423. typedef [hidden] enum DISPID_SpeechObjectTokens
  424. {
  425. DISPID_SOTsCount = 1,
  426. DISPID_SOTsItem = DISPID_VALUE,
  427. DISPID_SOTs_NewEnum = DISPID_NEWENUM
  428. } DISPID_SpeechObjectTokens;
  429. [
  430. object,
  431. uuid(9285B776-2E7B-4bc0-B53E-580EB6FA967F),
  432. dual,
  433. helpstring("ISpeechObjectTokens Interface"),
  434. pointer_default(unique)
  435. ]
  436. interface ISpeechObjectTokens : IDispatch
  437. {
  438. // Property
  439. // Count
  440. // SAPI C++ Only Interface Equivalent: GetCount
  441. //
  442. [propget, helpstring("Count"), id(DISPID_SOTsCount)]
  443. HRESULT Count([out, retval] long* Count);
  444. // Methods
  445. // Item
  446. // SAPI C++ Only Interface Equivalent: Same
  447. //
  448. [helpstring("Item"), id(DISPID_VALUE)]
  449. HRESULT Item([in] long Index, [out, retval]ISpeechObjectToken** Token );
  450. // _NewEnum
  451. // SAPI C++ Only Interface Equivalent: N/A
  452. //
  453. [propget, helpstring("Enumerates the tokens"), restricted, id(DISPID_NEWENUM)]
  454. HRESULT _NewEnum([out, retval] IUnknown** ppEnumVARIANT);
  455. };
  456. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  457. //
  458. // ISpeechObjectTokenCategory
  459. //
  460. // SAPI C++ Only Interface Equivalent: ISpObjectTokenCategory
  461. // Default Property: Id
  462. //
  463. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  464. typedef [hidden] enum DISPID_SpeechObjectTokenCategory
  465. {
  466. DISPID_SOTCId = 1,
  467. DISPID_SOTCDefault,
  468. DISPID_SOTCSetId,
  469. DISPID_SOTCGetDataKey,
  470. DISPID_SOTCEnumerateTokens,
  471. } DISPID_SpeechObjectTokenCategory;
  472. [
  473. object,
  474. uuid(CA7EAC50-2D01-4145-86D4-5AE7D70F4469),
  475. dual,
  476. helpstring("ISpeechObjectTokenCategory Interface"),
  477. pointer_default(unique)
  478. ]
  479. interface ISpeechObjectTokenCategory : IDispatch
  480. {
  481. // Properties
  482. // Id
  483. // SAPI C++ Only Interface Equivalent: GetId
  484. //
  485. [propget, helpstring("Id"), id(DISPID_SOTCId)]
  486. HRESULT Id([out, retval] BSTR * Id);
  487. // Default
  488. // SAPI C++ Only Interface Equivalent: Set/GetDefaultTokenId
  489. //
  490. [propput, helpstring("Default"), id(DISPID_SOTCDefault)]
  491. HRESULT Default([in] const BSTR TokenId);
  492. [propget, helpstring("Default"), id(DISPID_SOTCDefault)]
  493. HRESULT Default([out, retval] BSTR * TokenId);
  494. // Methods
  495. // SetId
  496. // SAPI C++ Only Interface Equivalent: Same
  497. //
  498. [helpstring("SetId"), id(DISPID_SOTCSetId)]
  499. HRESULT SetId([in] const BSTR Id, [in, defaultvalue(0)]VARIANT_BOOL CreateIfNotExist);
  500. // GetDataKey
  501. // SAPI C++ Only Interface Equivalent: Same
  502. //
  503. [helpstring("GetDataKey"), hidden, id(DISPID_SOTCGetDataKey)]
  504. HRESULT GetDataKey([in, defaultvalue(SDKLDefaultLocation)]SpeechDataKeyLocation Location,
  505. [out, retval]ISpeechDataKey ** DataKey);
  506. // EnumerateTokens
  507. // SAPI C++ Only Interface Equivalent: EnumTokens
  508. //
  509. [helpstring("EnumerateTokens"), id(DISPID_SOTCEnumerateTokens)]
  510. HRESULT EnumerateTokens( [in, defaultvalue("")]BSTR RequiredAttributes,
  511. [in, defaultvalue("")]BSTR OptionalAttributes,
  512. [out, retval]ISpeechObjectTokens** Tokens );
  513. };
  514. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  515. //
  516. // ISpeechAudioFormat
  517. // SAPI C++ Only Interface Equivalent: ISpStreamFormat
  518. // Default Property: N/A
  519. //
  520. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  521. //////////////////////////////////
  522. //
  523. // SpeechAudioFormatType
  524. // SAPI C++ Only Interface Equivalent: SPSTREAMFORMAT
  525. //
  526. //////////////////////////////////
  527. typedef enum SpeechAudioFormatType {
  528. [hidden] SAFTDefault = -1,
  529. [hidden] SAFTNoAssignedFormat = 0,
  530. [hidden] SAFTText,
  531. [hidden] SAFTNonStandardFormat, // Non-SAPI 5.0 standard format with no WAVEFORMATEX description
  532. [hidden] SAFTExtendedAudioFormat, // Non-SAPI 5.0 standard format but has WAVEFORMATEX description
  533. // Standard PCM wave formats
  534. SAFT8kHz8BitMono,
  535. SAFT8kHz8BitStereo,
  536. SAFT8kHz16BitMono,
  537. SAFT8kHz16BitStereo,
  538. SAFT11kHz8BitMono,
  539. SAFT11kHz8BitStereo,
  540. SAFT11kHz16BitMono,
  541. SAFT11kHz16BitStereo,
  542. SAFT12kHz8BitMono,
  543. SAFT12kHz8BitStereo,
  544. SAFT12kHz16BitMono,
  545. SAFT12kHz16BitStereo,
  546. SAFT16kHz8BitMono,
  547. SAFT16kHz8BitStereo,
  548. SAFT16kHz16BitMono,
  549. SAFT16kHz16BitStereo,
  550. SAFT22kHz8BitMono,
  551. SAFT22kHz8BitStereo,
  552. SAFT22kHz16BitMono,
  553. SAFT22kHz16BitStereo,
  554. SAFT24kHz8BitMono,
  555. SAFT24kHz8BitStereo,
  556. SAFT24kHz16BitMono,
  557. SAFT24kHz16BitStereo,
  558. SAFT32kHz8BitMono,
  559. SAFT32kHz8BitStereo,
  560. SAFT32kHz16BitMono,
  561. SAFT32kHz16BitStereo,
  562. SAFT44kHz8BitMono,
  563. SAFT44kHz8BitStereo,
  564. SAFT44kHz16BitMono,
  565. SAFT44kHz16BitStereo,
  566. SAFT48kHz8BitMono,
  567. SAFT48kHz8BitStereo,
  568. SAFT48kHz16BitMono,
  569. SAFT48kHz16BitStereo,
  570. // TrueSpeech format
  571. SAFTTrueSpeech_8kHz1BitMono,
  572. // A-Law formats
  573. SAFTCCITT_ALaw_8kHzMono,
  574. SAFTCCITT_ALaw_8kHzStereo,
  575. SAFTCCITT_ALaw_11kHzMono,
  576. SAFTCCITT_ALaw_11kHzStereo,
  577. SAFTCCITT_ALaw_22kHzMono,
  578. SAFTCCITT_ALaw_22kHzStereo,
  579. SAFTCCITT_ALaw_44kHzMono,
  580. SAFTCCITT_ALaw_44kHzStereo,
  581. // u-Law formats
  582. SAFTCCITT_uLaw_8kHzMono,
  583. SAFTCCITT_uLaw_8kHzStereo,
  584. SAFTCCITT_uLaw_11kHzMono,
  585. SAFTCCITT_uLaw_11kHzStereo,
  586. SAFTCCITT_uLaw_22kHzMono,
  587. SAFTCCITT_uLaw_22kHzStereo,
  588. SAFTCCITT_uLaw_44kHzMono,
  589. SAFTCCITT_uLaw_44kHzStereo,
  590. // ADPCM formats
  591. SAFTADPCM_8kHzMono,
  592. SAFTADPCM_8kHzStereo,
  593. SAFTADPCM_11kHzMono,
  594. SAFTADPCM_11kHzStereo,
  595. SAFTADPCM_22kHzMono,
  596. SAFTADPCM_22kHzStereo,
  597. SAFTADPCM_44kHzMono,
  598. SAFTADPCM_44kHzStereo,
  599. // GSM 6.10 formats
  600. SAFTGSM610_8kHzMono,
  601. SAFTGSM610_11kHzMono,
  602. SAFTGSM610_22kHzMono,
  603. SAFTGSM610_44kHzMono,
  604. } SpeechAudioFormatType;
  605. typedef [hidden] enum DISPID_SpeechAudioFormat
  606. {
  607. DISPID_SAFType = 1,
  608. DISPID_SAFGuid,
  609. DISPID_SAFGetWaveFormatEx,
  610. DISPID_SAFSetWaveFormatEx
  611. } DISPID_SpeechAudioFormat;
  612. [
  613. object,
  614. uuid(E6E9C590-3E18-40e3-8299-061F98BDE7C7),
  615. dual,
  616. helpstring("ISpeechAudioFormat Interface"),
  617. pointer_default(unique)
  618. ]
  619. interface ISpeechAudioFormat : IDispatch {
  620. // Properties
  621. // Type
  622. // SAPI C++ Only Interface Equivalent:
  623. // Default: GetFormat
  624. //
  625. [propget, helpstring("Type"), id(DISPID_SAFType)]
  626. HRESULT Type([out,retval]SpeechAudioFormatType* AudioFormat);
  627. [propput, helpstring("Type"), id(DISPID_SAFType)]
  628. HRESULT Type([in]SpeechAudioFormatType AudioFormat);
  629. // Guid
  630. // SAPI C++ Only Interface Equivalent:
  631. // Default: N/A (used to be parameter of GetFormat)
  632. //
  633. [propget, hidden, helpstring("Guid"), id(DISPID_SAFGuid)]
  634. HRESULT Guid([out,retval]BSTR* Guid);
  635. [propput, hidden, helpstring("Guid"), id(DISPID_SAFGuid)]
  636. HRESULT Guid([in]BSTR Guid);
  637. // Methods
  638. // GetWaveFormatEx
  639. // SAPI C++ Only Interface Equivalent: (used to be parameter of GetFormat)
  640. //
  641. [hidden, helpstring("GetWaveFormatEx"), id(DISPID_SAFGetWaveFormatEx)]
  642. HRESULT GetWaveFormatEx([out,retval]ISpeechWaveFormatEx** WaveFormatEx);
  643. // GetWaveFormatEx
  644. // SAPI C++ Only Interface Equivalent: (used to be parameter of GetFormat)
  645. //
  646. [hidden, helpstring("SetWaveFormatEx"), id(DISPID_SAFSetWaveFormatEx)]
  647. HRESULT SetWaveFormatEx([in]ISpeechWaveFormatEx* WaveFormatEx);
  648. }
  649. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  650. //
  651. // ISpeechBaseStream
  652. // SAPI C++ Only Interface Equivalent: ISpStreamFormat and IStream
  653. // Default Property: Format
  654. //
  655. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  656. typedef [hidden] enum DISPID_SpeechBaseStream
  657. {
  658. DISPID_SBSFormat = 1,
  659. DISPID_SBSRead,
  660. DISPID_SBSWrite,
  661. DISPID_SBSSeek
  662. } DISPID_SpeechBaseStream;
  663. //////////////////////////////////
  664. //
  665. // SpeechStreamSeekPositionType
  666. // SAPI C++ Only Interface Equivalent: N/A
  667. //
  668. //////////////////////////////////
  669. typedef enum SpeechStreamSeekPositionType
  670. {
  671. SSSPTRelativeToStart = STREAM_SEEK_SET,
  672. SSSPTRelativeToCurrentPosition = STREAM_SEEK_CUR,
  673. SSSPTRelativeToEnd = STREAM_SEEK_END
  674. } SpeechStreamSeekPositionType;
  675. [
  676. object,
  677. uuid(6450336F-7D49-4ced-8097-49D6DEE37294),
  678. dual,
  679. helpstring("ISpeechBaseStream Interface"),
  680. pointer_default(unique)
  681. ]
  682. interface ISpeechBaseStream : IDispatch
  683. {
  684. // Properties
  685. // Format
  686. // SAPI C++ Only Interface Equivalent: N/A
  687. // Default: N/A
  688. //
  689. [propget, helpstring("Format"), id(DISPID_SBSFormat)]
  690. HRESULT Format([out,retval]ISpeechAudioFormat** AudioFormat);
  691. [propputref, helpstring("Format"), id(DISPID_SBSFormat)]
  692. HRESULT Format([in]ISpeechAudioFormat* AudioFormat);
  693. // Methods
  694. // Read
  695. // SAPI C++ Only Interface Equivalent: N/A
  696. //
  697. [helpstring("Read"), id(DISPID_SBSRead)]
  698. HRESULT Read([out]VARIANT* Buffer, [in]long NumberOfBytes, [out,retval]long* BytesRead);
  699. // Write
  700. // SAPI C++ Only Interface Equivalent: N/A
  701. //
  702. [helpstring("Write"), id(DISPID_SBSWrite)]
  703. HRESULT Write([in]VARIANT Buffer, [out,retval]long* BytesWritten);
  704. // Seek
  705. // SAPI C++ Only Interface Equivalent: N/A
  706. //
  707. [helpstring("Seek"), id(DISPID_SBSSeek)]
  708. HRESULT Seek([in]VARIANT Position, [in, defaultvalue(SSSPTRelativeToStart)]SpeechStreamSeekPositionType Origin, [out,retval]VARIANT* NewPosition);
  709. };
  710. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  711. //
  712. // ISpeechAudio
  713. // SAPI C++ Only Interface Equivalent: ISpAudio
  714. // Default Property: Volume
  715. //
  716. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  717. typedef [hidden] enum DISPID_SpeechAudio
  718. {
  719. DISPID_SAStatus = 200,
  720. DISPID_SABufferInfo,
  721. DISPID_SADefaultFormat,
  722. DISPID_SAVolume,
  723. DISPID_SABufferNotifySize,
  724. DISPID_SAEventHandle,
  725. DISPID_SASetState
  726. } DISPID_SpeechAudio;
  727. //////////////////////////////////
  728. //
  729. // SpeechAudioState
  730. // SAPI C++ Only Interface Equivalent: _SPAUDIOSTATE
  731. //
  732. //////////////////////////////////
  733. typedef enum SpeechAudioState
  734. {
  735. SASClosed = SPAS_CLOSED,
  736. SASStop = SPAS_STOP,
  737. SASPause = SPAS_PAUSE,
  738. SASRun = SPAS_RUN
  739. } SpeechAudioState;
  740. [
  741. object,
  742. uuid(CFF8E175-019E-11d3-A08E-00C04F8EF9B5),
  743. dual,
  744. helpstring("ISpeechAudio Interface"),
  745. pointer_default(unique)
  746. ]
  747. interface ISpeechAudio : ISpeechBaseStream
  748. {
  749. // Properties
  750. // Status
  751. // SAPI C++ Only Interface Equivalent: GetStatus
  752. // Default: N/A
  753. //
  754. [propget, helpstring("Status"), id(DISPID_SAStatus)]
  755. HRESULT Status([out,retval]ISpeechAudioStatus** Status);
  756. // BufferInfo
  757. // SAPI C++ Only Interface Equivalent: GetBufferInfo
  758. // Default: N/A
  759. //
  760. [propget, helpstring("BufferInfo"), id(DISPID_SABufferInfo)]
  761. HRESULT BufferInfo([out,retval]ISpeechAudioBufferInfo** BufferInfo);
  762. // DefaultFormat
  763. // SAPI C++ Only Interface Equivalent: GetDefaultFormat
  764. // Default: N/A
  765. //
  766. [propget, helpstring("DefaultFormat"), id(DISPID_SADefaultFormat)]
  767. HRESULT DefaultFormat([out,retval]ISpeechAudioFormat** StreamFormat);
  768. // Volume
  769. // SAPI C++ Only Interface Equivalent: GetVolumeLevel
  770. // Default: N/A
  771. //
  772. [propget, helpstring("Volume"), id(DISPID_SAVolume)]
  773. HRESULT Volume([out,retval]long* Volume);
  774. [propput, helpstring("Volume"), id(DISPID_SAVolume)]
  775. HRESULT Volume([in]long Volume);
  776. // BufferNotifySize
  777. // SAPI C++ Only Interface Equivalent: GetBufferNotifySize
  778. // Default: N/A
  779. //
  780. [propget, helpstring("BufferNotifySize"), id(DISPID_SABufferNotifySize)]
  781. HRESULT BufferNotifySize([out,retval]long* BufferNotifySize);
  782. [propput, helpstring("BufferNotifySize"), id(DISPID_SABufferNotifySize)]
  783. HRESULT BufferNotifySize([in]long BufferNotifySize);
  784. // EventHandle
  785. // SAPI C++ Only Interface Equivalent: Same
  786. // Default: N/A
  787. //
  788. [propget, hidden, helpstring("EventHandle"), id(DISPID_SAEventHandle)]
  789. HRESULT EventHandle([out,retval]long* EventHandle);
  790. // Methods
  791. // SetState
  792. // SAPI C++ Only Interface Equivalent: Same
  793. //
  794. [helpstring("SetState"), id(DISPID_SASetState), hidden]
  795. HRESULT SetState([in] SpeechAudioState State);
  796. };
  797. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  798. //
  799. // ISpeechMMSysAudio
  800. // SAPI C++ Only Interface Equivalent: ISpMMSysAudio
  801. // Default Property: N/A
  802. //
  803. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  804. typedef [hidden] enum DISPID_SpeechMMSysAudio
  805. {
  806. DISPID_SMSADeviceId = 300,
  807. DISPID_SMSALineId,
  808. DISPID_SMSAMMHandle
  809. } DISPID_SpeechMMSysAudio;
  810. [
  811. object,
  812. uuid(3C76AF6D-1FD7-4831-81D1-3B71D5A13C44),
  813. dual,
  814. helpstring("ISpeechMMSysAudio Interface"),
  815. pointer_default(unique)
  816. ]
  817. interface ISpeechMMSysAudio : ISpeechAudio
  818. {
  819. // Properties
  820. // DeviceId
  821. // SAPI C++ Only Interface Equivalent: Get/SetDeviceId
  822. // Default: N/A
  823. //
  824. [propget, helpstring("DeviceId"), id(DISPID_SMSADeviceId)]
  825. HRESULT DeviceId([out, retval] long* DeviceId);
  826. [propput, helpstring("DeviceId"), id(DISPID_SMSADeviceId)]
  827. HRESULT DeviceId([in] long DeviceId);
  828. // LineId
  829. // SAPI C++ Only Interface Equivalent: Get/SetLineId
  830. // Default: N/A
  831. //
  832. [propget, helpstring("LineId"), id(DISPID_SMSALineId)]
  833. HRESULT LineId([out, retval] long* LineId);
  834. [propput, helpstring("LineId"), id(DISPID_SMSALineId)]
  835. HRESULT LineId([in] long LineId);
  836. // MMHandle
  837. // SAPI C++ Only Interface Equivalent: GetMMHandle
  838. // Default: N/A
  839. //
  840. [propget, hidden, helpstring("MMHandle"), id(DISPID_SMSAMMHandle)]
  841. HRESULT MMHandle([out, retval] long* Handle); // 64bit issue? Declared as handle.
  842. };
  843. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  844. //
  845. // ISpeechFileStream
  846. // SAPI C++ Only Interface Equivalent: ISpStream
  847. // Default Property: N/A
  848. //
  849. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  850. typedef [hidden] enum DISPID_SpeechFileStream
  851. {
  852. DISPID_SFSOpen = 100,
  853. DISPID_SFSClose
  854. } DISPID_SpeechFileStream;
  855. //////////////////////////////////
  856. //
  857. // SpeechStreamFileMode Enum
  858. // SAPI C++ Only Interface Equivalent:
  859. //
  860. //////////////////////////////////
  861. typedef enum SpeechStreamFileMode
  862. {
  863. SSFMOpenForRead = SPFM_OPEN_READONLY, // Open existing file, read-only.
  864. [hidden] SSFMOpenReadWrite = SPFM_OPEN_READWRITE, // (Not supported for wav files) Open existing file, read-write.
  865. [hidden] SSFMCreate = SPFM_CREATE, // (Not supported for wav files) Open file if exists, else create if does not exist (opens read-write)
  866. SSFMCreateForWrite = SPFM_CREATE_ALWAYS, // Create file even if file exists. Destroys old file.
  867. } SpeechStreamFileMode;
  868. [
  869. object,
  870. uuid(AF67F125-AB39-4e93-B4A2-CC2E66E182A7),
  871. dual,
  872. helpstring("ISpeechFileStream Interface"),
  873. pointer_default(unique)
  874. ]
  875. interface ISpeechFileStream : ISpeechBaseStream
  876. {
  877. // Properties
  878. // Methods
  879. // Open
  880. // SAPI C++ Only Interface Equivalent: BindToFile
  881. // Default: N/A
  882. //
  883. [helpstring("Open"), id(DISPID_SFSOpen)]
  884. HRESULT Open([in] BSTR FileName,
  885. [in, defaultvalue(SSFMOpenForRead)] SpeechStreamFileMode FileMode,
  886. [in, defaultvalue(0)]VARIANT_BOOL DoEvents);
  887. // Close
  888. // SAPI C++ Only Interface Equivalent: Same
  889. // Default: N/A
  890. //
  891. [helpstring("Close"), id(DISPID_SFSClose)]
  892. HRESULT Close(void);
  893. };
  894. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  895. //
  896. // ISpeechCustomStream
  897. // SAPI C++ Only Interface Equivalent: ISpStream
  898. // Default Property: N/A
  899. //
  900. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  901. typedef [hidden] enum DISPID_SpeechCustomStream
  902. {
  903. DISPID_SCSBaseStream = 100
  904. } DISPID_SpeechCustomStream;
  905. [
  906. object,
  907. uuid(1A9E9F4F-104F-4db8-A115-EFD7FD0C97AE),
  908. dual,
  909. helpstring("ISpeechCustomStream Interface"),
  910. pointer_default(unique)
  911. ]
  912. interface ISpeechCustomStream : ISpeechBaseStream
  913. {
  914. // Properties
  915. // BaseStream
  916. // SAPI C++ Only Interface Equivalent: ISpStream::Get/SetBaseStream
  917. // Default: N/A
  918. //
  919. [propget, helpstring("BaseStream"), id(DISPID_SCSBaseStream)]
  920. HRESULT BaseStream([out, retval] IUnknown **ppUnkStream);
  921. [propputref, helpstring("BaseStream"), id(DISPID_SCSBaseStream)]
  922. HRESULT BaseStream([in] IUnknown *pUnkStream);
  923. // Methods
  924. };
  925. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  926. //
  927. // ISpeechMemoryStream
  928. // SAPI C++ Only Interface Equivalent: ISpStream
  929. // Default Property: N/A
  930. //
  931. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  932. typedef [hidden] enum DISPID_SpeechMemoryStream
  933. {
  934. DISPID_SMSSetData = 100,
  935. DISPID_SMSGetData
  936. } DISPID_SpeechMemoryStream;
  937. [
  938. object,
  939. uuid(EEB14B68-808B-4abe-A5EA-B51DA7588008),
  940. dual,
  941. helpstring("ISpeechMemoryStream Interface"),
  942. pointer_default(unique)
  943. ]
  944. interface ISpeechMemoryStream : ISpeechBaseStream
  945. {
  946. // Properties
  947. // Methods
  948. // SetData
  949. // SAPI C++ Only Interface Equivalent: N/A
  950. //
  951. [helpstring("SetData"), id(DISPID_SMSSetData)]
  952. HRESULT SetData([in] VARIANT Data);
  953. // GetData
  954. // SAPI C++ Only Interface Equivalent: N/A
  955. //
  956. [helpstring("GetData"), id(DISPID_SMSGetData)]
  957. HRESULT GetData([out, retval] VARIANT* pData);
  958. };
  959. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  960. //
  961. // ISpeechAudioStatus
  962. // SAPI C++ Only Interface Equivalent: SPAUDIOSTATUS Struct
  963. // Default Property: N/A
  964. //
  965. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  966. typedef [hidden] enum DISPID_SpeechAudioStatus
  967. {
  968. DISPID_SASFreeBufferSpace = 1,
  969. DISPID_SASNonBlockingIO,
  970. DISPID_SASState,
  971. DISPID_SASCurrentSeekPosition,
  972. DISPID_SASCurrentDevicePosition
  973. } DISPID_SpeechAudioStatus;
  974. [
  975. object,
  976. uuid(C62D9C91-7458-47f6-862D-1EF86FB0B278),
  977. dual,
  978. helpstring("ISpeechAudioStatus Interface"),
  979. pointer_default(unique)
  980. ]
  981. interface ISpeechAudioStatus : IDispatch
  982. {
  983. // Properties
  984. // FreeBufferSpace
  985. // SAPI C++ Only Interface Equivalent: Same
  986. // Default: N/A
  987. //
  988. [propget, helpstring("FreeBufferSpace"), id(DISPID_SASFreeBufferSpace)]
  989. HRESULT FreeBufferSpace([out,retval]long* FreeBufferSpace);
  990. // NonBlockingIO
  991. // SAPI C++ Only Interface Equivalent: Same
  992. // Default: N/A
  993. //
  994. [propget, helpstring("NonBlockingIO"), id(DISPID_SASNonBlockingIO)]
  995. HRESULT NonBlockingIO([out,retval]long* NonBlockingIO);
  996. // State
  997. // SAPI C++ Only Interface Equivalent: Same
  998. // Default: N/A
  999. //
  1000. [propget, helpstring("State"), id(DISPID_SASState)]
  1001. HRESULT State([out, retval] SpeechAudioState * State);
  1002. // CurrentSeekPosition
  1003. // SAPI C++ Only Interface Equivalent: Same
  1004. // Default: N/A
  1005. //
  1006. [propget, helpstring("CurrentSeekPosition"), id(DISPID_SASCurrentSeekPosition)]
  1007. HRESULT CurrentSeekPosition([out,retval]VARIANT* CurrentSeekPosition);
  1008. // CurrentDevicePosition
  1009. // SAPI C++ Only Interface Equivalent: Same
  1010. // Default: N/A
  1011. //
  1012. [propget, helpstring("CurrentDevicePosition"), id(DISPID_SASCurrentDevicePosition)]
  1013. HRESULT CurrentDevicePosition([out,retval]VARIANT* CurrentDevicePosition);
  1014. };
  1015. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1016. //
  1017. // ISpeechAudioBufferInfo
  1018. // P3. We're not sure what this is for. Should be hidden?
  1019. // SAPI C++ Only Interface Equivalent: SPAUDIOBUFFERINFO Struct
  1020. // Default Property: N/A
  1021. //
  1022. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1023. typedef [hidden] enum DISPID_SpeechAudioBufferInfo
  1024. {
  1025. DISPID_SABIMinNotification = 1,
  1026. DISPID_SABIBufferSize,
  1027. DISPID_SABIEventBias
  1028. } DISPID_SpeechAudioBufferInfo;
  1029. [
  1030. object,
  1031. uuid(11B103D8-1142-4edf-A093-82FB3915F8CC),
  1032. dual,
  1033. helpstring("ISpeechAudioBufferInfo Interface"),
  1034. pointer_default(unique)
  1035. ]
  1036. interface ISpeechAudioBufferInfo : IDispatch
  1037. {
  1038. // Properties
  1039. // MinNotification
  1040. // SAPI C++ Only Interface Equivalent: Same
  1041. // Default: N/A
  1042. //
  1043. [propget, helpstring("MinNotification"), id(DISPID_SABIMinNotification)]
  1044. HRESULT MinNotification([out,retval]long* MinNotification);
  1045. [propput, helpstring("MinNotification"), id(DISPID_SABIMinNotification)]
  1046. HRESULT MinNotification([in]long MinNotification);
  1047. // BufferSize
  1048. // SAPI C++ Only Interface Equivalent: Same
  1049. // Default: N/A
  1050. //
  1051. [propget, helpstring("BufferSize"), id(DISPID_SABIBufferSize)]
  1052. HRESULT BufferSize([out,retval]long* BufferSize);
  1053. [propput, helpstring("BufferSize"), id(DISPID_SABIBufferSize)]
  1054. HRESULT BufferSize([in]long BufferSize);
  1055. // EventBias
  1056. // SAPI C++ Only Interface Equivalent: Same
  1057. // Default: N/A
  1058. //
  1059. [propget, helpstring("EventBias"), id(DISPID_SABIEventBias)]
  1060. HRESULT EventBias([out,retval]long* EventBias);
  1061. [propput, helpstring("EventBias"), id(DISPID_SABIEventBias)]
  1062. HRESULT EventBias([in]long EventBias);
  1063. }
  1064. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1065. //
  1066. // ISpeechWaveFormatEx
  1067. // SAPI C++ Only Interface Equivalent: WAVEFORMATEX Struct
  1068. // Default Property: N/A
  1069. //
  1070. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1071. typedef [hidden] enum DISPID_SpeechWaveFormatEx
  1072. {
  1073. DISPID_SWFEFormatTag = 1,
  1074. DISPID_SWFEChannels,
  1075. DISPID_SWFESamplesPerSec,
  1076. DISPID_SWFEAvgBytesPerSec,
  1077. DISPID_SWFEBlockAlign,
  1078. DISPID_SWFEBitsPerSample,
  1079. DISPID_SWFEExtraData
  1080. } DISPID_SpeechWaveFormatEx;
  1081. [
  1082. object,
  1083. uuid(7A1EF0D5-1581-4741-88E4-209A49F11A10),
  1084. dual,
  1085. helpstring("ISpeechWaveFormatEx Interface"),
  1086. pointer_default(unique)
  1087. ]
  1088. interface ISpeechWaveFormatEx : IDispatch
  1089. {
  1090. // Properties
  1091. // FormatTag
  1092. // SAPI C++ Only Interface Equivalent: Same
  1093. // Default: N/A
  1094. //
  1095. [propget, helpstring("FormatTag"), id(DISPID_SWFEFormatTag)]
  1096. HRESULT FormatTag([out,retval]short* FormatTag);
  1097. [propput, helpstring("FormatTag"), id(DISPID_SWFEFormatTag)]
  1098. HRESULT FormatTag([in]short FormatTag);
  1099. // Channels
  1100. // SAPI C++ Only Interface Equivalent: Same
  1101. // Default: N/A
  1102. //
  1103. [propget, helpstring("Channels"), id(DISPID_SWFEChannels)]
  1104. HRESULT Channels([out,retval]short* Channels);
  1105. [propput, helpstring("Channels"), id(DISPID_SWFEChannels)]
  1106. HRESULT Channels([in]short Channels);
  1107. // SamplesPerSec
  1108. // SAPI C++ Only Interface Equivalent: Same
  1109. // Default: N/A
  1110. //
  1111. [propget, helpstring("SamplesPerSec"), id(DISPID_SWFESamplesPerSec)]
  1112. HRESULT SamplesPerSec([out,retval]long* SamplesPerSec);
  1113. [propput, helpstring("SamplesPerSec"), id(DISPID_SWFESamplesPerSec)]
  1114. HRESULT SamplesPerSec([in]long SamplesPerSec);
  1115. // AvgBytesPerSec
  1116. // SAPI C++ Only Interface Equivalent: Same
  1117. // Default: N/A
  1118. //
  1119. [propget, helpstring("AvgBytesPerSec"), id(DISPID_SWFEAvgBytesPerSec)]
  1120. HRESULT AvgBytesPerSec([out,retval]long* AvgBytesPerSec);
  1121. [propput, helpstring("AvgBytesPerSec"), id(DISPID_SWFEAvgBytesPerSec)]
  1122. HRESULT AvgBytesPerSec([in]long AvgBytesPerSec);
  1123. // BlockAlign
  1124. // SAPI C++ Only Interface Equivalent: Same
  1125. // Default: N/A
  1126. //
  1127. [propget, helpstring("BlockAlign"), id(DISPID_SWFEBlockAlign)]
  1128. HRESULT BlockAlign([out,retval]short* BlockAlign);
  1129. [propput, helpstring("BlockAlign"), id(DISPID_SWFEBlockAlign)]
  1130. HRESULT BlockAlign([in]short BlockAlign);
  1131. // BitsPerSample
  1132. // SAPI C++ Only Interface Equivalent: Same
  1133. // Default: N/A
  1134. //
  1135. [propget, helpstring("BitsPerSample"), id(DISPID_SWFEBitsPerSample)]
  1136. HRESULT BitsPerSample([out,retval]short* BitsPerSample);
  1137. [propput, helpstring("BitsPerSample"), id(DISPID_SWFEBitsPerSample)]
  1138. HRESULT BitsPerSample([in]short BitsPerSample);
  1139. // ExtraData
  1140. // SAPI C++ Only Interface Equivalent: Same
  1141. // Default: N/A
  1142. //
  1143. [propget, helpstring("ExtraData"), id(DISPID_SWFEExtraData)]
  1144. HRESULT ExtraData([out,retval]VARIANT* ExtraData);
  1145. [propput, helpstring("ExtraData"), id(DISPID_SWFEExtraData)]
  1146. HRESULT ExtraData([in]VARIANT ExtraData);
  1147. }
  1148. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1149. //
  1150. // ISpeechVoice
  1151. // SAPI C++ Only Interface Equivalent: ISpVoice
  1152. // Default Property: Speak
  1153. //
  1154. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1155. typedef [hidden] enum DISPID_SpeechVoice
  1156. {
  1157. DISPID_SVStatus = 1,
  1158. DISPID_SVVoice,
  1159. DISPID_SVAudioOutput,
  1160. DISPID_SVAudioOutputStream,
  1161. DISPID_SVRate,
  1162. DISPID_SVVolume,
  1163. DISPID_SVAllowAudioOuputFormatChangesOnNextSet,
  1164. DISPID_SVEventInterests,
  1165. DISPID_SVPriority,
  1166. DISPID_SVAlertBoundary,
  1167. DISPID_SVSyncronousSpeakTimeout,
  1168. DISPID_SVSpeak,
  1169. DISPID_SVSpeakStream,
  1170. DISPID_SVPause,
  1171. DISPID_SVResume,
  1172. DISPID_SVSkip,
  1173. DISPID_SVGetVoices,
  1174. DISPID_SVGetAudioOutputs,
  1175. DISPID_SVWaitUntilDone,
  1176. DISPID_SVSpeakCompleteEvent,
  1177. DISPID_SVIsUISupported,
  1178. DISPID_SVDisplayUI
  1179. } DISPID_SpeechVoice;
  1180. //////////////////////////////////
  1181. //
  1182. // SpeechVoicePriority Enum
  1183. // SAPI C++ Only Interface Equivalent: SPVPRIORITY
  1184. //
  1185. //////////////////////////////////
  1186. typedef enum SpeechVoicePriority
  1187. {
  1188. SVPNormal = SPVPRI_NORMAL,
  1189. SVPAlert = SPVPRI_ALERT,
  1190. SVPOver = SPVPRI_OVER
  1191. } SpeechVoicePriority;
  1192. //////////////////////////////////
  1193. //
  1194. // SpeechVoiceSpeakFlags Enum
  1195. // SAPI C++ Only Interface Equivalent: SPEAKFLAGS
  1196. //
  1197. //////////////////////////////////
  1198. typedef enum SpeechVoiceSpeakFlags
  1199. {
  1200. //--- SpeechVoice flags
  1201. SVSFDefault = SPF_DEFAULT,
  1202. SVSFlagsAsync = SPF_ASYNC,
  1203. SVSFPurgeBeforeSpeak = SPF_PURGEBEFORESPEAK,
  1204. SVSFIsFilename = SPF_IS_FILENAME,
  1205. SVSFIsXML = SPF_IS_XML,
  1206. SVSFIsNotXML = SPF_IS_NOT_XML,
  1207. SVSFPersistXML = SPF_PERSIST_XML,
  1208. //--- Normalizer flags
  1209. SVSFNLPSpeakPunc = SPF_NLP_SPEAK_PUNC,
  1210. //--- Masks
  1211. SVSFNLPMask = SPF_NLP_MASK,
  1212. SVSFVoiceMask = SPF_VOICE_MASK,
  1213. SVSFUnusedFlags = SPF_UNUSED_FLAGS
  1214. } SpeechVoiceSpeakFlags;
  1215. //////////////////////////////////
  1216. //
  1217. // SpeechVoiceEvents Enum
  1218. // SAPI C++ Only Interface Equivalent: N/A
  1219. //
  1220. //////////////////////////////////
  1221. typedef enum SpeechVoiceEvents
  1222. {
  1223. SVEStartInputStream = (1L << 1),
  1224. SVEEndInputStream = (1L << 2),
  1225. SVEVoiceChange = (1L << 3),
  1226. SVEBookmark = (1L << 4),
  1227. SVEWordBoundary = (1L << 5),
  1228. SVEPhoneme = (1L << 6),
  1229. SVESentenceBoundary = (1L << 7),
  1230. SVEViseme = (1L << 8),
  1231. SVEAudioLevel = (1L << 9),
  1232. SVEPrivate = (1L << 15),
  1233. SVEAllEvents = 0x083FE // All TTS events on.
  1234. } SpeechVoiceEvents;
  1235. [
  1236. object,
  1237. uuid(269316D8-57BD-11D2-9EEE-00C04F797396),
  1238. dual,
  1239. helpstring("ISpeechVoice Interface"),
  1240. pointer_default(unique)
  1241. ]
  1242. interface ISpeechVoice : IDispatch
  1243. {
  1244. // Status
  1245. // SAPI C++ Only Interface Equivalent: GetStatus
  1246. // Default:
  1247. //
  1248. [propget, helpstring("Status"), id(DISPID_SVStatus)]
  1249. HRESULT Status([out, retval] ISpeechVoiceStatus** Status);
  1250. // Voice
  1251. // SAPI C++ Only Interface Equivalent: Get/SetVoice
  1252. // Default:
  1253. //
  1254. [propget, helpstring("Voice"), id(DISPID_SVVoice)]
  1255. HRESULT Voice([out, retval] ISpeechObjectToken** Voice );
  1256. [propputref, helpstring("Voice"), id(DISPID_SVVoice)]
  1257. HRESULT Voice([in]ISpeechObjectToken * Voice );
  1258. // AudioOutput
  1259. // SAPI C++ Only Interface Equivalent: GetOutputObjectTokens/SetOutput
  1260. // Default:
  1261. //
  1262. [propget, helpstring("Gets the audio output object"), id(DISPID_SVAudioOutput)]
  1263. HRESULT AudioOutput([out, retval]ISpeechObjectToken** AudioOutput);
  1264. [propputref, helpstring("Sets the audio output object"), id(DISPID_SVAudioOutput)]
  1265. HRESULT AudioOutput([in]ISpeechObjectToken* AudioOutput);
  1266. // AudioOutputStream
  1267. // SAPI C++ Only Interface Equivalent: GetOutputStream/SetOutput
  1268. // Default:
  1269. //
  1270. [propget, helpstring("Gets the audio output stream"), id(DISPID_SVAudioOutputStream)]
  1271. HRESULT AudioOutputStream([out, retval]ISpeechBaseStream** AudioOutputStream);
  1272. [propputref, helpstring("Sets the audio output stream"), id(DISPID_SVAudioOutputStream)]
  1273. HRESULT AudioOutputStream([in]ISpeechBaseStream* AudioOutputStream);
  1274. // Rate
  1275. // SAPI C++ Only Interface Equivalent: Get/SetRate
  1276. // Default:
  1277. //
  1278. [propget, helpstring("Rate"), id(DISPID_SVRate)]
  1279. HRESULT Rate([out, retval] long* Rate);
  1280. [propput, helpstring("Rate"), id(DISPID_SVRate)]
  1281. HRESULT Rate([in] long Rate);
  1282. // Volume
  1283. // SAPI C++ Only Interface Equivalent: Get/SetVolume
  1284. // Default:
  1285. //
  1286. [propget, helpstring("Volume"), id(DISPID_SVVolume)]
  1287. HRESULT Volume([out, retval] long* Volume);
  1288. [propput, helpstring("Volume"), id(DISPID_SVVolume)]
  1289. HRESULT Volume([in] long Volume);
  1290. // AllowAudioOutputFormatChangesOnNextSet
  1291. // SAPI C++ Only Interface Equivalent: N/A (used to be parameter of SetOutput)
  1292. // Default:
  1293. //
  1294. [propput, hidden, helpstring("AllowAudioOutputFormatChangesOnNextSet"), id(DISPID_SVAllowAudioOuputFormatChangesOnNextSet)]
  1295. HRESULT AllowAudioOutputFormatChangesOnNextSet([in] VARIANT_BOOL Allow );
  1296. [propget, hidden, helpstring("AllowAudioOutputFormatChangesOnNextSet"), id(DISPID_SVAllowAudioOuputFormatChangesOnNextSet)]
  1297. HRESULT AllowAudioOutputFormatChangesOnNextSet([out,retval] VARIANT_BOOL* Allow );
  1298. // EventInterests
  1299. // SAPI C++ Only Interface Equivalent: ISpEventSink::GetEventInterests
  1300. // Default:
  1301. //
  1302. [propget, helpstring("EventInterests"), id(DISPID_SVEventInterests)]
  1303. HRESULT EventInterests([out,retval] SpeechVoiceEvents* EventInterestFlags);
  1304. [propput, helpstring("EventInterests"), id(DISPID_SVEventInterests)]
  1305. HRESULT EventInterests([in] SpeechVoiceEvents EventInterestFlags);
  1306. // Priority
  1307. // SAPI C++ Only Interface Equivalent: Get/SetPriority
  1308. // Default:
  1309. //
  1310. [propput, helpstring("Priority"), id(DISPID_SVPriority)]
  1311. HRESULT Priority([in] SpeechVoicePriority Priority );
  1312. [propget, helpstring("Priority"), id(DISPID_SVPriority)]
  1313. HRESULT Priority([out,retval] SpeechVoicePriority* Priority );
  1314. // AlertBoundary
  1315. // SAPI C++ Only Interface Equivalent: Get/SetAlertBoundary
  1316. // Default:
  1317. //
  1318. [propput, helpstring("AlertBoundary"), id(DISPID_SVAlertBoundary)]
  1319. HRESULT AlertBoundary( [in] SpeechVoiceEvents Boundary );
  1320. [propget, helpstring("AlertBoundary"), id(DISPID_SVAlertBoundary)]
  1321. HRESULT AlertBoundary( [out,retval] SpeechVoiceEvents* Boundary );
  1322. // SyncSpeakTimeout
  1323. // SAPI C++ Only Interface Equivalent: Get/SetSyncSpeakTimeout
  1324. // Default:
  1325. //
  1326. [propput, helpstring("SyncSpeakTimeout"), id(DISPID_SVSyncronousSpeakTimeout)]
  1327. HRESULT SynchronousSpeakTimeout([in] long msTimeout );
  1328. [propget, helpstring("SyncSpeakTimeout"), id(DISPID_SVSyncronousSpeakTimeout)]
  1329. HRESULT SynchronousSpeakTimeout([out,retval] long* msTimeout );
  1330. // Methods
  1331. // Speak
  1332. // SAPI C++ Only Interface Equivalent: Same
  1333. //
  1334. [helpstring("Speak"), id(DISPID_SVSpeak)]
  1335. HRESULT Speak( [in] BSTR Text,
  1336. [in, defaultvalue(SPF_DEFAULT)] SpeechVoiceSpeakFlags Flags,
  1337. [out, retval]long* StreamNumber );
  1338. // SpeakStream
  1339. // SAPI C++ Only Interface Equivalent: Same
  1340. //
  1341. [helpstring("SpeakStream"), id(DISPID_SVSpeakStream)]
  1342. HRESULT SpeakStream( [in] ISpeechBaseStream* Stream,
  1343. [in, defaultvalue(SPF_DEFAULT)] SpeechVoiceSpeakFlags Flags,
  1344. [out, retval]long* StreamNumber );
  1345. // Pause
  1346. // SAPI C++ Only Interface Equivalent: Same
  1347. //
  1348. [helpstring("Pauses the voices rendering."), id(DISPID_SVPause)]
  1349. HRESULT Pause( void );
  1350. // Resume
  1351. // SAPI C++ Only Interface Equivalent: Same
  1352. //
  1353. [helpstring("Resumes the voices rendering."), id(DISPID_SVResume)]
  1354. HRESULT Resume( void );
  1355. // Skip
  1356. // SAPI C++ Only Interface Equivalent: Same
  1357. //
  1358. [helpstring("Skips rendering the specified number of items."), id(DISPID_SVSkip)]
  1359. HRESULT Skip( [in]const BSTR Type, [in]long NumItems, [out,retval]long* NumSkipped );
  1360. // GetVoices
  1361. // SAPI C++ Only Interface Equivalent: IEnumSpObjectTokens
  1362. //
  1363. [helpstring("GetVoices"), id(DISPID_SVGetVoices)]
  1364. HRESULT GetVoices([in, defaultvalue("")]BSTR RequiredAttributes,
  1365. [in, defaultvalue("")]BSTR OptionalAttributes,
  1366. [out,retval]ISpeechObjectTokens** ObjectTokens );
  1367. // GetAudioOutputs
  1368. // SAPI C++ Only Interface Equivalent: IEnumSpObjectTokens
  1369. //
  1370. [helpstring("GetAudioOutputs"), id(DISPID_SVGetAudioOutputs)]
  1371. HRESULT GetAudioOutputs([in, defaultvalue("")]BSTR RequiredAttributes,
  1372. [in, defaultvalue("")]BSTR OptionalAttributes,
  1373. [out,retval]ISpeechObjectTokens** ObjectTokens );
  1374. // WaitUntilDone
  1375. // SAPI C++ Only Interface Equivalent: Same
  1376. //
  1377. [helpstring("WaitUntilDone"), id(DISPID_SVWaitUntilDone)]
  1378. HRESULT WaitUntilDone([in]long msTimeout, [out,retval]VARIANT_BOOL * Done);
  1379. // SpeakCompleteEvent
  1380. // SAPI C++ Only Interface Equivalent: Same
  1381. //
  1382. [helpstring("SpeakCompleteEvent"), hidden, id(DISPID_SVSpeakCompleteEvent)]
  1383. HRESULT SpeakCompleteEvent([out,retval]long* Handle);
  1384. // IsUISupported
  1385. // SAPI C++ Only Interface Equivalent: Same
  1386. //
  1387. [helpstring("IsUISupported"), id(DISPID_SVIsUISupported)]
  1388. HRESULT IsUISupported( [in]const BSTR TypeOfUI,
  1389. [in, defaultvalue(NULL)]const VARIANT* ExtraData,
  1390. [out,retval] VARIANT_BOOL* Supported );
  1391. // DisplayUI
  1392. // SAPI C++ Only Interface Equivalent: Same
  1393. //
  1394. [helpstring("DisplayUI"), id(DISPID_SVDisplayUI)]
  1395. HRESULT DisplayUI( [in]long hWndParent,
  1396. [in]BSTR Title,
  1397. [in]const BSTR TypeOfUI,
  1398. [in, defaultvalue(NULL)]const VARIANT* ExtraData);
  1399. };
  1400. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1401. //
  1402. // ISpeechVoiceStatus
  1403. // SAPI C++ Only Interface Equivalent: SPVOICESTATUS Struct
  1404. // Default Property: N/A
  1405. //
  1406. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1407. typedef [hidden] enum DISPID_SpeechVoiceStatus
  1408. {
  1409. DISPID_SVSCurrentStreamNumber = 1,
  1410. DISPID_SVSLastStreamNumberQueued,
  1411. DISPID_SVSLastResult,
  1412. DISPID_SVSRunningState,
  1413. DISPID_SVSInputWordPosition,
  1414. DISPID_SVSInputWordLength,
  1415. DISPID_SVSInputSentencePosition,
  1416. DISPID_SVSInputSentenceLength,
  1417. DISPID_SVSLastBookmark,
  1418. DISPID_SVSLastBookmarkId,
  1419. DISPID_SVSPhonemeId,
  1420. DISPID_SVSVisemeId
  1421. } DISPID_SpeechVoiceStatus;
  1422. //////////////////////////////////
  1423. //
  1424. // SpeechRunState Enum
  1425. // SAPI C++ Only Interface Equivalent: SPRUNSTATE
  1426. //
  1427. //////////////////////////////////
  1428. typedef enum SpeechRunState
  1429. {
  1430. SRSEDone = SPRS_DONE, // The voice is done rendering all queued phrases
  1431. SRSEIsSpeaking = SPRS_IS_SPEAKING // The SpVoice currently has the audio queue claimed
  1432. } SpeechRunState;
  1433. [
  1434. object,
  1435. uuid(8BE47B07-57F6-11d2-9EEE-00C04F797396),
  1436. dual,
  1437. helpstring("ISpeechVoiceStatus Interface"),
  1438. pointer_default(unique)
  1439. ]
  1440. interface ISpeechVoiceStatus : IDispatch
  1441. {
  1442. // CurrentStream
  1443. // SAPI C++ Only Interface Equivalent: Same
  1444. // Default:
  1445. //
  1446. [propget, helpstring("CurrentStreamNumber"), id(DISPID_SVSCurrentStreamNumber)]
  1447. HRESULT CurrentStreamNumber([out, retval] long* StreamNumber);
  1448. // LastStreamNumberQueued
  1449. // SAPI C++ Only Interface Equivalent: Same
  1450. // Default:
  1451. //
  1452. [propget, helpstring("LastStreamNumberQueued"), id(DISPID_SVSLastStreamNumberQueued)]
  1453. HRESULT LastStreamNumberQueued([out, retval] long* StreamNumber);
  1454. // LastHResult
  1455. // SAPI C++ Only Interface Equivalent: Same
  1456. // Default:
  1457. //
  1458. [propget, helpstring("LastHResult"), id(DISPID_SVSLastResult)]
  1459. HRESULT LastHResult([out, retval]long* HResult);
  1460. // RunningState
  1461. // SAPI C++ Only Interface Equivalent: Same
  1462. // Default:
  1463. //
  1464. [propget, helpstring("RunningState"), id(DISPID_SVSRunningState)]
  1465. HRESULT RunningState([out, retval] SpeechRunState* State);
  1466. // InputWordPosition
  1467. // SAPI C++ Only Interface Equivalent: Same
  1468. // Default:
  1469. //
  1470. [propget, helpstring("InputWordPosition"), id(DISPID_SVSInputWordPosition)]
  1471. HRESULT InputWordPosition([out, retval] long* Position);
  1472. // InputWordLength
  1473. // SAPI C++ Only Interface Equivalent: Same
  1474. // Default:
  1475. //
  1476. [propget, helpstring("InputWordLength"), id(DISPID_SVSInputWordLength)]
  1477. HRESULT InputWordLength([out, retval] long* Length);
  1478. // InputSentencePosition
  1479. // SAPI C++ Only Interface Equivalent: Same
  1480. // Default:
  1481. //
  1482. [propget, helpstring("InputSentencePosition"), id(DISPID_SVSInputSentencePosition)]
  1483. HRESULT InputSentencePosition([out, retval] long* Position);
  1484. // InputSentenceLength
  1485. // SAPI C++ Only Interface Equivalent: Same
  1486. // Default:
  1487. //
  1488. [propget, helpstring("InputSentenceLength"), id(DISPID_SVSInputSentenceLength)]
  1489. HRESULT InputSentenceLength([out, retval] long* Length);
  1490. // LastBookmark
  1491. // SAPI C++ Only Interface Equivalent: Same
  1492. // Default:
  1493. //
  1494. [propget, helpstring("LastBookmark"), id(DISPID_SVSLastBookmark)]
  1495. HRESULT LastBookmark([out, retval] BSTR* Bookmark);
  1496. // LastBookmarkId
  1497. // SAPI C++ Only Interface Equivalent: Same
  1498. // Default:
  1499. //
  1500. [propget, helpstring("LastBookmarkId"), id(DISPID_SVSLastBookmarkId), hidden]
  1501. HRESULT LastBookmarkId([out, retval] long* BookmarkId);
  1502. // PhonemeId
  1503. // SAPI C++ Only Interface Equivalent: Same
  1504. // Default:
  1505. //
  1506. [propget, helpstring("PhonemeId"), id(DISPID_SVSPhonemeId)]
  1507. HRESULT PhonemeId([out, retval] short* PhoneId);
  1508. // VisemeId
  1509. // SAPI C++ Only Interface Equivalent: Same
  1510. // Default:
  1511. //
  1512. [propget, helpstring("VisemeId"), id(DISPID_SVSVisemeId)]
  1513. HRESULT VisemeId([out, retval] short* VisemeId);
  1514. };
  1515. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1516. //
  1517. // _ISpeechVoiceEvents
  1518. // SAPI C++ Only Interface Equivalent:
  1519. // Default Property: N/A
  1520. //
  1521. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1522. //////////////////////////////////
  1523. //
  1524. // SpeechVisemeType Enum
  1525. // SAPI C++ Only Interface Equivalent: SPVISEMES
  1526. //
  1527. //////////////////////////////////
  1528. typedef enum SpeechVisemeType
  1529. {
  1530. // English example
  1531. SVP_0 = 0, // silence
  1532. SVP_1, // ae, ax, ah
  1533. SVP_2, // aa
  1534. SVP_3, // ao
  1535. SVP_4, // ey, eh, uh
  1536. SVP_5, // er
  1537. SVP_6, // y, iy, ih, ix
  1538. SVP_7, // w, uw
  1539. SVP_8, // ow
  1540. SVP_9, // aw
  1541. SVP_10, // oy
  1542. SVP_11, // ay
  1543. SVP_12, // h
  1544. SVP_13, // r
  1545. SVP_14, // l
  1546. SVP_15, // s, z
  1547. SVP_16, // sh, ch, jh, zh
  1548. SVP_17, // th, dh
  1549. SVP_18, // f, v
  1550. SVP_19, // d, t, n
  1551. SVP_20, // k, g, ng
  1552. SVP_21, // p, b, m
  1553. } SpeechVisemeType ;
  1554. //////////////////////////////////
  1555. //
  1556. // SpeechVisemeFeature Enum
  1557. // SAPI C++ Only Interface Equivalent:
  1558. //
  1559. //////////////////////////////////
  1560. typedef enum SpeechVisemeFeature
  1561. {
  1562. SVF_None = 0,
  1563. SVF_Stressed = SPVFEATURE_STRESSED,
  1564. SVF_Emphasis = SPVFEATURE_EMPHASIS
  1565. } SpeechVisemeFeature;
  1566. typedef [hidden] enum DISPID_SpeechVoiceEvent
  1567. {
  1568. DISPID_SVEStreamStart = 1,
  1569. DISPID_SVEStreamEnd,
  1570. DISPID_SVEVoiceChange,
  1571. DISPID_SVEBookmark,
  1572. DISPID_SVEWord,
  1573. DISPID_SVEPhoneme,
  1574. DISPID_SVESentenceBoundary,
  1575. DISPID_SVEViseme,
  1576. DISPID_SVEAudioLevel,
  1577. DISPID_SVEEnginePrivate
  1578. } DISPID_SpeechVoiceEvent;
  1579. [
  1580. uuid(A372ACD1-3BEF-4bbd-8FFB-CB3E2B416AF8)
  1581. ]
  1582. dispinterface _ISpeechVoiceEvents
  1583. {
  1584. properties:
  1585. methods:
  1586. // StartStream
  1587. // SAPI C++ Only Interface Equivalent:
  1588. //
  1589. [helpstring("StartStream"), id(DISPID_SVEStreamStart)]
  1590. void StartStream([in]long StreamNumber, [in]VARIANT StreamPosition);
  1591. // EndStream
  1592. // SAPI C++ Only Interface Equivalent:
  1593. //
  1594. [helpstring("EndStream"), id(DISPID_SVEStreamEnd)]
  1595. void EndStream([in]long StreamNumber, [in]VARIANT StreamPosition);
  1596. // VoiceChange
  1597. // SAPI C++ Only Interface Equivalent:
  1598. //
  1599. [helpstring("VoiceChange"), id(DISPID_SVEVoiceChange)]
  1600. void VoiceChange([in]long StreamNumber,
  1601. [in]VARIANT StreamPosition,
  1602. [in]ISpeechObjectToken* VoiceObjectToken);
  1603. // Bookmark
  1604. // SAPI C++ Only Interface Equivalent:
  1605. //
  1606. [helpstring("Bookmark"), id(DISPID_SVEBookmark)]
  1607. void Bookmark([in]long StreamNumber,
  1608. [in]VARIANT StreamPosition,
  1609. [in]BSTR Bookmark,
  1610. [in]long BookmarkId);
  1611. // Word
  1612. // SAPI C++ Only Interface Equivalent:
  1613. //
  1614. [helpstring("Word"), id(DISPID_SVEWord)]
  1615. void Word([in]long StreamNumber,
  1616. [in]VARIANT StreamPosition,
  1617. [in]long CharacterPosition,
  1618. [in]long Length);
  1619. // Sentence
  1620. // SAPI C++ Only Interface Equivalent:
  1621. //
  1622. [helpstring("Sentence"), id(DISPID_SVESentenceBoundary)]
  1623. void Sentence([in]long StreamNumber,
  1624. [in]VARIANT StreamPosition,
  1625. [in]long CharacterPosition,
  1626. [in]long Length);
  1627. // Phoneme
  1628. // SAPI C++ Only Interface Equivalent:
  1629. //
  1630. [helpstring("Phoneme"), id(DISPID_SVEPhoneme)]
  1631. void Phoneme([in]long StreamNumber,
  1632. [in]VARIANT StreamPosition,
  1633. [in]long Duration, // In milliseconds
  1634. [in]short NextPhoneId,
  1635. [in]SpeechVisemeFeature Feature,
  1636. [in]short CurrentPhoneId);
  1637. // Viseme
  1638. // SAPI C++ Only Interface Equivalent:
  1639. //
  1640. [helpstring("Viseme"), id(DISPID_SVEViseme)]
  1641. void Viseme([in]long StreamNumber,
  1642. [in]VARIANT StreamPosition,
  1643. [in]long Duration, // In milliseconds
  1644. [in]SpeechVisemeType NextVisemeId,
  1645. [in]SpeechVisemeFeature Feature,
  1646. [in]SpeechVisemeType CurrentVisemeId);
  1647. // AudioLevel
  1648. // SAPI C++ Only Interface Equivalent:
  1649. //
  1650. [helpstring("AudioLevel"), id(DISPID_SVEAudioLevel)]
  1651. void AudioLevel([in]long StreamNumber,
  1652. [in]VARIANT StreamPosition,
  1653. [in]long AudioLevel);
  1654. // EnginePrivate
  1655. // SAPI C++ Only Interface Equivalent:
  1656. //
  1657. [helpstring("EnginePrivate"), id(DISPID_SVEEnginePrivate)]
  1658. void EnginePrivate( [in]long StreamNumber,
  1659. [in]long StreamPosition,
  1660. [in]VARIANT EngineData);
  1661. };
  1662. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1663. //
  1664. // ISpeechRecognizer
  1665. // SAPI C++ Only Interface Equivalent:
  1666. // Default Property: N/A
  1667. //
  1668. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1669. typedef [hidden] enum DISPID_SpeechRecognizer
  1670. {
  1671. DISPID_SRRecognizer = 1,
  1672. DISPID_SRAllowAudioInputFormatChangesOnNextSet,
  1673. DISPID_SRAudioInput,
  1674. DISPID_SRAudioInputStream,
  1675. DISPID_SRIsShared,
  1676. DISPID_SRState,
  1677. DISPID_SRStatus,
  1678. DISPID_SRProfile,
  1679. DISPID_SREmulateRecognition,
  1680. DISPID_SRCreateRecoContext,
  1681. DISPID_SRGetFormat,
  1682. DISPID_SRSetPropertyNumber,
  1683. DISPID_SRGetPropertyNumber,
  1684. DISPID_SRSetPropertyString,
  1685. DISPID_SRGetPropertyString,
  1686. DISPID_SRIsUISupported,
  1687. DISPID_SRDisplayUI,
  1688. DISPID_SRGetRecognizers,
  1689. DISPID_SVGetAudioInputs,
  1690. DISPID_SVGetProfiles
  1691. } DISPID_SpeechRecognizer;
  1692. /////////////////////////////////////////////////
  1693. //
  1694. // SpeechLexiconType Enum
  1695. // SAPI C++ Only Interface Equivalent:
  1696. //
  1697. /////////////////////////////////////////////////
  1698. typedef enum SpeechRecognizerState
  1699. {
  1700. SRSInactive = SPRST_INACTIVE,
  1701. SRSActive = SPRST_ACTIVE,
  1702. SRSActiveAlways = SPRST_ACTIVE_ALWAYS,
  1703. SRSInactiveWithPurge = SPRST_INACTIVE_WITH_PURGE,
  1704. } SpeechRecognizerState;
  1705. /////////////////////////////////////////////////
  1706. //
  1707. // SpeechDisplayAttributes Enum
  1708. // SAPI C++ Only Interface Equivalent:
  1709. //
  1710. /////////////////////////////////////////////////
  1711. typedef enum SpeechDisplayAttributes
  1712. {
  1713. SDA_No_Trailing_Space = 0,
  1714. SDA_One_Trailing_Space = SPAF_ONE_TRAILING_SPACE,
  1715. SDA_Two_Trailing_Spaces = SPAF_TWO_TRAILING_SPACES,
  1716. SDA_Consume_Leading_Spaces = SPAF_CONSUME_LEADING_SPACES
  1717. } SpeechDisplayAttributes;
  1718. /////////////////////////////////////////////////
  1719. //
  1720. // SpeechFormatType Enum
  1721. // SAPI C++ Only Interface Equivalent:
  1722. //
  1723. /////////////////////////////////////////////////
  1724. typedef enum SpeechFormatType
  1725. {
  1726. SFTInput = SPWF_INPUT,
  1727. SFTSREngine = SPWF_SRENGINE
  1728. } SpeechFormatType;
  1729. [
  1730. object,
  1731. uuid(2D5F1C0C-BD75-4b08-9478-3B11FEA2586C),
  1732. dual,
  1733. helpstring("ISpeechRecognizer Interface"),
  1734. pointer_default(unique)
  1735. ]
  1736. interface ISpeechRecognizer : IDispatch
  1737. {
  1738. // Properties
  1739. // Recognizer
  1740. // SAPI C++ Only Interface Equivalent:
  1741. // Default:
  1742. //
  1743. [propputref, helpstring("Recognizer"), id(DISPID_SRRecognizer)]
  1744. HRESULT Recognizer( [in]ISpeechObjectToken* Recognizer );
  1745. [propget, helpstring("Recognizer"), id(DISPID_SRRecognizer)]
  1746. HRESULT Recognizer( [out,retval]ISpeechObjectToken** Recognizer );
  1747. // AllowAudioInputFormatChangesOnNextSet
  1748. // SAPI C++ Only Interface Equivalent:
  1749. // Default:
  1750. //
  1751. [propput, hidden, helpstring("AllowAudioInputFormatChangesOnNextSet"), id(DISPID_SRAllowAudioInputFormatChangesOnNextSet)]
  1752. HRESULT AllowAudioInputFormatChangesOnNextSet([in] VARIANT_BOOL Allow );
  1753. [propget, hidden, helpstring("AllowAudioInputFormatChangesOnNextSet"), id(DISPID_SRAllowAudioInputFormatChangesOnNextSet)]
  1754. HRESULT AllowAudioInputFormatChangesOnNextSet([out,retval] VARIANT_BOOL* Allow );
  1755. // AudioInput
  1756. // SAPI C++ Only Interface Equivalent:
  1757. // Default:
  1758. //
  1759. [propputref, helpstring("AudioInput"), id(DISPID_SRAudioInput)]
  1760. HRESULT AudioInput( [in,defaultvalue(0)]ISpeechObjectToken* AudioInput );
  1761. [propget, helpstring("AudioInput"), id(DISPID_SRAudioInput)]
  1762. HRESULT AudioInput( [out,retval]ISpeechObjectToken** AudioInput );
  1763. // AudioInputStream
  1764. // SAPI C++ Only Interface Equivalent:
  1765. // Default:
  1766. //
  1767. [propputref, helpstring("AudioInputStream"), id(DISPID_SRAudioInputStream)]
  1768. HRESULT AudioInputStream( [in,defaultvalue(0)]ISpeechBaseStream* AudioInputStream );
  1769. [propget, helpstring("AudioInputStream"), id(DISPID_SRAudioInputStream)]
  1770. HRESULT AudioInputStream( [out,retval]ISpeechBaseStream** AudioInputStream );
  1771. // IsShared
  1772. // SAPI C++ Only Interface Equivalent:
  1773. // Default:
  1774. //
  1775. [propget, helpstring("IsShared"), id(DISPID_SRIsShared)]
  1776. HRESULT IsShared( [out,retval]VARIANT_BOOL* Shared );
  1777. // State
  1778. // SAPI C++ Only Interface Equivalent:
  1779. // Default:
  1780. //
  1781. [propput, helpstring("State"), id(DISPID_SRState)]
  1782. HRESULT State([in] SpeechRecognizerState State );
  1783. [propget, helpstring("State"), id(DISPID_SRState)]
  1784. HRESULT State([out,retval] SpeechRecognizerState* State );
  1785. // Status
  1786. // SAPI C++ Only Interface Equivalent:
  1787. // Default:
  1788. //
  1789. [propget, helpstring("Status"), id(DISPID_SRStatus)]
  1790. HRESULT Status([out,retval]ISpeechRecognizerStatus** Status );
  1791. // Profile
  1792. // SAPI C++ Only Interface Equivalent:
  1793. // Default:
  1794. //
  1795. [propputref, helpstring("Profile"), id(DISPID_SRProfile)]
  1796. HRESULT Profile( [in,defaultvalue(0)]ISpeechObjectToken* Profile );
  1797. [propget, helpstring("Profile"), id(DISPID_SRProfile)]
  1798. HRESULT Profile( [out,retval]ISpeechObjectToken** Profile );
  1799. // Methods
  1800. // EmulateRecognition
  1801. // SAPI C++ Only Interface Equivalent:
  1802. //
  1803. // Notes:
  1804. // TextElements param:
  1805. // * This parameter specifies the elements of the phrase to EmulateRecognition with.
  1806. // * If it is a BSTR string then its assumed that the elements in TextElements are assumed to be
  1807. // space delimited and you cannot use the DisplayAttributes parameter (it is ignored).
  1808. // * If it is an array of BSTR words then you are specifying each element in the phrase and
  1809. // you can optionally specify the ElementDisplayAttributes as appropriate.
  1810. // * You can specify additional information for each element by using the following syntax on
  1811. // each TextElement: "/display_text/lexical_form/pronounciation;". This syntax can be used in both the
  1812. // BSTR and the array of BSTRs case.
  1813. // ElementDisplayAttributes param:
  1814. // * This parameter specifies the SpeechDisplayAttribute to use for each Word element.
  1815. // * If it is a NULL pointer, VT_NULL, or VT_EMPTY then SDA_No_Trailing_Space is assumed (default).
  1816. // * If it is a BSTR then it can be "" (empty string), " " (space), or " " (double space)
  1817. // and we'll pick the appropriate SpeechDispalyAttribute that matches and use this for all text elements.
  1818. // * If it is a integer value (VT_I1 to VT_I4) then this value is a SpeechDisplayAttribute value and
  1819. // it is used for each element in the Words array for the DisplayAttribute setting.
  1820. // and we'll pick the appropriate SpeechDispalyAttribute that matches and use this for all text elements.
  1821. // * If it is an array of integer values (VT_I1 to VT_I4) we'll use those values for the SpeechDisplayAttribute
  1822. // of each corresponding element in the TextElements array.
  1823. // * This parameter is only valid if you are using an array of BSTRs for the TextElements parameter (ignored
  1824. // if you pass in BSTR for Words).
  1825. //
  1826. [helpstring("EmulateRecognition"), id(DISPID_SREmulateRecognition)]
  1827. HRESULT EmulateRecognition( [in]VARIANT TextElements, [in, defaultvalue(NULL)]VARIANT* ElementDisplayAttributes, [in, defaultvalue(0)]long LanguageId);
  1828. // CreateRecoContext
  1829. // SAPI C++ Only Interface Equivalent:
  1830. //
  1831. [helpstring("CreateRecoContext"), id(DISPID_SRCreateRecoContext)]
  1832. HRESULT CreateRecoContext([out,retval]ISpeechRecoContext** NewContext );
  1833. // GetFormat
  1834. // SAPI C++ Only Interface Equivalent:
  1835. //
  1836. [helpstring("GetFormat"), id(DISPID_SRGetFormat)]
  1837. HRESULT GetFormat([in] SpeechFormatType Type, [out,retval]ISpeechAudioFormat** Format );
  1838. // SetPropertyNumber
  1839. // SAPI C++ Only Interface Equivalent:
  1840. //
  1841. [helpstring("SetPropertyNumber"), hidden, id(DISPID_SRSetPropertyNumber)]
  1842. HRESULT SetPropertyNumber( [in]const BSTR Name, [in]long Value, [out,retval]VARIANT_BOOL * Supported );
  1843. // GetPropertyNumber
  1844. // SAPI C++ Only Interface Equivalent:
  1845. //
  1846. [helpstring("GetPropertyNumber"), hidden, id(DISPID_SRGetPropertyNumber)]
  1847. HRESULT GetPropertyNumber( [in]const BSTR Name, [in,out]long* Value, [out,retval]VARIANT_BOOL * Supported );
  1848. // SetPropertyString
  1849. // SAPI C++ Only Interface Equivalent:
  1850. //
  1851. [helpstring("SetPropertyString"), hidden, id(DISPID_SRSetPropertyString)]
  1852. HRESULT SetPropertyString( [in]const BSTR Name, [in]const BSTR Value, [out,retval]VARIANT_BOOL * Supported );
  1853. // GetPropertyString
  1854. // SAPI C++ Only Interface Equivalent:
  1855. //
  1856. [helpstring("GetPropertyString"), hidden, id(DISPID_SRGetPropertyString)]
  1857. HRESULT GetPropertyString( [in]const BSTR Name, [in,out]BSTR* Value, [out,retval]VARIANT_BOOL * Supported );
  1858. // IsUISupported
  1859. // SAPI C++ Only Interface Equivalent:
  1860. //
  1861. [helpstring("IsUISupported"), id(DISPID_SRIsUISupported)]
  1862. HRESULT IsUISupported( [in]const BSTR TypeOfUI,
  1863. [in, defaultvalue(NULL)]const VARIANT* ExtraData,
  1864. [out,retval] VARIANT_BOOL* Supported );
  1865. // DisplayUI
  1866. // SAPI C++ Only Interface Equivalent:
  1867. //
  1868. [helpstring("DisplayUI"), id(DISPID_SRDisplayUI)]
  1869. HRESULT DisplayUI( [in]long hWndParent,
  1870. [in]BSTR Title,
  1871. [in]const BSTR TypeOfUI,
  1872. [in, defaultvalue(NULL)]const VARIANT* ExtraData);
  1873. // GetRecognizers
  1874. // SAPI C++ Only Interface Equivalent:
  1875. //
  1876. [helpstring("GetRecognizers"), id(DISPID_SRGetRecognizers)]
  1877. HRESULT GetRecognizers([in, defaultvalue("")]BSTR RequiredAttributes,
  1878. [in, defaultvalue("")]BSTR OptionalAttributes,
  1879. [out,retval]ISpeechObjectTokens** ObjectTokens );
  1880. // GetAudioOutputs
  1881. // SAPI C++ Only Interface Equivalent: IEnumSpObjectTokens
  1882. //
  1883. [helpstring("GetAudioInputs"), id(DISPID_SVGetAudioInputs)]
  1884. HRESULT GetAudioInputs([in, defaultvalue("")]BSTR RequiredAttributes,
  1885. [in, defaultvalue("")]BSTR OptionalAttributes,
  1886. [out,retval]ISpeechObjectTokens** ObjectTokens );
  1887. // GetProfiles
  1888. // SAPI C++ Only Interface Equivalent: IEnumSpObjectTokens
  1889. //
  1890. [helpstring("GetProfiles"), id(DISPID_SVGetProfiles)]
  1891. HRESULT GetProfiles([in, defaultvalue("")]BSTR RequiredAttributes,
  1892. [in, defaultvalue("")]BSTR OptionalAttributes,
  1893. [out,retval]ISpeechObjectTokens** ObjectTokens );
  1894. };
  1895. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1896. //
  1897. // ISpeechRecognizerStatus
  1898. // SAPI C++ Only Interface Equivalent:
  1899. // Default Property: N/A
  1900. //
  1901. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1902. typedef [hidden] enum DISPID_SpeechRecognizerStatus
  1903. {
  1904. DISPID_SRSAudioStatus = 1,
  1905. DISPID_SRSCurrentStreamPosition,
  1906. DISPID_SRSCurrentStreamNumber,
  1907. DISPID_SRSNumberOfActiveRules,
  1908. DISPID_SRSClsidEngine,
  1909. DISPID_SRSSupportedLanguages
  1910. } DISPID_SpeechRecognizerStatus;
  1911. [
  1912. object,
  1913. uuid(BFF9E781-53EC-484e-BB8A-0E1B5551E35C),
  1914. dual,
  1915. helpstring("ISpeechRecognizerStatus Interface"),
  1916. pointer_default(unique)
  1917. ]
  1918. interface ISpeechRecognizerStatus : IDispatch
  1919. {
  1920. // Properties
  1921. // AudioStatus
  1922. // SAPI C++ Only Interface Equivalent:
  1923. // Default:
  1924. //
  1925. [propget, helpstring("AudioStatus"),id(DISPID_SRSAudioStatus)]
  1926. HRESULT AudioStatus([out,retval]ISpeechAudioStatus** AudioStatus );
  1927. // CurrentStreamPosition
  1928. // SAPI C++ Only Interface Equivalent:
  1929. // Default:
  1930. //
  1931. [propget, helpstring("CurrentStreamPosition"), id(DISPID_SRSCurrentStreamPosition)]
  1932. HRESULT CurrentStreamPosition([out,retval]VARIANT* pCurrentStreamPos );
  1933. // CurrentStreamNumber
  1934. // SAPI C++ Only Interface Equivalent:
  1935. // Default:
  1936. //
  1937. [propget, helpstring("CurrentStreamNumber"), id(DISPID_SRSCurrentStreamNumber)]
  1938. HRESULT CurrentStreamNumber([out,retval]long* StreamNumber );
  1939. // NumberOfActiveRules
  1940. // SAPI C++ Only Interface Equivalent:
  1941. // Default:
  1942. //
  1943. [propget, helpstring("NumberOfActiveRules"), id(DISPID_SRSNumberOfActiveRules)]
  1944. HRESULT NumberOfActiveRules([out,retval]long* NumberOfActiveRules );
  1945. // ClsidEngine
  1946. // SAPI C++ Only Interface Equivalent:
  1947. // Default:
  1948. //
  1949. [propget, helpstring("ClsidEngine"), id(DISPID_SRSClsidEngine)]
  1950. HRESULT ClsidEngine([out,retval]BSTR* ClsidEngine );
  1951. // SupportedLanguages
  1952. // SAPI C++ Only Interface Equivalent:
  1953. // Default:
  1954. //
  1955. [propget, helpstring("SupportedLanguages"), id(DISPID_SRSSupportedLanguages)]
  1956. HRESULT SupportedLanguages([out,retval]VARIANT* SupportedLanguages );
  1957. };
  1958. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1959. //
  1960. // ISpeechRecoContext
  1961. // SAPI C++ Only Interface Equivalent:
  1962. // Default Property: N/A
  1963. //
  1964. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1965. typedef [hidden] enum DISPID_SpeechRecoContext
  1966. {
  1967. DISPID_SRCRecognizer = 1,
  1968. DISPID_SRCAudioInInterferenceStatus,
  1969. DISPID_SRCRequestedUIType,
  1970. DISPID_SRCVoice,
  1971. DISPID_SRAllowVoiceFormatMatchingOnNextSet,
  1972. DISPID_SRCVoicePurgeEvent,
  1973. DISPID_SRCEventInterests,
  1974. DISPID_SRCCmdMaxAlternates,
  1975. DISPID_SRCState,
  1976. DISPID_SRCRetainedAudio,
  1977. DISPID_SRCRetainedAudioFormat,
  1978. DISPID_SRCPause,
  1979. DISPID_SRCResume,
  1980. DISPID_SRCCreateGrammar,
  1981. DISPID_SRCCreateResultFromMemory,
  1982. DISPID_SRCBookmark,
  1983. DISPID_SRCSetAdaptationData
  1984. } DISPID_SpeechRecoContext;
  1985. /////////////////////////////////////////////////
  1986. //
  1987. // SpeechRetainedAudioOptions Enum
  1988. // SAPI C++ Only Interface Equivalent:
  1989. //
  1990. /////////////////////////////////////////////////
  1991. typedef enum SpeechRetainedAudioOptions
  1992. {
  1993. SRAONone = SPAO_NONE,
  1994. SRAORetainAudio = SPAO_RETAIN_AUDIO
  1995. } SpeechRetainedAudioOptions;
  1996. /////////////////////////////////////////////////
  1997. //
  1998. // SpeechBookmarkOptions Enum
  1999. // SAPI C++ Only Interface Equivalent:
  2000. //
  2001. /////////////////////////////////////////////////
  2002. typedef enum SpeechBookmarkOptions
  2003. {
  2004. SBONone = SPBO_NONE,
  2005. SBOPause = SPBO_PAUSE
  2006. } SpeechBookmarkOptions;
  2007. /////////////////////////////////////////////////
  2008. //
  2009. // SpeechInterference Enum
  2010. // SAPI C++ Only Interface Equivalent:
  2011. //
  2012. /////////////////////////////////////////////////
  2013. typedef enum SpeechInterference
  2014. {
  2015. SINone = SPINTERFERENCE_NONE,
  2016. SINoise = SPINTERFERENCE_NOISE,
  2017. SINoSignal = SPINTERFERENCE_NOSIGNAL,
  2018. SITooLoud = SPINTERFERENCE_TOOLOUD,
  2019. SITooQuiet = SPINTERFERENCE_TOOQUIET,
  2020. SITooFast = SPINTERFERENCE_TOOFAST,
  2021. SITooSlow = SPINTERFERENCE_TOOSLOW
  2022. } SpeechInterference;
  2023. /////////////////////////////////////////////////
  2024. //
  2025. // SpeechRecoEvents Enum
  2026. // SAPI C++ Only Interface Equivalent:
  2027. //
  2028. /////////////////////////////////////////////////
  2029. typedef enum SpeechRecoEvents
  2030. {
  2031. SREStreamEnd = (1L << 0), // SR engine has reached the end of an input stream
  2032. SRESoundStart = (1L << 1), // SR engine has detected the start of non-trivial audio data
  2033. SRESoundEnd = (1L << 2), // SR engine has detected the end of non-trivial audio data
  2034. SREPhraseStart = (1L << 3), // SR engine has detected the start of a recognizable phrase
  2035. SRERecognition = (1L << 4), // SR engine's best hypothesis for the audio data
  2036. SREHypothesis = (1L << 5), // SR engine's interim hypothesis for the result of the audio data
  2037. SREBookmark = (1L << 6), // SR engine has reached the specified point in the audio stream
  2038. SREPropertyNumChange = (1L << 7), // LPARAM points to a string, WPARAM is the attrib value
  2039. SREPropertyStringChange = (1L << 8), // LPARAM pointer to buffer. Two concatinated null terminated strings.
  2040. SREFalseRecognition = (1L << 9), // apparent speech with no valid recognition
  2041. SREInterference = (1L << 10), // LPARAM is any combination of SPINTERFERENCE flags
  2042. SRERequestUI = (1L << 11), // LPARAM is string.
  2043. SREStateChange = (1L << 12), // wParam contains new reco state
  2044. SREAdaptation = (1L << 13), // the adaptation buffer is now ready to be accepted
  2045. SREStreamStart = (1L << 14), // SR engine has reached the start of an input stream
  2046. SRERecoOtherContext = (1L << 15), // Phrase finished and recognized, but for other context
  2047. SREAudioLevel = (1L << 16), // input audio volume level
  2048. SREPrivate = (1L << 18), // private engine specific event
  2049. SREAllEvents = 0x5FFFF // All Reco events on.
  2050. } SpeechRecoEvents;
  2051. /////////////////////////////////////////////////
  2052. //
  2053. // SpeechRecoContextState Enum
  2054. // SAPI C++ Only Interface Equivalent:
  2055. //
  2056. /////////////////////////////////////////////////
  2057. typedef enum SpeechRecoContextState
  2058. {
  2059. SRCS_Disabled = SPCS_DISABLED,
  2060. SRCS_Enabled = SPCS_ENABLED
  2061. } SpeechRecoContextState;
  2062. [
  2063. object,
  2064. uuid(580AA49D-7E1E-4809-B8E2-57DA806104B8),
  2065. dual,
  2066. helpstring("ISpeechRecoContext Interface"),
  2067. pointer_default(unique)
  2068. ]
  2069. interface ISpeechRecoContext : IDispatch
  2070. {
  2071. // Properties
  2072. // Recognizer
  2073. // SAPI C++ Only Interface Equivalent:
  2074. // Default:
  2075. //
  2076. [propget, helpstring("Recognizer"), id(DISPID_SRCRecognizer)]
  2077. HRESULT Recognizer( [out,retval]ISpeechRecognizer** Recognizer );
  2078. // AudioInInterferenceStatus
  2079. // SAPI C++ Only Interface Equivalent:
  2080. // Default:
  2081. //
  2082. [propget, helpstring("AudioInInterferenceStatus"), id(DISPID_SRCAudioInInterferenceStatus)]
  2083. HRESULT AudioInputInterferenceStatus( [out,retval]SpeechInterference* Interference );
  2084. // RequestedUIType
  2085. // SAPI C++ Only Interface Equivalent:
  2086. // Default:
  2087. //
  2088. [propget, helpstring("RequestedUIType"), id(DISPID_SRCRequestedUIType)]
  2089. HRESULT RequestedUIType( [out,retval]BSTR* UIType );
  2090. // Voice
  2091. // SAPI C++ Only Interface Equivalent:
  2092. // Default:
  2093. //
  2094. [propputref, helpstring("Voice"), id(DISPID_SRCVoice)]
  2095. HRESULT Voice([in]ISpeechVoice *Voice );
  2096. [propget, helpstring("Voice"), id(DISPID_SRCVoice)]
  2097. HRESULT Voice([out,retval]ISpeechVoice **Voice );
  2098. // AllowVoiceFormatMatchingOnNextSet
  2099. //
  2100. [propput, hidden, helpstring("AllowVoiceFormatMatchingOnNextSet"), id(DISPID_SRAllowVoiceFormatMatchingOnNextSet)]
  2101. HRESULT AllowVoiceFormatMatchingOnNextSet([in] VARIANT_BOOL Allow );
  2102. [propget, hidden, helpstring("AllowAudioInputFormatChangesOnNextSet"), id(DISPID_SRAllowVoiceFormatMatchingOnNextSet)]
  2103. HRESULT AllowVoiceFormatMatchingOnNextSet([out,retval] VARIANT_BOOL* pAllow );
  2104. // VoicePurgeEvent
  2105. // SAPI C++ Only Interface Equivalent:
  2106. // Default:
  2107. //
  2108. [propput, helpstring("VoicePurgeEvent"), id(DISPID_SRCVoicePurgeEvent)]
  2109. HRESULT VoicePurgeEvent( [in]SpeechRecoEvents EventInterest );
  2110. [propget, helpstring("VoicePurgeEvent"), id(DISPID_SRCVoicePurgeEvent)]
  2111. HRESULT VoicePurgeEvent( [out,retval]SpeechRecoEvents* EventInterest );
  2112. // EventInterests
  2113. // SAPI C++ Only Interface Equivalent:
  2114. // Default:
  2115. //
  2116. [propput, helpstring("EventInterests"), id(DISPID_SRCEventInterests)]
  2117. HRESULT EventInterests( [in]SpeechRecoEvents EventInterest );
  2118. [propget, helpstring("EventInterests"), id(DISPID_SRCEventInterests)]
  2119. HRESULT EventInterests( [out,retval]SpeechRecoEvents* EventInterest );
  2120. // CmdMaxAlternates
  2121. // SAPI C++ Only Interface Equivalent:
  2122. // Default:
  2123. //
  2124. [propput, helpstring("CmdMaxAlternates"), id(DISPID_SRCCmdMaxAlternates)]
  2125. HRESULT CmdMaxAlternates([in] long MaxAlternates );
  2126. [propget, helpstring("CmdMaxAlternates"), id(DISPID_SRCCmdMaxAlternates)]
  2127. HRESULT CmdMaxAlternates([out,retval] long* MaxAlternates );
  2128. // State
  2129. // SAPI C++ Only Interface Equivalent:
  2130. // Default:
  2131. //
  2132. [propput, helpstring("State"), id(DISPID_SRCState)]
  2133. HRESULT State([in] SpeechRecoContextState State );
  2134. [propget, helpstring("State"), id(DISPID_SRCState)]
  2135. HRESULT State([out,retval] SpeechRecoContextState* State );
  2136. // RetainedAudio
  2137. // SAPI C++ Only Interface Equivalent:
  2138. // Default:
  2139. //
  2140. [propput, helpstring("RetainedAudio"), id(DISPID_SRCRetainedAudio)]
  2141. HRESULT RetainedAudio([in]SpeechRetainedAudioOptions Option);
  2142. [propget, helpstring("RetainedAudio"), id(DISPID_SRCRetainedAudio)]
  2143. HRESULT RetainedAudio([out,retval]SpeechRetainedAudioOptions* Option);
  2144. // RetainedAudioFormat
  2145. // SAPI C++ Only Interface Equivalent:
  2146. // Default:
  2147. //
  2148. [propputref, helpstring("RetainedAudioFormat"), id(DISPID_SRCRetainedAudioFormat)]
  2149. HRESULT RetainedAudioFormat([in] ISpeechAudioFormat* Format );
  2150. [propget, helpstring("RetainedAudioFormat"), id(DISPID_SRCRetainedAudioFormat)]
  2151. HRESULT RetainedAudioFormat([out,retval] ISpeechAudioFormat** Format );
  2152. // Methods
  2153. // Pause
  2154. // SAPI C++ Only Interface Equivalent:
  2155. //
  2156. [helpstring("Pause"), id(DISPID_SRCPause)]
  2157. HRESULT Pause(void);
  2158. // Resume
  2159. // SAPI C++ Only Interface Equivalent:
  2160. //
  2161. [helpstring("Resume"), id(DISPID_SRCResume)]
  2162. HRESULT Resume(void);
  2163. // CreateGrammar
  2164. // SAPI C++ Only Interface Equivalent:
  2165. //
  2166. [helpstring("CreateGrammar"), id(DISPID_SRCCreateGrammar)]
  2167. HRESULT CreateGrammar( [in, defaultvalue(0)]VARIANT GrammarId, [out,retval]ISpeechRecoGrammar** Grammar );
  2168. // CreateResultFromMemory
  2169. // SAPI C++ Only Interface Equivalent:
  2170. //
  2171. [helpstring("CreateResultFromMemory"), id(DISPID_SRCCreateResultFromMemory)]
  2172. HRESULT CreateResultFromMemory( [in]VARIANT* ResultBlock, [out,retval]ISpeechRecoResult **Result );
  2173. // Bookmark
  2174. // SAPI C++ Only Interface Equivalent:
  2175. //
  2176. [helpstring("Bookmark"), id(DISPID_SRCBookmark)]
  2177. HRESULT Bookmark( [in]SpeechBookmarkOptions Options, [in]VARIANT StreamPos, [in]VARIANT BookmarkId );
  2178. // SetAdaptationData
  2179. // SAPI C++ Only Interface Equivalent:
  2180. //
  2181. [helpstring("SetAdaptationData"), id(DISPID_SRCSetAdaptationData)]
  2182. HRESULT SetAdaptationData( [in]BSTR AdaptationString );
  2183. };
  2184. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2185. //
  2186. // ISpeechRecoGrammar
  2187. // SAPI C++ Only Interface Equivalent:
  2188. // Default Property: N/A
  2189. //
  2190. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2191. typedef [hidden] enum DISPIDSPRG
  2192. {
  2193. DISPID_SRGId = 1,
  2194. DISPID_SRGRecoContext,
  2195. DISPID_SRGState,
  2196. DISPID_SRGRules,
  2197. DISPID_SRGReset,
  2198. DISPID_SRGCommit,
  2199. DISPID_SRGCmdLoadFromFile,
  2200. DISPID_SRGCmdLoadFromObject,
  2201. DISPID_SRGCmdLoadFromResource,
  2202. DISPID_SRGCmdLoadFromMemory,
  2203. DISPID_SRGCmdLoadFromProprietaryGrammar,
  2204. DISPID_SRGCmdSetRuleState,
  2205. DISPID_SRGCmdSetRuleIdState,
  2206. DISPID_SRGDictationLoad,
  2207. DISPID_SRGDictationUnload,
  2208. DISPID_SRGDictationSetState,
  2209. DISPID_SRGSetWordSequenceData,
  2210. DISPID_SRGSetTextSelection,
  2211. DISPID_SRGIsPronounceable
  2212. } DISPIDSPRG;
  2213. /////////////////////////////////////////////////
  2214. //
  2215. // SpeechLoadOption Enum
  2216. // SAPI C++ Only Interface Equivalent:
  2217. //
  2218. /////////////////////////////////////////////////
  2219. typedef enum SpeechLoadOption
  2220. {
  2221. SLOStatic = SPLO_STATIC,
  2222. SLODynamic = SPLO_DYNAMIC
  2223. } SpeechLoadOption;
  2224. /////////////////////////////////////////////////
  2225. //
  2226. // SpeechWordPronounceable Enum
  2227. // SAPI C++ Only Interface Equivalent:
  2228. //
  2229. /////////////////////////////////////////////////
  2230. typedef enum SpeechWordPronounceable
  2231. {
  2232. SWPUnknownWordUnpronounceable = SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE,
  2233. SWPUnknownWordPronounceable = SPWP_UNKNOWN_WORD_PRONOUNCEABLE,
  2234. SWPKnownWordPronounceable = SPWP_KNOWN_WORD_PRONOUNCEABLE
  2235. } SpeechWordPronounceable;
  2236. /////////////////////////////////////////////////
  2237. //
  2238. // SpeechGrammarState Enum
  2239. // SAPI C++ Only Interface Equivalent:
  2240. //
  2241. /////////////////////////////////////////////////
  2242. typedef enum SpeechGrammarState
  2243. {
  2244. SGSEnabled = SPGS_ENABLED,
  2245. SGSDisabled = SPGS_DISABLED,
  2246. SGSExclusive = SPGS_EXCLUSIVE,
  2247. } SpeechGrammarState;
  2248. /////////////////////////////////////////////////
  2249. //
  2250. // SpeechRuleState Enum
  2251. // SAPI C++ Only Interface Equivalent:
  2252. //
  2253. /////////////////////////////////////////////////
  2254. typedef enum SpeechRuleState
  2255. {
  2256. SGDSInactive = SPRS_INACTIVE,
  2257. SGDSActive = SPRS_ACTIVE,
  2258. SGDSActiveWithAutoPause = SPRS_ACTIVE_WITH_AUTO_PAUSE
  2259. } SpeechRuleState;
  2260. /////////////////////////////////////////////////
  2261. //
  2262. // SpeechRuleAttributes Enum
  2263. // SAPI C++ Only Interface Equivalent:
  2264. //
  2265. /////////////////////////////////////////////////
  2266. typedef enum SpeechRuleAttributes
  2267. {
  2268. SRATopLevel = SPRAF_TopLevel,
  2269. SRADefaultToActive = SPRAF_Active,
  2270. SRAExport = SPRAF_Export,
  2271. SRAImport = SPRAF_Import,
  2272. SRAInterpreter = SPRAF_Interpreter,
  2273. SRADynamic = SPRAF_Dynamic
  2274. } SpeechRuleAttributes;
  2275. /////////////////////////////////////////////////
  2276. //
  2277. // SpeechGrammarWordType Enum
  2278. // SAPI C++ Only Interface Equivalent:
  2279. //
  2280. /////////////////////////////////////////////////
  2281. typedef enum SpeechGrammarWordType
  2282. {
  2283. SGDisplay = SPWT_DISPLAY, // Not implemented
  2284. SGLexical = SPWT_LEXICAL,
  2285. SGPronounciation = SPWT_PRONUNCIATION // Not implemented
  2286. } SpeechGrammarWordType;
  2287. [
  2288. object,
  2289. uuid(B6D6F79F-2158-4e50-B5BC-9A9CCD852A09),
  2290. dual,
  2291. helpstring("ISpeechRecoGrammar Interface"),
  2292. pointer_default(unique)
  2293. ]
  2294. interface ISpeechRecoGrammar : IDispatch
  2295. {
  2296. // Properties
  2297. // Id
  2298. // SAPI C++ Only Interface Equivalent:
  2299. // Default:
  2300. //
  2301. [propget, helpstring("Id"), id(DISPID_SRGId)]
  2302. HRESULT Id( [out,retval]VARIANT* Id );
  2303. // RecoContext
  2304. // SAPI C++ Only Interface Equivalent:
  2305. // Default:
  2306. //
  2307. [propget, helpstring("RecoContext"), id(DISPID_SRGRecoContext)]
  2308. HRESULT RecoContext( [out,retval] ISpeechRecoContext** RecoContext );
  2309. // State
  2310. // SAPI C++ Only Interface Equivalent:
  2311. // Default:
  2312. //
  2313. [propput, helpstring("State"), id(DISPID_SRGState)]
  2314. HRESULT State( [in]SpeechGrammarState State );
  2315. [propget, helpstring("State"), id(DISPID_SRGState)]
  2316. HRESULT State( [out,retval]SpeechGrammarState* State);
  2317. // Rules
  2318. // SAPI C++ Only Interface Equivalent:
  2319. // Default:
  2320. //
  2321. [propget, helpstring("Rules"), id(DISPID_SRGRules)]
  2322. HRESULT Rules( [out,retval]ISpeechGrammarRules** Rules);
  2323. // Methods
  2324. // Reset
  2325. // SAPI C++ Only Interface Equivalent:
  2326. //
  2327. [helpstring("Reset"), id(DISPID_SRGReset)]
  2328. HRESULT Reset([in, defaultvalue(0)]SpeechLanguageId NewLanguage);
  2329. // CmdLoadFromFile
  2330. // SAPI C++ Only Interface Equivalent:
  2331. //
  2332. [helpstring("CmdLoadFromFile"), id(DISPID_SRGCmdLoadFromFile)]
  2333. HRESULT CmdLoadFromFile( [in]const BSTR FileName, [in, defaultvalue(SLOStatic)]SpeechLoadOption LoadOption );
  2334. // CmdLoadFromObject
  2335. // SAPI C++ Only Interface Equivalent:
  2336. //
  2337. [helpstring("CmdLoadFromObject"), id(DISPID_SRGCmdLoadFromObject)]
  2338. HRESULT CmdLoadFromObject( [in]const BSTR ClassId,
  2339. [in]const BSTR GrammarName,
  2340. [in, defaultvalue(SLOStatic)]SpeechLoadOption LoadOption );
  2341. // CmdLoadFromResource
  2342. // SAPI C++ Only Interface Equivalent:
  2343. //
  2344. [helpstring("CmdLoadFromResource"), id(DISPID_SRGCmdLoadFromResource)]
  2345. HRESULT CmdLoadFromResource( [in]long hModule,
  2346. [in]VARIANT ResourceName,
  2347. [in]VARIANT ResourceType,
  2348. [in]SpeechLanguageId LanguageId,
  2349. [in, defaultvalue(SLOStatic)]SpeechLoadOption LoadOption );
  2350. // CmdLoadFromMemory
  2351. // SAPI C++ Only Interface Equivalent:
  2352. //
  2353. [helpstring("CmdLoadFromMemory"), id(DISPID_SRGCmdLoadFromMemory)]
  2354. HRESULT CmdLoadFromMemory( [in] VARIANT GrammarData, [in, defaultvalue(SLOStatic)]SpeechLoadOption LoadOption );
  2355. // CmdLoadFromProprietaryGrammar
  2356. // SAPI C++ Only Interface Equivalent:
  2357. //
  2358. [helpstring("CmdLoadFromProprietaryGrammar"), id(DISPID_SRGCmdLoadFromProprietaryGrammar)]
  2359. HRESULT CmdLoadFromProprietaryGrammar( [in]const BSTR ProprietaryGuid,
  2360. [in]const BSTR ProprietaryString,
  2361. [in]VARIANT ProprietaryData,
  2362. [in, defaultvalue(SLOStatic)]SpeechLoadOption LoadOption );
  2363. // CmdSetRuleState
  2364. // SAPI C++ Only Interface Equivalent:
  2365. //
  2366. [helpstring("CmdSetRuleState"), id(DISPID_SRGCmdSetRuleState)]
  2367. HRESULT CmdSetRuleState( [in/*, defaultvalue("")*/]const BSTR Name, [in]SpeechRuleState State);
  2368. // CmdSetRuleIdState
  2369. // SAPI C++ Only Interface Equivalent:
  2370. //
  2371. [helpstring("CmdSetRuleIdState"), id(DISPID_SRGCmdSetRuleIdState)]
  2372. HRESULT CmdSetRuleIdState( [in/*, defaultvalue(0)*/]long RuleId, [in]SpeechRuleState State );
  2373. // DictationLoad
  2374. // SAPI C++ Only Interface Equivalent:
  2375. //
  2376. [helpstring("DictationLoad"), id(DISPID_SRGDictationLoad)]
  2377. HRESULT DictationLoad( [in, defaultvalue("")] const BSTR TopicName, [in, defaultvalue(SLOStatic)]SpeechLoadOption LoadOption );
  2378. // DictationUnload
  2379. // SAPI C++ Only Interface Equivalent:
  2380. //
  2381. [helpstring("DictationUnload"), id(DISPID_SRGDictationUnload)]
  2382. HRESULT DictationUnload( void );
  2383. // DictationSetState
  2384. // SAPI C++ Only Interface Equivalent:
  2385. //
  2386. [helpstring("DictationSetState"), id(DISPID_SRGDictationSetState)]
  2387. HRESULT DictationSetState( [in]SpeechRuleState State );
  2388. // SetWordSequenceData
  2389. // SAPI C++ Only Interface Equivalent:
  2390. //
  2391. [helpstring("SetWordSequenceData"), id(DISPID_SRGSetWordSequenceData)]
  2392. HRESULT SetWordSequenceData( [in]const BSTR Text, [in]long TextLength, [in]ISpeechTextSelectionInformation* Info );
  2393. // SetTextSelection
  2394. // SAPI C++ Only Interface Equivalent:
  2395. //
  2396. [helpstring("SetTextSelection"), id(DISPID_SRGSetTextSelection)]
  2397. HRESULT SetTextSelection( [in]ISpeechTextSelectionInformation* Info );
  2398. // IsPronounceable
  2399. // SAPI C++ Only Interface Equivalent:
  2400. //
  2401. [helpstring("IsPronounceable"), id(DISPID_SRGIsPronounceable)]
  2402. HRESULT IsPronounceable( [in]const BSTR Word, [out,retval]SpeechWordPronounceable* WordPronounceable );
  2403. };
  2404. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2405. //
  2406. // _ISpeechRecoContextEvents
  2407. // SAPI C++ Only Interface Equivalent:
  2408. // Default Property: N/A
  2409. //
  2410. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2411. typedef [hidden] enum DISPID_SpeechRecoContextEvents
  2412. {
  2413. DISPID_SRCEStartStream = 1,
  2414. DISPID_SRCEEndStream,
  2415. DISPID_SRCEBookmark,
  2416. DISPID_SRCESoundStart,
  2417. DISPID_SRCESoundEnd,
  2418. DISPID_SRCEPhraseStart,
  2419. DISPID_SRCERecognition,
  2420. DISPID_SRCEHypothesis,
  2421. DISPID_SRCEPropertyNumberChange,
  2422. DISPID_SRCEPropertyStringChange,
  2423. DISPID_SRCEFalseRecognition,
  2424. DISPID_SRCEInterference,
  2425. DISPID_SRCERequestUI,
  2426. DISPID_SRCERecognizerStateChange,
  2427. DISPID_SRCEAdaptation,
  2428. DISPID_SRCERecognitionForOtherContext,
  2429. DISPID_SRCEAudioLevel,
  2430. DISPID_SRCEEnginePrivate
  2431. } DISPID_SpeechRecoContextEvents;
  2432. /////////////////////////////////////////////////
  2433. //
  2434. // SpeechRecognitionType Enum
  2435. // SAPI C++ Only Interface Equivalent:
  2436. //
  2437. /////////////////////////////////////////////////
  2438. typedef enum SpeechRecognitionType
  2439. {
  2440. SRTStandard = 0,
  2441. SRTAutopause = SPREF_AutoPause,
  2442. SRTEmulated = SPREF_Emulated
  2443. } SpeechRecognitionType;
  2444. [
  2445. uuid(7B8FCB42-0E9D-4f00-A048-7B04D6179D3D)
  2446. ]
  2447. dispinterface _ISpeechRecoContextEvents
  2448. {
  2449. properties:
  2450. methods:
  2451. // Methods
  2452. // StartStream
  2453. // SAPI C++ Only Interface Equivalent:
  2454. //
  2455. [helpstring("StartStream"), id(DISPID_SRCEStartStream)]
  2456. void StartStream([in]long StreamNumber, [in]VARIANT StreamPosition);
  2457. // EndStream
  2458. // SAPI C++ Only Interface Equivalent:
  2459. //
  2460. [helpstring("EndStream"), id(DISPID_SRCEEndStream)]
  2461. void EndStream([in]long StreamNumber, [in]VARIANT StreamPosition, [in]VARIANT_BOOL StreamReleased);
  2462. // Bookmark
  2463. // SAPI C++ Only Interface Equivalent:
  2464. //
  2465. [helpstring("Bookmark"), id(DISPID_SRCEBookmark)]
  2466. void Bookmark([in]long StreamNumber, [in]VARIANT StreamPosition, [in]VARIANT BookmarkId, [in]SpeechBookmarkOptions Options);
  2467. // SoundStart
  2468. // SAPI C++ Only Interface Equivalent:
  2469. //
  2470. [helpstring("SoundStart"), id(DISPID_SRCESoundStart)]
  2471. void SoundStart([in]long StreamNumber, [in]VARIANT StreamPosition);
  2472. // SoundEnd
  2473. // SAPI C++ Only Interface Equivalent:
  2474. //
  2475. [helpstring("SoundEnd"), id(DISPID_SRCESoundEnd)]
  2476. void SoundEnd([in]long StreamNumber, [in]VARIANT StreamPosition);
  2477. // PhraseStart
  2478. // SAPI C++ Only Interface Equivalent:
  2479. //
  2480. [helpstring("PhraseStart"), id(DISPID_SRCEPhraseStart)]
  2481. void PhraseStart([in]long StreamNumber, [in]VARIANT StreamPosition);
  2482. // Recognition
  2483. // SAPI C++ Only Interface Equivalent:
  2484. //
  2485. [helpstring("Recognition"), id(DISPID_SRCERecognition)]
  2486. void Recognition([in]long StreamNumber, [in]VARIANT StreamPosition, [in]SpeechRecognitionType RecognitionType, [in]ISpeechRecoResult * Result);
  2487. // Hypothesis
  2488. // SAPI C++ Only Interface Equivalent:
  2489. //
  2490. [helpstring("Hypothesis"), id(DISPID_SRCEHypothesis)]
  2491. void Hypothesis([in]long StreamNumber, [in]VARIANT StreamPosition, [in]ISpeechRecoResult* Result);
  2492. // PropertyNumberChange
  2493. // SAPI C++ Only Interface Equivalent:
  2494. //
  2495. [helpstring("PropertyNumberChange"), id(DISPID_SRCEPropertyNumberChange)]
  2496. void PropertyNumberChange([in]long StreamNumber, [in]VARIANT StreamPosition, [in]BSTR PropertyName, [in]long NewNumberValue);
  2497. // PropertyStringChange
  2498. // SAPI C++ Only Interface Equivalent:
  2499. //
  2500. [helpstring("PropertyStringChange"), id(DISPID_SRCEPropertyStringChange)]
  2501. void PropertyStringChange([in]long StreamNumber, [in]VARIANT StreamPosition, [in]BSTR PropertyName, [in]BSTR NewStringValue);
  2502. // FalseRecognition
  2503. // SAPI C++ Only Interface Equivalent:
  2504. //
  2505. [helpstring("FalseRecognition"), id(DISPID_SRCEFalseRecognition)]
  2506. void FalseRecognition([in]long StreamNumber, [in]VARIANT StreamPosition, [in]ISpeechRecoResult* Result);
  2507. // Interference
  2508. // SAPI C++ Only Interface Equivalent:
  2509. //
  2510. [helpstring("Interference"), id(DISPID_SRCEInterference)]
  2511. void Interference([in]long StreamNumber, [in]VARIANT StreamPosition, [in]SpeechInterference Interference);
  2512. // RequestUI
  2513. // SAPI C++ Only Interface Equivalent:
  2514. //
  2515. [helpstring("RequestUI"), id(DISPID_SRCERequestUI)]
  2516. void RequestUI([in]long StreamNumber, [in]VARIANT StreamPosition, [in]BSTR UIType);
  2517. // RecognizerStateChange
  2518. // SAPI C++ Only Interface Equivalent:
  2519. //
  2520. [helpstring("RecognizerStateChange"), id(DISPID_SRCERecognizerStateChange)]
  2521. void RecognizerStateChange([in]long StreamNumber, [in]VARIANT StreamPosition, [in]SpeechRecognizerState NewState);
  2522. // Adaption
  2523. // SAPI C++ Only Interface Equivalent:
  2524. //
  2525. [helpstring("Adaptation"), id(DISPID_SRCEAdaptation)]
  2526. void Adaptation([in]long StreamNumber, [in]VARIANT StreamPosition);
  2527. // RecognitionForOtherContext
  2528. // SAPI C++ Only Interface Equivalent:
  2529. //
  2530. [helpstring("RecognitionForOtherContext"), id(DISPID_SRCERecognitionForOtherContext)]
  2531. void RecognitionForOtherContext([in]long StreamNumber, [in]VARIANT StreamPosition);
  2532. // AudioLevel
  2533. // SAPI C++ Only Interface Equivalent:
  2534. //
  2535. [helpstring("AudioLevel"), id(DISPID_SRCEAudioLevel)]
  2536. void AudioLevel([in]long StreamNumber, [in]VARIANT StreamPosition, [in]long AudioLevel);
  2537. // EnginePrivate
  2538. // SAPI C++ Only Interface Equivalent:
  2539. //
  2540. [helpstring("EnginePrivate"), id(DISPID_SRCEEnginePrivate)]
  2541. void EnginePrivate([in]long StreamNumber, [in]VARIANT StreamPosition, [in]VARIANT EngineData);
  2542. };
  2543. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2544. //
  2545. // ISpeechGrammarRule
  2546. // SAPI C++ Only Interface Equivalent:
  2547. // Default Property: N/A
  2548. //
  2549. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2550. typedef [hidden] enum DISPID_SpeechGrammarRule
  2551. {
  2552. DISPID_SGRAttributes = 1,
  2553. DISPID_SGRInitialState,
  2554. DISPID_SGRName,
  2555. DISPID_SGRId,
  2556. DISPID_SGRClear,
  2557. DISPID_SGRAddResource,
  2558. DISPID_SGRAddState
  2559. } DISPID_SpeechGrammarRule;
  2560. [
  2561. object,
  2562. uuid(AFE719CF-5DD1-44f2-999C-7A399F1CFCCC),
  2563. dual,
  2564. helpstring("ISpeechGrammarRule Interface"),
  2565. pointer_default(unique)
  2566. ]
  2567. interface ISpeechGrammarRule : IDispatch
  2568. {
  2569. // Properties
  2570. // RuleAttributes
  2571. // SAPI C++ Only Interface Equivalent:
  2572. // Default:
  2573. //
  2574. [propget, helpstring("RuleAttributes"), id(DISPID_SGRAttributes)]
  2575. HRESULT Attributes([out, retval] SpeechRuleAttributes* Attributes );
  2576. // InitialState
  2577. // SAPI C++ Only Interface Equivalent:
  2578. // Default:
  2579. //
  2580. [propget, helpstring("InitialState"), id(DISPID_SGRInitialState)]
  2581. HRESULT InitialState([out, retval] ISpeechGrammarRuleState** State);
  2582. // Name
  2583. // SAPI C++ Only Interface Equivalent:
  2584. // Default:
  2585. //
  2586. [propget, helpstring("Name"), id(DISPID_SGRName)]
  2587. HRESULT Name([out, retval] BSTR* Name);
  2588. // Id
  2589. // SAPI C++ Only Interface Equivalent:
  2590. // Default:
  2591. //
  2592. [propget, helpstring("Id"), id(DISPID_SGRId)]
  2593. HRESULT Id([out, retval] long* Id);
  2594. // Methods
  2595. // Clear
  2596. // SAPI C++ Only Interface Equivalent:
  2597. //
  2598. [helpstring("Clear"),id(DISPID_SGRClear)]
  2599. HRESULT Clear();
  2600. // AddResource
  2601. // SAPI C++ Only Interface Equivalent:
  2602. //
  2603. [helpstring("AddResource"), id(DISPID_SGRAddResource)]
  2604. HRESULT AddResource([in]const BSTR ResourceName, [in]const BSTR ResourceValue);
  2605. // AddState
  2606. // SAPI C++ Only Interface Equivalent:
  2607. //
  2608. [helpstring("AddState"), id(DISPID_SGRAddState)]
  2609. HRESULT AddState([out, retval] ISpeechGrammarRuleState** State);
  2610. };
  2611. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2612. //
  2613. // ISpeechGrammarRules
  2614. // SAPI C++ Only Interface Equivalent:
  2615. // Default Property: N/A
  2616. //
  2617. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2618. typedef [hidden] enum DISPID_SpeechGrammarRules
  2619. {
  2620. DISPID_SGRsCount = 1,
  2621. DISPID_SGRsDynamic,
  2622. DISPID_SGRsAdd,
  2623. DISPID_SGRsCommit,
  2624. DISPID_SGRsCommitAndSave,
  2625. DISPID_SGRsFindRule,
  2626. DISPID_SGRsItem = DISPID_VALUE,
  2627. DISPID_SGRs_NewEnum = DISPID_NEWENUM
  2628. } DISPID_SpeechGrammarRules;
  2629. [
  2630. object,
  2631. uuid(6FFA3B44-FC2D-40d1-8AFC-32911C7F1AD1),
  2632. dual,
  2633. helpstring("ISpeechGrammarRules Interface"),
  2634. pointer_default(unique)
  2635. ]
  2636. interface ISpeechGrammarRules : IDispatch
  2637. {
  2638. // Properties
  2639. // RuleAttributes
  2640. // SAPI C++ Only Interface Equivalent:
  2641. // Default:
  2642. //
  2643. [propget, helpstring("Count"), id(DISPID_SGRsCount)]
  2644. HRESULT Count([out, retval] long* Count);
  2645. // FindRule
  2646. // SAPI C++ Only Interface Equivalent:
  2647. // NOTE: This returns S_OK with NULL Rule if rule is not found.
  2648. [helpstring("FindRule"), id(DISPID_SGRsFindRule)]
  2649. HRESULT FindRule([in]VARIANT RuleNameOrId, [out, retval]ISpeechGrammarRule** Rule);
  2650. // Item
  2651. // SAPI C++ Only Interface Equivalent:
  2652. // Default:
  2653. //
  2654. [id(DISPID_SGRsItem), helpstring("Item")]
  2655. HRESULT Item([in] long Index, [out, retval]ISpeechGrammarRule** Rule );
  2656. // _NewEnum
  2657. // SAPI C++ Only Interface Equivalent:
  2658. // Default:
  2659. //
  2660. [id(DISPID_SGRs_NewEnum), propget, helpstring("Enumerates the alternates"), restricted]
  2661. HRESULT _NewEnum([out, retval] IUnknown** EnumVARIANT);
  2662. // Dynamic
  2663. // SAPI C++ Only Interface Equivalent:
  2664. // Default:
  2665. //
  2666. [propget, helpstring("Dynamic"), id(DISPID_SGRsDynamic)]
  2667. HRESULT Dynamic([out, retval] VARIANT_BOOL *Dynamic);
  2668. // Methods
  2669. // Add
  2670. // SAPI C++ Only Interface Equivalent:
  2671. //
  2672. [helpstring("Add"), id(DISPID_SGRsAdd)]
  2673. HRESULT Add([in] BSTR RuleName,
  2674. [in] SpeechRuleAttributes Attributes,
  2675. [in, defaultvalue(0)] long RuleId,
  2676. [out, retval] ISpeechGrammarRule** Rule);
  2677. // Commit
  2678. // SAPI C++ Only Interface Equivalent:
  2679. //
  2680. [helpstring("Commit"), id(DISPID_SGRsCommit)]
  2681. HRESULT Commit(void);
  2682. // CommitAndSave
  2683. // SAPI C++ Only Interface Equivalent:
  2684. //
  2685. [helpstring("CommitAndSave"), id(DISPID_SGRsCommitAndSave)]
  2686. HRESULT CommitAndSave([out] BSTR* ErrorText, [out, retval] VARIANT* SaveStream);
  2687. };
  2688. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2689. //
  2690. // ISpeechGrammarRuleState
  2691. // SAPI C++ Only Interface Equivalent:
  2692. // Default Property: N/A
  2693. //
  2694. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2695. typedef [hidden] enum DISPID_SpeechGrammarRuleState
  2696. {
  2697. DISPID_SGRSRule = 1,
  2698. DISPID_SGRSTransitions,
  2699. DISPID_SGRSAddWordTransition,
  2700. DISPID_SGRSAddRuleTransition,
  2701. DISPID_SGRSAddSpecialTransition
  2702. } DISPID_SpeechGrammarRuleState;
  2703. typedef enum SpeechSpecialTransitionType
  2704. {
  2705. SSTTWildcard = 1,
  2706. SSTTDictation,
  2707. SSTTTextBuffer
  2708. } SpeechSpecialTransitionType;
  2709. [
  2710. object,
  2711. uuid(D4286F2C-EE67-45ae-B928-28D695362EDA),
  2712. dual,
  2713. helpstring("ISpeechGrammarRuleState Interface"),
  2714. pointer_default(unique)
  2715. ]
  2716. interface ISpeechGrammarRuleState : IDispatch
  2717. {
  2718. // Properties
  2719. // Rule
  2720. // SAPI C++ Only Interface Equivalent:
  2721. // Default:
  2722. //
  2723. [propget, helpstring("Rule"), id(DISPID_SGRSRule)]
  2724. HRESULT Rule([out, retval] ISpeechGrammarRule** Rule);
  2725. // Transitions
  2726. // SAPI C++ Only Interface Equivalent:
  2727. // Default:
  2728. //
  2729. [propget, helpstring("Transitions"), id(DISPID_SGRSTransitions)]
  2730. HRESULT Transitions([out, retval] ISpeechGrammarRuleStateTransitions** Transitions);
  2731. // Methods
  2732. // AddWordTransition
  2733. // SAPI C++ Only Interface Equivalent:
  2734. //
  2735. [helpstring("AddWordTransition"), id(DISPID_SGRSAddWordTransition)]
  2736. HRESULT AddWordTransition([in]ISpeechGrammarRuleState* DestState,
  2737. [in]const BSTR Words,
  2738. [in, defaultvalue(" ")]const BSTR Separators,
  2739. [in, defaultvalue(SGLexical)]SpeechGrammarWordType Type,
  2740. [in, defaultvalue("")]const BSTR PropertyName,
  2741. [in, defaultvalue(0)]long PropertyId,
  2742. [in, defaultvalue(0)]VARIANT* PropertyValue,
  2743. [in, defaultvalue(1.0)]float Weight);
  2744. // AddRuleTransition
  2745. // SAPI C++ Only Interface Equivalent:
  2746. //
  2747. [helpstring("AddRuleTransition"), id(DISPID_SGRSAddRuleTransition)]
  2748. HRESULT AddRuleTransition([in]ISpeechGrammarRuleState* DestinationState,
  2749. [in]ISpeechGrammarRule* Rule,
  2750. [in, defaultvalue("")]const BSTR PropertyName,
  2751. [in, defaultvalue(0)]long PropertyId,
  2752. [in, defaultvalue(0)]VARIANT* PropertyValue,
  2753. [in, defaultvalue(1.0)]float Weight);
  2754. // AddSpecialTransition
  2755. // SAPI C++ Only Interface Equivalent:
  2756. //
  2757. [helpstring("AddSpecialTransition"), id(DISPID_SGRSAddSpecialTransition)]
  2758. HRESULT AddSpecialTransition([in]ISpeechGrammarRuleState* DestinationState,
  2759. [in]SpeechSpecialTransitionType Type,
  2760. [in, defaultvalue("")]const BSTR PropertyName,
  2761. [in, defaultvalue(0)]long PropertyId,
  2762. [in, defaultvalue(0)]VARIANT* PropertyValue,
  2763. [in, defaultvalue(1.0)]float Weight);
  2764. };
  2765. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2766. //
  2767. // ISpeechGrammarStateTransitions
  2768. // SAPI C++ Only Interface Equivalent:
  2769. // Default Property: N/A
  2770. //
  2771. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2772. typedef [hidden] enum DISPID_SpeechGrammarRuleStateTransitions
  2773. {
  2774. DISPID_SGRSTsCount = 1,
  2775. DISPID_SGRSTsItem = DISPID_VALUE,
  2776. DISPID_SGRSTs_NewEnum = DISPID_NEWENUM
  2777. } DISPID_SpeechGrammarRuleStateTransitions;
  2778. [
  2779. object,
  2780. uuid(EABCE657-75BC-44a2-AA7F-C56476742963),
  2781. dual,
  2782. helpstring("ISpeechGrammarRuleStateTransitions Interface"),
  2783. pointer_default(unique)
  2784. ]
  2785. interface ISpeechGrammarRuleStateTransitions : IDispatch
  2786. {
  2787. // Properties
  2788. // Count
  2789. // SAPI C++ Only Interface Equivalent:
  2790. // Default:
  2791. //
  2792. [propget, helpstring("Count"), id(DISPID_SGRSTsCount)]
  2793. HRESULT Count([out, retval] long* Count);
  2794. // Methods
  2795. // Item
  2796. // SAPI C++ Only Interface Equivalent:
  2797. //
  2798. [helpstring("Item"), id(DISPID_SGRSTsItem)]
  2799. HRESULT Item([in] long Index, [out, retval]ISpeechGrammarRuleStateTransition** Transition );
  2800. // _NewEnum
  2801. // SAPI C++ Only Interface Equivalent:
  2802. //
  2803. [propget, helpstring("Enumerates the transitions"), restricted, id(DISPID_SGRSTs_NewEnum)]
  2804. HRESULT _NewEnum([out, retval] IUnknown** EnumVARIANT);
  2805. };
  2806. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2807. //
  2808. // ISpeechGrammarStateTransition
  2809. // SAPI C++ Only Interface Equivalent:
  2810. // Default Property: N/A
  2811. //
  2812. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2813. typedef [hidden] enum DISPID_SpeechGrammarRuleStateTransition
  2814. {
  2815. DISPID_SGRSTType = 1,
  2816. DISPID_SGRSTText,
  2817. DISPID_SGRSTRule,
  2818. DISPID_SGRSTWeight,
  2819. DISPID_SGRSTPropertyName,
  2820. DISPID_SGRSTPropertyId,
  2821. DISPID_SGRSTPropertyValue,
  2822. DISPID_SGRSTNextState
  2823. } DISPID_SpeechGrammarRuleStateTransition;
  2824. //////////////////////////////////
  2825. //
  2826. // SpeechGrammarRuleStateTransitionType Enum
  2827. // SAPI C++ Only Interface Equivalent:
  2828. //
  2829. //////////////////////////////////
  2830. typedef enum SpeechGrammarRuleStateTransitionType
  2831. {
  2832. SGRSTTEpsilon = 0,
  2833. SGRSTTWord,
  2834. SGRSTTRule,
  2835. SGRSTTDictation,
  2836. SGRSTTWildcard,
  2837. SGRSTTTextBuffer
  2838. } SpeechGrammarRuleStateTransitionType;
  2839. [
  2840. object,
  2841. uuid(CAFD1DB1-41D1-4a06-9863-E2E81DA17A9A),
  2842. dual,
  2843. helpstring("ISpeechGrammarRuleStateTransition Interface"),
  2844. pointer_default(unique)
  2845. ]
  2846. interface ISpeechGrammarRuleStateTransition : IDispatch
  2847. {
  2848. // Properties
  2849. // Type
  2850. // SAPI C++ Only Interface Equivalent:
  2851. // Default:
  2852. //
  2853. [propget, helpstring("Type"), id(DISPID_SGRSTType)]
  2854. HRESULT Type([out, retval] SpeechGrammarRuleStateTransitionType* Type);
  2855. // Text
  2856. // SAPI C++ Only Interface Equivalent:
  2857. // Default:
  2858. //
  2859. [propget, helpstring("Text"), id(DISPID_SGRSTText)]
  2860. HRESULT Text([out, retval] BSTR* Text);
  2861. // Rule
  2862. // SAPI C++ Only Interface Equivalent:
  2863. // Default:
  2864. //
  2865. [propget, helpstring("Rule"), id(DISPID_SGRSTRule)]
  2866. HRESULT Rule([out, retval] ISpeechGrammarRule ** Rule);
  2867. // Weight
  2868. // SAPI C++ Only Interface Equivalent:
  2869. // Default:
  2870. //
  2871. [propget, helpstring("Weight"), id(DISPID_SGRSTWeight)]
  2872. HRESULT Weight([out, retval] VARIANT * Weight);
  2873. // PropertyName
  2874. // SAPI C++ Only Interface Equivalent:
  2875. // Default:
  2876. //
  2877. [propget, helpstring("PropertyName"), id(DISPID_SGRSTPropertyName)]
  2878. HRESULT PropertyName([out, retval] BSTR * PropertyName);
  2879. // PropertyId
  2880. // SAPI C++ Only Interface Equivalent:
  2881. // Default:
  2882. //
  2883. [propget, helpstring("PropertyId"), id(DISPID_SGRSTPropertyId)]
  2884. HRESULT PropertyId([out, retval] long * PropertyId);
  2885. // PropertyValue
  2886. // SAPI C++ Only Interface Equivalent:
  2887. // Default:
  2888. //
  2889. [propget, helpstring("PropertyValue"), id(DISPID_SGRSTPropertyValue)]
  2890. HRESULT PropertyValue([out, retval] VARIANT * PropertyValue);
  2891. // NextState
  2892. // SAPI C++ Only Interface Equivalent:
  2893. // Default:
  2894. //
  2895. [propget, helpstring("NextState"), id(DISPID_SGRSTNextState)]
  2896. HRESULT NextState([out, retval] ISpeechGrammarRuleState ** NextState);
  2897. };
  2898. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2899. //
  2900. // ISpeechTextSelectionInformation
  2901. // SAPI C++ Only Interface Equivalent:
  2902. // Default Property: N/A
  2903. //
  2904. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2905. typedef [hidden] enum DISPIDSPTSI
  2906. {
  2907. DISPIDSPTSI_ActiveOffset = 1,
  2908. DISPIDSPTSI_ActiveLength,
  2909. DISPIDSPTSI_SelectionOffset,
  2910. DISPIDSPTSI_SelectionLength
  2911. } DISPIDSPTSI;
  2912. [
  2913. object,
  2914. uuid(3B9C7E7A-6EEE-4DED-9092-11657279ADBE),
  2915. dual,
  2916. helpstring("ISpeechTextSelectionInformation Interface"),
  2917. pointer_default(unique)
  2918. ]
  2919. interface ISpeechTextSelectionInformation : IDispatch
  2920. {
  2921. // Properties
  2922. // ActiveOffset
  2923. // SAPI C++ Only Interface Equivalent:
  2924. // Default:
  2925. //
  2926. [propput, helpstring("ActiveOffset"), id(DISPIDSPTSI_ActiveOffset)]
  2927. HRESULT ActiveOffset( [in]long ActiveOffset );
  2928. [propget, helpstring("ActiveOffset"), id(DISPIDSPTSI_ActiveOffset)]
  2929. HRESULT ActiveOffset( [out, retval]long* ActiveOffset );
  2930. // ActiveLength
  2931. // SAPI C++ Only Interface Equivalent:
  2932. // Default:
  2933. //
  2934. [propput, helpstring("ActiveLength"), id(DISPIDSPTSI_ActiveLength)]
  2935. HRESULT ActiveLength( [in]long ActiveLength );
  2936. [propget, helpstring("ActiveLength"), id(DISPIDSPTSI_ActiveLength)]
  2937. HRESULT ActiveLength( [out, retval]long* ActiveLength );
  2938. // SelectionOffset
  2939. // SAPI C++ Only Interface Equivalent:
  2940. // Default:
  2941. //
  2942. [propput, helpstring("SelectionOffset"), id(DISPIDSPTSI_SelectionOffset)]
  2943. HRESULT SelectionOffset( [in]long SelectionOffset );
  2944. [propget, helpstring("SelectionOffset"), id(DISPIDSPTSI_SelectionOffset)]
  2945. HRESULT SelectionOffset( [out, retval]long* SelectionOffset );
  2946. // SelectionLength
  2947. // SAPI C++ Only Interface Equivalent:
  2948. // Default:
  2949. //
  2950. [propput, helpstring("SelectionLength"), id(DISPIDSPTSI_SelectionLength)]
  2951. HRESULT SelectionLength( [in]long SelectionLength );
  2952. [propget, helpstring("SelectionLength"), id(DISPIDSPTSI_SelectionLength)]
  2953. HRESULT SelectionLength( [out, retval]long* SelectionLength );
  2954. };
  2955. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2956. //
  2957. // ISpeechRecoResult
  2958. // SAPI C++ Only Interface Equivalent:
  2959. // Default Property: N/A
  2960. //
  2961. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2962. typedef [hidden] enum DISPID_SpeechRecoResult
  2963. {
  2964. DISPID_SRRRecoContext = 1,
  2965. DISPID_SRRTimes,
  2966. DISPID_SRRAudioFormat,
  2967. DISPID_SRRPhraseInfo,
  2968. DISPID_SRRAlternates,
  2969. DISPID_SRRAudio,
  2970. DISPID_SRRSpeakAudio,
  2971. DISPID_SRRSaveToMemory,
  2972. DISPID_SRRDiscardResultInfo
  2973. } DISPID_SpeechRecoResult;
  2974. /////////////////////////////////////////////////
  2975. //
  2976. // SpeechDiscardType Enum
  2977. // SAPI C++ Only Interface Equivalent:
  2978. //
  2979. /////////////////////////////////////////////////
  2980. typedef enum SpeechDiscardType
  2981. {
  2982. SDTProperty = SPDF_PROPERTY,
  2983. SDTReplacement = SPDF_REPLACEMENT,
  2984. SDTRule = SPDF_RULE,
  2985. SDTDisplayText = SPDF_DISPLAYTEXT,
  2986. SDTLexicalForm = SPDF_LEXICALFORM,
  2987. SDTPronunciation = SPDF_PRONUNCIATION,
  2988. SDTAudio = SPDF_AUDIO,
  2989. SDTAlternates = SPDF_ALTERNATES,
  2990. SDTAll = SPDF_ALL
  2991. } SpeechDiscardType;
  2992. [
  2993. object,
  2994. uuid(ED2879CF-CED9-4ee6-A534-DE0191D5468D),
  2995. dual,
  2996. helpstring("ISpeechRecoResult Interface"),
  2997. pointer_default(unique)
  2998. ]
  2999. interface ISpeechRecoResult : IDispatch
  3000. {
  3001. // Properties
  3002. // RecoContext
  3003. // SAPI C++ Only Interface Equivalent:
  3004. // Default:
  3005. //
  3006. [propget, helpstring("RecoContext"), id(DISPID_SRRRecoContext)]
  3007. HRESULT RecoContext( [out,retval]ISpeechRecoContext** RecoContext );
  3008. // Times
  3009. // SAPI C++ Only Interface Equivalent:
  3010. // Default:
  3011. //
  3012. [propget, helpstring("Times"), id(DISPID_SRRTimes)]
  3013. HRESULT Times( [out,retval]ISpeechRecoResultTimes** Times );
  3014. // AudioFormat
  3015. // SAPI C++ Only Interface Equivalent:
  3016. // Default:
  3017. //
  3018. [propputref, helpstring("AudioFormat"), id(DISPID_SRRAudioFormat)]
  3019. HRESULT AudioFormat( [in]ISpeechAudioFormat* Format );
  3020. [propget, helpstring("AudioFormat"), id(DISPID_SRRAudioFormat)]
  3021. HRESULT AudioFormat( [out,retval]ISpeechAudioFormat** Format );
  3022. // PhraseInfo
  3023. // SAPI C++ Only Interface Equivalent:
  3024. // Default:
  3025. //
  3026. [propget, helpstring("PhraseInfo"), id(DISPID_SRRPhraseInfo)]
  3027. HRESULT PhraseInfo( [out,retval]ISpeechPhraseInfo** PhraseInfo );
  3028. // Methods
  3029. // Alternates
  3030. // SAPI C++ Only Interface Equivalent:
  3031. //
  3032. [helpstring("Alternates"), id(DISPID_SRRAlternates)]
  3033. HRESULT Alternates( [in] long RequestCount,
  3034. [in, defaultvalue(0)] long StartElement,
  3035. [in, defaultvalue(SPPR_ALL_ELEMENTS)] long Elements,
  3036. [out,retval] ISpeechPhraseAlternates** Alternates );
  3037. // Audio
  3038. // SAPI C++ Only Interface Equivalent:
  3039. //
  3040. [helpstring("Audio"), id(DISPID_SRRAudio)]
  3041. HRESULT Audio( [in, defaultvalue(0)] long StartElement,
  3042. [in, defaultvalue(SPPR_ALL_ELEMENTS)] long Elements,
  3043. [out,retval] ISpeechMemoryStream **Stream );
  3044. // SpeakAudio
  3045. // SAPI C++ Only Interface Equivalent:
  3046. //
  3047. [helpstring("SpeakAudio"), id(DISPID_SRRSpeakAudio)]
  3048. HRESULT SpeakAudio( [in, defaultvalue(0)] long StartElement,
  3049. [in, defaultvalue(SPPR_ALL_ELEMENTS)] long Elements,
  3050. [in, defaultvalue(SPF_DEFAULT)] SpeechVoiceSpeakFlags Flags,
  3051. [out,retval]long* StreamNumber );
  3052. // SaveToMemory
  3053. // SAPI C++ Only Interface Equivalent:
  3054. //
  3055. [helpstring("SaveToMemory"), id(DISPID_SRRSaveToMemory)]
  3056. HRESULT SaveToMemory( [out,retval] VARIANT* ResultBlock );
  3057. // DiscardResultInfo
  3058. // SAPI C++ Only Interface Equivalent:
  3059. //
  3060. [helpstring("DiscardResultInfo"), id(DISPID_SRRDiscardResultInfo)]
  3061. HRESULT DiscardResultInfo( [in]SpeechDiscardType ValueTypes );
  3062. };
  3063. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3064. //
  3065. // ISpeechPhraseInfoBuilder
  3066. // SAPI C++ Only Interface Equivalent:
  3067. // This interface corresponds to the ISpPhraseBuilder
  3068. //
  3069. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3070. typedef [hidden] enum DISPID_SpeechPhraseBuilder
  3071. {
  3072. DISPID_SPPBRestorePhraseFromMemory = 1
  3073. } DISPID_SpeechPhraseBuilder ;
  3074. [
  3075. object,
  3076. uuid(3B151836-DF3A-4E0A-846C-D2ADC9334333),
  3077. dual,
  3078. helpstring("ISpeechPhraseInfoBuilder Interface"),
  3079. pointer_default(unique)
  3080. ]
  3081. interface ISpeechPhraseInfoBuilder : IDispatch
  3082. {
  3083. // Methods
  3084. // RestorePhraseFromMemory
  3085. // SAPI C++ Only Interface Equivalent:
  3086. //
  3087. [helpstring("RestorePhraseFromMemory"), id(DISPID_SPPBRestorePhraseFromMemory)]
  3088. HRESULT RestorePhraseFromMemory([in] VARIANT* PhraseInMemory,
  3089. [out,retval] ISpeechPhraseInfo **PhraseInfo);
  3090. };
  3091. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3092. //
  3093. // ISpeechRecoResultTimes
  3094. // SAPI C++ Only Interface Equivalent:
  3095. // Default Property: N/A
  3096. //
  3097. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3098. typedef [hidden] enum DISPID_SpeechRecoResultTimes
  3099. {
  3100. DISPID_SRRTStreamTime = 1,
  3101. DISPID_SRRTLength,
  3102. DISPID_SRRTTickCount,
  3103. DISPID_SRRTOffsetFromStart
  3104. } DISPID_SpeechRecoResultTimes;
  3105. [
  3106. object,
  3107. uuid(62B3B8FB-F6E7-41be-BDCB-056B1C29EFC0),
  3108. dual,
  3109. helpstring("ISpeechRecoResultTimes Interface"),
  3110. pointer_default(unique)
  3111. ]
  3112. interface ISpeechRecoResultTimes : IDispatch
  3113. {
  3114. // Properties
  3115. // StreamTime
  3116. // SAPI C++ Only Interface Equivalent:
  3117. // Default:
  3118. //
  3119. [propget, helpstring("StreamTime"), id(DISPID_SRRTStreamTime)]
  3120. HRESULT StreamTime([out,retval]VARIANT* Time );
  3121. // Length
  3122. // SAPI C++ Only Interface Equivalent:
  3123. // Default:
  3124. //
  3125. [propget, helpstring("Length"), id(DISPID_SRRTLength)]
  3126. HRESULT Length([out,retval]VARIANT* Length );
  3127. // TickCount
  3128. // SAPI C++ Only Interface Equivalent:
  3129. // Default:
  3130. //
  3131. [propget, helpstring("TickCount"), id(DISPID_SRRTTickCount)]
  3132. HRESULT TickCount([out,retval]long* TickCount );
  3133. // Start
  3134. // SAPI C++ Only Interface Equivalent:
  3135. // Default:
  3136. //
  3137. [propget, helpstring("Start"), id(DISPID_SRRTOffsetFromStart)]
  3138. HRESULT OffsetFromStart([out,retval]VARIANT* OffsetFromStart );
  3139. };
  3140. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3141. //
  3142. // ISpeechPhraseAlternate
  3143. // SAPI C++ Only Interface Equivalent:
  3144. // Default Property: N/A
  3145. //
  3146. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3147. typedef [hidden] enum DISPID_SpeechPhraseAlternate
  3148. {
  3149. DISPID_SPARecoResult = 1,
  3150. DISPID_SPAStartElementInResult,
  3151. DISPID_SPANumberOfElementsInResult,
  3152. DISPID_SPAPhraseInfo,
  3153. DISPID_SPACommit
  3154. } DISPID_SpeechPhraseAlternate;
  3155. [
  3156. object,
  3157. uuid(27864A2A-2B9F-4cb8-92D3-0D2722FD1E73),
  3158. dual,
  3159. helpstring("ISpeechPhraseAlternate Interface"),
  3160. pointer_default(unique)
  3161. ]
  3162. interface ISpeechPhraseAlternate : IDispatch
  3163. {
  3164. // Properties
  3165. // RecoResult
  3166. // SAPI C++ Only Interface Equivalent:
  3167. // Default:
  3168. //
  3169. [propget, helpstring("RecoResult"), id(DISPID_SPARecoResult)]
  3170. HRESULT RecoResult( [out,retval]ISpeechRecoResult** RecoResult ); // Was ISpPhrase, is this right?
  3171. // StartElementInResult
  3172. // SAPI C++ Only Interface Equivalent:
  3173. // Default:
  3174. //
  3175. [propget, helpstring("StartElementInResult"), id(DISPID_SPAStartElementInResult)]
  3176. HRESULT StartElementInResult( [out,retval]long* StartElement );
  3177. // NumberOfElementsInResult
  3178. // SAPI C++ Only Interface Equivalent:
  3179. // Default:
  3180. //
  3181. [propget, helpstring("NumberOfElementsInResult"), id(DISPID_SPANumberOfElementsInResult)]
  3182. HRESULT NumberOfElementsInResult( [out,retval]long* NumberOfElements );
  3183. // PhraseInfo
  3184. // SAPI C++ Only Interface Equivalent:
  3185. // Default:
  3186. //
  3187. [propget, helpstring("Phrase"), id(DISPID_SPAPhraseInfo)]
  3188. HRESULT PhraseInfo( [out,retval]ISpeechPhraseInfo** PhraseInfo );
  3189. // Methods
  3190. // Commit
  3191. // SAPI C++ Only Interface Equivalent:
  3192. //
  3193. [helpstring("Commit"), id(DISPID_SPACommit)]
  3194. HRESULT Commit( void );
  3195. };
  3196. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3197. //
  3198. // ISpeechPhraseAlternates
  3199. // SAPI C++ Only Interface Equivalent:
  3200. // Default Property: N/A
  3201. //
  3202. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3203. typedef [hidden] enum DISPID_SpeechPhraseAlternates
  3204. {
  3205. DISPID_SPAsCount = 1,
  3206. DISPID_SPAsItem = DISPID_VALUE,
  3207. DISPID_SPAs_NewEnum = DISPID_NEWENUM
  3208. } DISPID_SpeechPhraseAlternates;
  3209. [
  3210. object,
  3211. uuid(B238B6D5-F276-4c3d-A6C1-2974801C3CC2),
  3212. dual,
  3213. helpstring("ISpeechPhraseAlternates Interface"),
  3214. pointer_default(unique)
  3215. ]
  3216. interface ISpeechPhraseAlternates : IDispatch
  3217. {
  3218. // Properties
  3219. // Count
  3220. // SAPI C++ Only Interface Equivalent:
  3221. // Default:
  3222. //
  3223. [propget, helpstring("Count"), id(DISPID_SPAsCount)]
  3224. HRESULT Count([out, retval] long* Count);
  3225. // Methods
  3226. // Item
  3227. // SAPI C++ Only Interface Equivalent:
  3228. //
  3229. [helpstring("Item"), id(DISPID_SPAsItem)]
  3230. HRESULT Item([in] long Index, [out, retval]ISpeechPhraseAlternate** PhraseAlternate );
  3231. // _NewEnum
  3232. // SAPI C++ Only Interface Equivalent:
  3233. //
  3234. [propget, helpstring("Enumerates the alternates"), restricted, id(DISPID_SPAs_NewEnum)]
  3235. HRESULT _NewEnum([out, retval] IUnknown** EnumVARIANT);
  3236. };
  3237. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3238. //
  3239. // ISpeechPhraseInfo
  3240. // SAPI C++ Only Interface Equivalent:
  3241. // Default Property: N/A
  3242. //
  3243. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3244. typedef [hidden] enum DISPID_SpeechPhraseInfo
  3245. {
  3246. DISPID_SPILanguageId = 1,
  3247. DISPID_SPIGrammarId,
  3248. DISPID_SPIStartTime,
  3249. DISPID_SPIAudioStreamPosition,
  3250. DISPID_SPIAudioSizeBytes,
  3251. DISPID_SPIRetainedSizeBytes,
  3252. DISPID_SPIAudioSizeTime,
  3253. DISPID_SPIRule,
  3254. DISPID_SPIProperties,
  3255. DISPID_SPIElements,
  3256. DISPID_SPIReplacements,
  3257. DISPID_SPIEngineId,
  3258. DISPID_SPIEnginePrivateData,
  3259. DISPID_SPISaveToMemory,
  3260. DISPID_SPIGetText,
  3261. DISPID_SPIGetDisplayAttributes
  3262. } DISPID_SpeechPhraseInfo;
  3263. [
  3264. object,
  3265. uuid(961559CF-4E67-4662-8BF0-D93F1FCD61B3),
  3266. dual,
  3267. helpstring("ISpeechPhraseInfo Interface"),
  3268. pointer_default(unique)
  3269. ]
  3270. interface ISpeechPhraseInfo : IDispatch
  3271. {
  3272. // Properties
  3273. // LanguageId
  3274. // SAPI C++ Only Interface Equivalent:
  3275. // Default:
  3276. //
  3277. [propget, helpstring("LanguageId"), id(DISPID_SPILanguageId)]
  3278. HRESULT LanguageId( [out, retval]long* LanguageId );
  3279. // GrammarId
  3280. // SAPI C++ Only Interface Equivalent:
  3281. // Default:
  3282. //
  3283. [propget, helpstring("GrammarId"), id(DISPID_SPIGrammarId)]
  3284. HRESULT GrammarId( [out, retval]VARIANT* GrammarId );
  3285. // StartTime
  3286. // SAPI C++ Only Interface Equivalent:
  3287. // Default:
  3288. //
  3289. [propget, helpstring("StartTime"), id(DISPID_SPIStartTime)]
  3290. HRESULT StartTime( [out, retval]VARIANT* StartTime );
  3291. // AudioStreamPosition
  3292. // SAPI C++ Only Interface Equivalent:
  3293. // Default:
  3294. //
  3295. [propget, helpstring("AudioStreamPosition"), id(DISPID_SPIAudioStreamPosition)]
  3296. HRESULT AudioStreamPosition( [out, retval]VARIANT* AudioStreamPosition );
  3297. // AudioSizeBytes
  3298. // SAPI C++ Only Interface Equivalent:
  3299. // Default:
  3300. //
  3301. [propget, helpstring("AudioSizeBytes"), id(DISPID_SPIAudioSizeBytes)]
  3302. HRESULT AudioSizeBytes( [out, retval]long* pAudioSizeBytes );
  3303. // RetainedSizeBytes
  3304. // SAPI C++ Only Interface Equivalent:
  3305. // Default:
  3306. //
  3307. [propget, helpstring("RetainedSizeBytes"), id(DISPID_SPIRetainedSizeBytes)]
  3308. HRESULT RetainedSizeBytes( [out, retval]long* RetainedSizeBytes );
  3309. // AudioSizeTime
  3310. // SAPI C++ Only Interface Equivalent:
  3311. // Default:
  3312. //
  3313. [propget, helpstring("AudioSizeTime"), id(DISPID_SPIAudioSizeTime)]
  3314. HRESULT AudioSizeTime( [out, retval]long* AudioSizeTime );
  3315. // Rule
  3316. // SAPI C++ Only Interface Equivalent:
  3317. // Default:
  3318. //
  3319. [propget, helpstring("Rule"), id(DISPID_SPIRule)]
  3320. HRESULT Rule( [out, retval]ISpeechPhraseRule** Rule );
  3321. // Properties
  3322. // SAPI C++ Only Interface Equivalent:
  3323. // Default:
  3324. //
  3325. [propget, helpstring("Properties"), id(DISPID_SPIProperties)]
  3326. HRESULT Properties( [out, retval]ISpeechPhraseProperties** Properties );
  3327. // Elements
  3328. // SAPI C++ Only Interface Equivalent:
  3329. // Default:
  3330. //
  3331. [propget, helpstring("Elements"), id(DISPID_SPIElements)]
  3332. HRESULT Elements( [out, retval]ISpeechPhraseElements** Elements );
  3333. // Replacements
  3334. // SAPI C++ Only Interface Equivalent:
  3335. // Default:
  3336. //
  3337. [propget, helpstring("Replacements"), id(DISPID_SPIReplacements)]
  3338. HRESULT Replacements( [out, retval]ISpeechPhraseReplacements** Replacements );
  3339. // EngineId
  3340. // SAPI C++ Only Interface Equivalent:
  3341. // Default:
  3342. //
  3343. [propget, helpstring("EngineId"), id(DISPID_SPIEngineId)]
  3344. HRESULT EngineId( [out, retval]BSTR* EngineIdGuid );
  3345. // EnginePrivateData
  3346. // SAPI C++ Only Interface Equivalent:
  3347. // Default:
  3348. //
  3349. [propget, helpstring("EnginePrivateData"), id(DISPID_SPIEnginePrivateData)]
  3350. HRESULT EnginePrivateData( [out, retval]VARIANT *PrivateData );
  3351. // Methods
  3352. // SaveToMemory
  3353. // SAPI C++ Only Interface Equivalent:
  3354. //
  3355. [helpstring("SaveToMemory"), id(DISPID_SPISaveToMemory)]
  3356. HRESULT SaveToMemory( [out,retval]VARIANT* PhraseBlock );
  3357. // GetText
  3358. // SAPI C++ Only Interface Equivalent:
  3359. //
  3360. [helpstring("GetText"), id(DISPID_SPIGetText)]
  3361. HRESULT GetText( [in, defaultvalue(0)] long StartElement,
  3362. [in, defaultvalue(SPPR_ALL_ELEMENTS)] long Elements,
  3363. [in, defaultvalue(-1)] VARIANT_BOOL UseReplacements,
  3364. [out,retval]BSTR* Text );
  3365. // DisplayAttributes
  3366. // SAPI C++ Only Interface Equivalent:
  3367. //
  3368. [helpstring("DisplayAttributes"), id(DISPID_SPIGetDisplayAttributes)]
  3369. HRESULT GetDisplayAttributes( [in, defaultvalue(0)] long StartElement,
  3370. [in, defaultvalue(SPPR_ALL_ELEMENTS)] long Elements,
  3371. [in, defaultvalue(-1)] VARIANT_BOOL UseReplacements,
  3372. [out,retval]SpeechDisplayAttributes* DisplayAttributes );
  3373. };
  3374. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3375. //
  3376. // ISpeechPhraseElement
  3377. // SAPI C++ Only Interface Equivalent:
  3378. // Default Property: N/A
  3379. //
  3380. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3381. typedef [hidden] enum DISPID_SpeechPhraseElement
  3382. {
  3383. DISPID_SPEAudioTimeOffset = 1,
  3384. DISPID_SPEAudioSizeTime,
  3385. DISPID_SPEAudioStreamOffset,
  3386. DISPID_SPEAudioSizeBytes,
  3387. DISPID_SPERetainedStreamOffset,
  3388. DISPID_SPERetainedSizeBytes,
  3389. DISPID_SPEDisplayText,
  3390. DISPID_SPELexicalForm,
  3391. DISPID_SPEPronunciation,
  3392. DISPID_SPEDisplayAttributes,
  3393. DISPID_SPERequiredConfidence,
  3394. DISPID_SPEActualConfidence,
  3395. DISPID_SPEEngineConfidence
  3396. } DISPID_SpeechPhraseElement;
  3397. /////////////////////////////////////////////////
  3398. //
  3399. // SpeechEngineConfidence Enum
  3400. // SAPI C++ Only Interface Equivalent:
  3401. //
  3402. /////////////////////////////////////////////////
  3403. typedef enum SpeechEngineConfidence
  3404. {
  3405. SECLowConfidence = -1,
  3406. SECNormalConfidence = 0,
  3407. SECHighConfidence = 1
  3408. } SpeechEngineConfidence;
  3409. [
  3410. object,
  3411. uuid(E6176F96-E373-4801-B223-3B62C068C0B4),
  3412. dual,
  3413. helpstring("ISpeechPhraseElement Interface"),
  3414. pointer_default(unique)
  3415. ]
  3416. interface ISpeechPhraseElement : IDispatch
  3417. {
  3418. // Properties
  3419. // AudioTimeOffset
  3420. // SAPI C++ Only Interface Equivalent:
  3421. // Default:
  3422. //
  3423. [propget, helpstring("AudioTimeOffset"), id(DISPID_SPEAudioTimeOffset)]
  3424. HRESULT AudioTimeOffset( [out, retval]long* AudioTimeOffset );
  3425. // AudioSizeTime
  3426. // SAPI C++ Only Interface Equivalent:
  3427. // Default:
  3428. //
  3429. [propget, helpstring("AudioSizeTime"), id(DISPID_SPEAudioSizeTime)]
  3430. HRESULT AudioSizeTime( [out, retval]long* AudioSizeTime );
  3431. // AudioStreamOffset
  3432. // SAPI C++ Only Interface Equivalent:
  3433. // Default:
  3434. //
  3435. [propget, helpstring("AudioStreamOffset"), id(DISPID_SPEAudioStreamOffset)]
  3436. HRESULT AudioStreamOffset( [out, retval]long* AudioStreamOffset );
  3437. // AudioSizeBytes
  3438. // SAPI C++ Only Interface Equivalent:
  3439. // Default:
  3440. //
  3441. [propget, helpstring("AudioSizeBytes"), id(DISPID_SPEAudioSizeBytes)]
  3442. HRESULT AudioSizeBytes( [out, retval]long* AudioSizeBytes );
  3443. // RetainedStreamOffset
  3444. // SAPI C++ Only Interface Equivalent:
  3445. // Default:
  3446. //
  3447. [propget, helpstring("RetainedStreamOffset"), id(DISPID_SPERetainedStreamOffset)]
  3448. HRESULT RetainedStreamOffset( [out, retval]long* RetainedStreamOffset );
  3449. // RetainedSizeBytes
  3450. // SAPI C++ Only Interface Equivalent:
  3451. // Default:
  3452. //
  3453. [propget, helpstring("RetainedSizeBytes"), id(DISPID_SPERetainedSizeBytes)]
  3454. HRESULT RetainedSizeBytes( [out, retval]long* RetainedSizeBytes );
  3455. // DisplayText
  3456. // SAPI C++ Only Interface Equivalent:
  3457. // Default:
  3458. //
  3459. [propget, helpstring("DisplayText"), id(DISPID_SPEDisplayText)]
  3460. HRESULT DisplayText( [out, retval]BSTR* DisplayText );
  3461. // LexicalForm
  3462. // SAPI C++ Only Interface Equivalent:
  3463. // Default:
  3464. //
  3465. [propget, helpstring("LexicalForm"), id(DISPID_SPELexicalForm)]
  3466. HRESULT LexicalForm( [out, retval]BSTR* LexicalForm );
  3467. // Pronunciation
  3468. // SAPI C++ Only Interface Equivalent:
  3469. // Default:
  3470. //
  3471. [propget, helpstring("Pronunciation"), id(DISPID_SPEPronunciation)]
  3472. HRESULT Pronunciation( [out, retval]VARIANT* Pronunciation );
  3473. // DisplayAttributes
  3474. // SAPI C++ Only Interface Equivalent:
  3475. // Default:
  3476. //
  3477. [propget, helpstring("DisplayAttributes"), id(DISPID_SPEDisplayAttributes)]
  3478. HRESULT DisplayAttributes( [out, retval]SpeechDisplayAttributes* DisplayAttributes );
  3479. // RequiredConfidence
  3480. // SAPI C++ Only Interface Equivalent:
  3481. // Default:
  3482. //
  3483. [propget, helpstring("RequiredConfidence"), id(DISPID_SPERequiredConfidence)]
  3484. HRESULT RequiredConfidence( [out, retval]SpeechEngineConfidence* RequiredConfidence );
  3485. // ActualConfidence
  3486. // SAPI C++ Only Interface Equivalent:
  3487. // Default:
  3488. //
  3489. [propget, helpstring("ActualConfidence"), id(DISPID_SPEActualConfidence)]
  3490. HRESULT ActualConfidence( [out, retval]SpeechEngineConfidence* ActualConfidence );
  3491. // EngineConfidence
  3492. // SAPI C++ Only Interface Equivalent:
  3493. // Default:
  3494. //
  3495. [propget, helpstring("EngineConfidence"), id(DISPID_SPEEngineConfidence)]
  3496. HRESULT EngineConfidence( [out, retval]float* EngineConfidence );
  3497. };
  3498. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3499. //
  3500. // ISpeechPhraseElements
  3501. // SAPI C++ Only Interface Equivalent:
  3502. // Default Property: N/A
  3503. //
  3504. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3505. typedef [hidden] enum DISPID_SpeechPhraseElements
  3506. {
  3507. DISPID_SPEsCount = 1,
  3508. DISPID_SPEsItem = DISPID_VALUE,
  3509. DISPID_SPEs_NewEnum = DISPID_NEWENUM
  3510. } DISPID_SpeechPhraseElements;
  3511. [
  3512. object,
  3513. uuid(0626B328-3478-467d-A0B3-D0853B93DDA3),
  3514. dual,
  3515. helpstring("ISpeechPhraseElements Interface"),
  3516. pointer_default(unique)
  3517. ]
  3518. interface ISpeechPhraseElements : IDispatch
  3519. {
  3520. // Properties
  3521. // Count
  3522. // SAPI C++ Only Interface Equivalent:
  3523. // Default:
  3524. //
  3525. [propget, helpstring("Count"), id(DISPID_SPEsCount)]
  3526. HRESULT Count([out, retval] long* Count);
  3527. // Methods
  3528. // Item
  3529. // SAPI C++ Only Interface Equivalent:
  3530. //
  3531. [helpstring("Item"), id(DISPID_SPEsItem)]
  3532. HRESULT Item([in] long Index, [out, retval]ISpeechPhraseElement** Element );
  3533. // _NewEnum
  3534. // SAPI C++ Only Interface Equivalent:
  3535. //
  3536. [propget, helpstring("Enumerates the tokens"), restricted, id(DISPID_SPEs_NewEnum)]
  3537. HRESULT _NewEnum([out, retval] IUnknown** EnumVARIANT);
  3538. };
  3539. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3540. //
  3541. // ISpeechPhraseReplacement
  3542. // SAPI C++ Only Interface Equivalent:
  3543. // Default Property: N/A
  3544. //
  3545. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3546. typedef [hidden] enum DISPID_SpeechPhraseReplacement
  3547. {
  3548. DISPID_SPRDisplayAttributes = 1,
  3549. DISPID_SPRText,
  3550. DISPID_SPRFirstElement,
  3551. DISPID_SPRNumberOfElements
  3552. } DISPID_SpeechPhraseReplacement;
  3553. [
  3554. object,
  3555. uuid(2890A410-53A7-4fb5-94EC-06D4998E3D02),
  3556. dual,
  3557. helpstring("ISpeechPhraseReplacement Interface"),
  3558. pointer_default(unique)
  3559. ]
  3560. interface ISpeechPhraseReplacement : IDispatch
  3561. {
  3562. // Proerties
  3563. // DisplayAttributes
  3564. // SAPI C++ Only Interface Equivalent:
  3565. // Default:
  3566. //
  3567. [propget, helpstring("DisplayAttributes"), id(DISPID_SPRDisplayAttributes)]
  3568. HRESULT DisplayAttributes( [out,retval]SpeechDisplayAttributes* DisplayAttributes );
  3569. // Text
  3570. // SAPI C++ Only Interface Equivalent:
  3571. // Default:
  3572. //
  3573. [propget, helpstring("Text"), id(DISPID_SPRText)]
  3574. HRESULT Text( [out, retval]BSTR* Text );
  3575. // FirstElement
  3576. // SAPI C++ Only Interface Equivalent:
  3577. // Default:
  3578. //
  3579. [propget, helpstring("FirstElement"), id(DISPID_SPRFirstElement)]
  3580. HRESULT FirstElement( [out, retval]long* FirstElement );
  3581. // NumberOfElements
  3582. // SAPI C++ Only Interface Equivalent:
  3583. // Default:
  3584. //
  3585. [propget, helpstring("NumElements"), id(DISPID_SPRNumberOfElements)]
  3586. HRESULT NumberOfElements( [out, retval]long* NumberOfElements );
  3587. };
  3588. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3589. //
  3590. // ISpeechPhraseReplacements
  3591. // SAPI C++ Only Interface Equivalent:
  3592. // Default Property: N/A
  3593. //
  3594. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3595. typedef [hidden] enum DISPID_SpeechPhraseReplacements
  3596. {
  3597. DISPID_SPRsCount = 1,
  3598. DISPID_SPRsItem = DISPID_VALUE,
  3599. DISPID_SPRs_NewEnum = DISPID_NEWENUM
  3600. } DISPID_SpeechPhraseReplacements;
  3601. [
  3602. object,
  3603. uuid(38BC662F-2257-4525-959E-2069D2596C05),
  3604. dual,
  3605. helpstring("ISpeechPhraseReplacements Interface"),
  3606. pointer_default(unique)
  3607. ]
  3608. interface ISpeechPhraseReplacements : IDispatch
  3609. {
  3610. // Properties
  3611. // Count
  3612. // SAPI C++ Only Interface Equivalent:
  3613. // Default:
  3614. //
  3615. [propget, helpstring("Count"), id(DISPID_SPRsCount)]
  3616. HRESULT Count([out, retval] long* Count);
  3617. // Methods
  3618. // Item
  3619. // SAPI C++ Only Interface Equivalent:
  3620. //
  3621. [helpstring("Item"), id(DISPID_SPRsItem)]
  3622. HRESULT Item([in] long Index, [out, retval]ISpeechPhraseReplacement** Reps );
  3623. // _NewEnum
  3624. // SAPI C++ Only Interface Equivalent:
  3625. //
  3626. [propget, helpstring("Enumerates the tokens"), restricted, id(DISPID_SPRs_NewEnum)]
  3627. HRESULT _NewEnum([out, retval] IUnknown** EnumVARIANT);
  3628. };
  3629. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3630. //
  3631. // ISpeechPhraseProperty
  3632. // SAPI C++ Only Interface Equivalent:
  3633. // Default Property: N/A
  3634. //
  3635. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3636. typedef [hidden] enum DISPID_SpeechPhraseProperty
  3637. {
  3638. DISPID_SPPName = 1,
  3639. DISPID_SPPId,
  3640. DISPID_SPPValue,
  3641. DISPID_SPPFirstElement,
  3642. DISPID_SPPNumberOfElements,
  3643. DISPID_SPPEngineConfidence,
  3644. DISPID_SPPConfidence,
  3645. DISPID_SPPParent,
  3646. DISPID_SPPChildren
  3647. } DISPID_SpeechPhraseProperty;
  3648. [
  3649. object,
  3650. uuid(CE563D48-961E-4732-A2E1-378A42B430BE),
  3651. dual,
  3652. helpstring("ISpeechPhraseProperty Interface"),
  3653. pointer_default(unique)
  3654. ]
  3655. interface ISpeechPhraseProperty : IDispatch
  3656. {
  3657. // Properties
  3658. // Name
  3659. // SAPI C++ Only Interface Equivalent:
  3660. // Default:
  3661. //
  3662. [propget, helpstring("Name"), id(DISPID_SPPName)]
  3663. HRESULT Name( [out, retval]BSTR* Name );
  3664. // Id
  3665. // SAPI C++ Only Interface Equivalent:
  3666. // Default:
  3667. //
  3668. [propget, helpstring("Id"), id(DISPID_SPPId)]
  3669. HRESULT Id( [out, retval]long* Id );
  3670. // Value
  3671. // SAPI C++ Only Interface Equivalent:
  3672. // Default:
  3673. //
  3674. [propget, helpstring("Value"), id(DISPID_SPPValue)]
  3675. HRESULT Value( [out, retval]VARIANT* Value );
  3676. // FirstElement
  3677. // SAPI C++ Only Interface Equivalent:
  3678. // Default:
  3679. //
  3680. [propget, helpstring("FirstElement"), id(DISPID_SPPFirstElement)]
  3681. HRESULT FirstElement( [out, retval]long* FirstElement );
  3682. // NumberOfElements
  3683. // SAPI C++ Only Interface Equivalent:
  3684. // Default:
  3685. //
  3686. [propget, helpstring("NumberOfElements"), id(DISPID_SPPNumberOfElements)]
  3687. HRESULT NumberOfElements( [out, retval]long* NumberOfElements );
  3688. // EngineConfidence
  3689. // SAPI C++ Only Interface Equivalent:
  3690. // Default:
  3691. //
  3692. [propget, helpstring("EngineConfidence"), id(DISPID_SPPEngineConfidence)]
  3693. HRESULT EngineConfidence( [out, retval]float* Confidence );
  3694. // Confidence
  3695. // SAPI C++ Only Interface Equivalent:
  3696. // Default:
  3697. //
  3698. [propget, helpstring("Confidence"), id(DISPID_SPPConfidence)]
  3699. HRESULT Confidence( [out, retval]SpeechEngineConfidence* Confidence );
  3700. // Parent
  3701. // SAPI C++ Only Interface Equivalent:
  3702. // Default:
  3703. //
  3704. [propget, helpstring("Parent"), id(DISPID_SPPParent)]
  3705. HRESULT Parent( [out, retval]ISpeechPhraseProperty** ParentProperty );
  3706. // Children
  3707. // SAPI C++ Only Interface Equivalent:
  3708. // Default:
  3709. //
  3710. [propget, helpstring("Children"), id(DISPID_SPPChildren)]
  3711. HRESULT Children( [out, retval]ISpeechPhraseProperties** Children );
  3712. };
  3713. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3714. //
  3715. // ISpeechPhraseProperties
  3716. // SAPI C++ Only Interface Equivalent:
  3717. // Default Property: N/A
  3718. //
  3719. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3720. typedef [hidden] enum DISPID_SpeechPhraseProperties
  3721. {
  3722. DISPID_SPPsCount = 1,
  3723. DISPID_SPPsItem = DISPID_VALUE,
  3724. DISPID_SPPs_NewEnum = DISPID_NEWENUM
  3725. } DISPID_SpeechPhraseProperties;
  3726. [
  3727. object,
  3728. uuid(08166B47-102E-4b23-A599-BDB98DBFD1F4),
  3729. dual,
  3730. helpstring("ISpeechPhraseProperties Interface"),
  3731. pointer_default(unique)
  3732. ]
  3733. interface ISpeechPhraseProperties : IDispatch
  3734. {
  3735. // Properties
  3736. // Count
  3737. // SAPI C++ Only Interface Equivalent:
  3738. // Default:
  3739. //
  3740. [propget, helpstring("Count"), id(DISPID_SPPsCount)]
  3741. HRESULT Count([out, retval] long* Count);
  3742. // Methods
  3743. // Item
  3744. // SAPI C++ Only Interface Equivalent:
  3745. //
  3746. [helpstring("Item"), id(DISPID_SPPsItem)]
  3747. HRESULT Item([in] long Index, [out, retval]ISpeechPhraseProperty** Property );
  3748. // _NewEnum
  3749. // SAPI C++ Only Interface Equivalent:
  3750. //
  3751. [propget, helpstring("Enumerates the alternates"), restricted, id(DISPID_SPPs_NewEnum)]
  3752. HRESULT _NewEnum([out, retval] IUnknown** EnumVARIANT);
  3753. };
  3754. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3755. //
  3756. // ISpeechPhraseRule
  3757. // SAPI C++ Only Interface Equivalent:
  3758. // Default Property: N/A
  3759. //
  3760. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3761. typedef [hidden] enum DISPID_SpeechPhraseRule
  3762. {
  3763. DISPID_SPRuleName = 1,
  3764. DISPID_SPRuleId,
  3765. DISPID_SPRuleFirstElement,
  3766. DISPID_SPRuleNumberOfElements,
  3767. DISPID_SPRuleParent,
  3768. DISPID_SPRuleChildren,
  3769. DISPID_SPRuleConfidence,
  3770. DISPID_SPRuleEngineConfidence
  3771. } DISPID_SpeechPhraseRule;
  3772. [
  3773. object,
  3774. uuid(A7BFE112-A4A0-48d9-B602-C313843F6964),
  3775. dual,
  3776. helpstring("ISpeechPhraseRule Interface"),
  3777. pointer_default(unique)
  3778. ]
  3779. interface ISpeechPhraseRule : IDispatch
  3780. {
  3781. // Properties
  3782. // Name
  3783. // SAPI C++ Only Interface Equivalent:
  3784. // Default:
  3785. //
  3786. [propget, helpstring("Name"), id(DISPID_SPRuleName)]
  3787. HRESULT Name( [out, retval]BSTR* Name );
  3788. // Id
  3789. // SAPI C++ Only Interface Equivalent:
  3790. // Default:
  3791. //
  3792. [propget, helpstring("Id"), id(DISPID_SPRuleId)]
  3793. HRESULT Id( [out, retval]long* Id );
  3794. // FirstElement
  3795. // SAPI C++ Only Interface Equivalent:
  3796. // Default:
  3797. //
  3798. [propget, helpstring("FirstElement"), id(DISPID_SPRuleFirstElement)]
  3799. HRESULT FirstElement( [out, retval]long* FirstElement );
  3800. // NumElements
  3801. // SAPI C++ Only Interface Equivalent:
  3802. // Default:
  3803. //
  3804. [propget, helpstring("NumElements"), id(DISPID_SPRuleNumberOfElements)]
  3805. HRESULT NumberOfElements( [out, retval]long* NumberOfElements );
  3806. // Parent
  3807. // SAPI C++ Only Interface Equivalent:
  3808. // Default:
  3809. //
  3810. [propget, helpstring("Parent"), id(DISPID_SPRuleParent)]
  3811. HRESULT Parent( [out, retval]ISpeechPhraseRule** Parent );
  3812. // Children
  3813. // SAPI C++ Only Interface Equivalent:
  3814. // Default:
  3815. //
  3816. [propget, helpstring("Children"), id(DISPID_SPRuleChildren)]
  3817. HRESULT Children( [out, retval]ISpeechPhraseRules** Children );
  3818. // Confidence
  3819. // SAPI C++ Only Interface Equivalent:
  3820. // Default:
  3821. //
  3822. [propget, helpstring("Confidence"), id(DISPID_SPRuleConfidence)]
  3823. HRESULT Confidence( [out, retval]SpeechEngineConfidence* ActualConfidence );
  3824. // EngineConfidence
  3825. // SAPI C++ Only Interface Equivalent:
  3826. // Default:
  3827. //
  3828. [propget, helpstring("EngineConfidence"), id(DISPID_SPRuleEngineConfidence)]
  3829. HRESULT EngineConfidence( [out, retval]float* EngineConfidence );
  3830. };
  3831. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3832. //
  3833. // ISpeechPhraseRules
  3834. // SAPI C++ Only Interface Equivalent:
  3835. // Default Property: N/A
  3836. //
  3837. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3838. typedef [hidden] enum DISPID_SpeechPhraseRules
  3839. {
  3840. DISPID_SPRulesCount = 1,
  3841. DISPID_SPRulesItem = DISPID_VALUE,
  3842. DISPID_SPRules_NewEnum = DISPID_NEWENUM
  3843. } DISPID_SpeechPhraseRules;
  3844. [
  3845. object,
  3846. uuid(9047D593-01DD-4b72-81A3-E4A0CA69F407),
  3847. dual,
  3848. helpstring("ISpeechPhraseRules Interface"),
  3849. pointer_default(unique)
  3850. ]
  3851. interface ISpeechPhraseRules : IDispatch
  3852. {
  3853. // Properties
  3854. // Count
  3855. // SAPI C++ Only Interface Equivalent:
  3856. // Default:
  3857. //
  3858. [propget, helpstring("Count"), id(DISPID_SPRulesCount)]
  3859. HRESULT Count([out, retval] long* Count);
  3860. // Methods
  3861. // Item
  3862. // SAPI C++ Only Interface Equivalent:
  3863. //
  3864. [helpstring("Item"), id(DISPID_SPRulesItem)]
  3865. HRESULT Item([in] long Index, [out, retval]ISpeechPhraseRule** Rule );
  3866. // _NewEnum
  3867. // SAPI C++ Only Interface Equivalent:
  3868. //
  3869. [propget, helpstring("Enumerates the Rules"), restricted, id(DISPID_SPRules_NewEnum)]
  3870. HRESULT _NewEnum([out, retval] IUnknown** EnumVARIANT);
  3871. };
  3872. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3873. //
  3874. // ISpeechLexicon
  3875. // SAPI C++ Only Interface Equivalent:
  3876. // Default Property: N/A
  3877. //
  3878. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3879. typedef [hidden] enum DISPID_SpeechLexicon
  3880. {
  3881. DISPID_SLGenerationId = 1,
  3882. DISPID_SLGetWords,
  3883. DISPID_SLAddPronunciation,
  3884. DISPID_SLAddPronunciationByPhoneIds,
  3885. DISPID_SLRemovePronunciation,
  3886. DISPID_SLRemovePronunciationByPhoneIds,
  3887. DISPID_SLGetPronunciations,
  3888. DISPID_SLGetGenerationChange
  3889. } DISPID_SpeechLexicon;
  3890. /////////////////////////////////////////////////
  3891. //
  3892. // SpeechLexiconType Enum
  3893. // SAPI C++ Only Interface Equivalent:
  3894. //
  3895. /////////////////////////////////////////////////
  3896. typedef enum SpeechLexiconType {
  3897. SLTUser = eLEXTYPE_USER,
  3898. SLTApp = eLEXTYPE_APP
  3899. } SpeechLexiconType;
  3900. /////////////////////////////////////////////////
  3901. //
  3902. // SpeechPartOfSpeech Enum
  3903. // SAPI C++ Only Interface Equivalent:
  3904. //
  3905. /////////////////////////////////////////////////
  3906. typedef enum SpeechPartOfSpeech {
  3907. // ?? NotOverriden - what does this do
  3908. SPSNotOverriden = SPPS_NotOverriden,
  3909. SPSUnknown = SPPS_Unknown,
  3910. SPSNoun = SPPS_Noun,
  3911. SPSVerb = SPPS_Verb,
  3912. SPSModifier = SPPS_Modifier,
  3913. SPSFunction = SPPS_Function,
  3914. SPSInterjection = SPPS_Interjection
  3915. } SpeechPartOfSpeech;
  3916. [
  3917. object,
  3918. uuid(3DA7627A-C7AE-4b23-8708-638C50362C25),
  3919. dual,
  3920. helpstring("ISpeechLexicon Interface"),
  3921. pointer_default(unique)
  3922. ]
  3923. interface ISpeechLexicon : IDispatch
  3924. {
  3925. // Properties
  3926. // GenerationId
  3927. // SAPI C++ Only Interface Equivalent:
  3928. //
  3929. //
  3930. [propget, helpstring("GenerationId"), id(DISPID_SLGenerationId), hidden]
  3931. HRESULT GenerationId([out,retval]long* GenerationId );
  3932. // Methods
  3933. // GetWords
  3934. // SAPI C++ Only Interface Equivalent:
  3935. //
  3936. [helpstring("GetWords"), id(DISPID_SLGetWords)]
  3937. HRESULT GetWords([in, defaultvalue(eLEXTYPE_USER | eLEXTYPE_APP)]SpeechLexiconType Flags,
  3938. [out, defaultvalue(NULL)]long* GenerationID,
  3939. [out,retval]ISpeechLexiconWords** Words );
  3940. // AddPronunciation
  3941. // SAPI C++ Only Interface Equivalent:
  3942. //
  3943. [helpstring("AddPronunciation"), id(DISPID_SLAddPronunciation)]
  3944. HRESULT AddPronunciation([in]BSTR bstrWord,
  3945. [in]SpeechLanguageId LangId,
  3946. [in, defaultvalue(SPSUnknown)]SpeechPartOfSpeech PartOfSpeech,
  3947. [in, defaultvalue("")]BSTR bstrPronunciation);
  3948. // AddPronunciationByPhoneIds
  3949. // SAPI C++ Only Interface Equivalent:
  3950. //
  3951. [helpstring("AddPronunciationByPhoneIds"), hidden, id(DISPID_SLAddPronunciationByPhoneIds)]
  3952. HRESULT AddPronunciationByPhoneIds([in]BSTR bstrWord,
  3953. [in]SpeechLanguageId LangId,
  3954. [in, defaultvalue(SPSUnknown)]SpeechPartOfSpeech PartOfSpeech,
  3955. [in, defaultvalue(NULL)]VARIANT* PhoneIds);
  3956. // RemovePronunciation
  3957. // SAPI C++ Only Interface Equivalent:
  3958. //
  3959. [helpstring("RemovePronunciation"), id(DISPID_SLRemovePronunciation)]
  3960. HRESULT RemovePronunciation([in]BSTR bstrWord,
  3961. [in]SpeechLanguageId LangId,
  3962. [in, defaultvalue(SPSUnknown)]SpeechPartOfSpeech PartOfSpeech,
  3963. [in, defaultvalue("")]BSTR bstrPronunciation);
  3964. // RemovePronunciationByPhoneIds
  3965. // SAPI C++ Only Interface Equivalent:
  3966. //
  3967. [helpstring("RemovePronunciationByPhoneIds"), hidden, id(DISPID_SLRemovePronunciationByPhoneIds)]
  3968. HRESULT RemovePronunciationByPhoneIds([in]BSTR bstrWord,
  3969. [in]SpeechLanguageId LangId,
  3970. [in, defaultvalue(SPSUnknown)]SpeechPartOfSpeech PartOfSpeech,
  3971. [in, defaultvalue(NULL)]VARIANT* PhoneIds);
  3972. // GetPronunciations
  3973. // SAPI C++ Only Interface Equivalent:
  3974. //
  3975. [helpstring("GetPronunciations"), id(DISPID_SLGetPronunciations)]
  3976. HRESULT GetPronunciations([in]BSTR bstrWord,
  3977. [in, defaultvalue(0)]SpeechLanguageId LangId,
  3978. [in, defaultvalue(eLEXTYPE_USER | eLEXTYPE_APP)]SpeechLexiconType TypeFlags,
  3979. [out,retval]ISpeechLexiconPronunciations** ppPronunciations );
  3980. // GetGenerationChange
  3981. // SAPI C++ Only Interface Equivalent:
  3982. //
  3983. [helpstring("GetGenerationChange"), id(DISPID_SLGetGenerationChange), hidden]
  3984. HRESULT GetGenerationChange([in,out]long* GenerationID,
  3985. [out,retval]ISpeechLexiconWords** ppWords);
  3986. };
  3987. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3988. //
  3989. // ISpeechLexiconWords
  3990. // SAPI C++ Only Interface Equivalent:
  3991. // Default Property: N/A
  3992. //
  3993. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3994. typedef [hidden] enum DISPID_SpeechLexiconWords
  3995. {
  3996. DISPID_SLWsCount = 1,
  3997. DISPID_SLWsItem = DISPID_VALUE,
  3998. DISPID_SLWs_NewEnum = DISPID_NEWENUM
  3999. } DISPID_SpeechLexiconWords;
  4000. [
  4001. object,
  4002. uuid(8D199862-415E-47d5-AC4F-FAA608B424E6),
  4003. dual,
  4004. helpstring("ISpeechLexiconWords Interface"),
  4005. pointer_default(unique)
  4006. ]
  4007. interface ISpeechLexiconWords : IDispatch
  4008. {
  4009. // Properties
  4010. // Count
  4011. // SAPI C++ Only Interface Equivalent:
  4012. // Default: N/A
  4013. //
  4014. [id(DISPID_SLWsCount), propget, helpstring("Count")]
  4015. HRESULT Count([out, retval] long* Count);
  4016. // Methods
  4017. // Item
  4018. // SAPI C++ Only Interface Equivalent:
  4019. //
  4020. [id(DISPID_VALUE), helpstring("Item")]
  4021. HRESULT Item([in] long Index, [out, retval]ISpeechLexiconWord** Word );
  4022. // _NewEnum
  4023. // SAPI C++ Only Interface Equivalent:
  4024. //
  4025. [id(DISPID_NEWENUM), propget, helpstring("Enumerates the tokens"), restricted]
  4026. HRESULT _NewEnum([out, retval] IUnknown** EnumVARIANT);
  4027. };
  4028. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4029. //
  4030. // ISpeechLexiconWord
  4031. // SAPI C++ Only Interface Equivalent:
  4032. // Default Property: N/A
  4033. //
  4034. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4035. /////////////////////////////////////////////////
  4036. //
  4037. // SpeechWordType Enum
  4038. // SAPI C++ Only Interface Equivalent:
  4039. //
  4040. /////////////////////////////////////////////////
  4041. typedef enum SpeechWordType
  4042. {
  4043. SWTAdded = eWORDTYPE_ADDED,
  4044. SWTDeleted = eWORDTYPE_DELETED
  4045. } SpeechWordType;
  4046. typedef [hidden] enum DISPID_SpeechLexiconWord
  4047. {
  4048. DISPID_SLWLangId = 1,
  4049. DISPID_SLWType,
  4050. DISPID_SLWWord,
  4051. DISPID_SLWPronunciations
  4052. } DISPID_SpeechLexiconWord;
  4053. [
  4054. object,
  4055. uuid(4E5B933C-C9BE-48ed-8842-1EE51BB1D4FF),
  4056. dual,
  4057. helpstring("ISpeechLexiconWord Interface"),
  4058. pointer_default(unique)
  4059. ]
  4060. interface ISpeechLexiconWord : IDispatch
  4061. {
  4062. // Properties
  4063. // LangID
  4064. // SAPI C++ Only Interface Equivalent:
  4065. //
  4066. //
  4067. [id(DISPID_SLWLangId), propget]
  4068. HRESULT LangId([out,retval]SpeechLanguageId* LangId);
  4069. // Type
  4070. // SAPI C++ Only Interface Equivalent:
  4071. //
  4072. //
  4073. [id(DISPID_SLWType), propget]
  4074. HRESULT Type([out,retval]SpeechWordType* WordType);
  4075. // Word
  4076. // SAPI C++ Only Interface Equivalent:
  4077. //
  4078. //
  4079. [id(DISPID_SLWWord), propget]
  4080. HRESULT Word([out,retval]BSTR* Word);
  4081. // Pronounciations
  4082. // SAPI C++ Only Interface Equivalent:
  4083. //
  4084. //
  4085. [id(DISPID_SLWPronunciations), propget]
  4086. HRESULT Pronunciations([out,retval]ISpeechLexiconPronunciations** Pronunciations);
  4087. };
  4088. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4089. //
  4090. // ISpeechLexiconPronunciations
  4091. // SAPI C++ Only Interface Equivalent:
  4092. // Default Property: N/A
  4093. //
  4094. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4095. typedef [hidden] enum DISPID_SpeechLexiconProns
  4096. {
  4097. DISPID_SLPsCount = 1,
  4098. DISPID_SLPsItem = DISPID_VALUE,
  4099. DISPID_SLPs_NewEnum = DISPID_NEWENUM
  4100. } DISPID_SpeechLexiconProns;
  4101. [
  4102. object,
  4103. uuid(72829128-5682-4704-A0D4-3E2BB6F2EAD3),
  4104. dual,
  4105. helpstring("ISpeechLexiconPronunciations Interface"),
  4106. pointer_default(unique)
  4107. ]
  4108. interface ISpeechLexiconPronunciations : IDispatch
  4109. {
  4110. // Count
  4111. // SAPI C++ Only Interface Equivalent:
  4112. //
  4113. //
  4114. [id(DISPID_SLPsCount), propget, helpstring("Count")]
  4115. HRESULT Count([out, retval] long* Count);
  4116. // Item
  4117. // SAPI C++ Only Interface Equivalent:
  4118. //
  4119. [id(DISPID_VALUE), helpstring("Item")]
  4120. HRESULT Item([in] long Index, [out, retval]ISpeechLexiconPronunciation** Pronunciation );
  4121. // _NewEnum
  4122. //
  4123. //
  4124. [id(DISPID_NEWENUM), propget, helpstring("Enumerates the tokens"), restricted]
  4125. HRESULT _NewEnum([out, retval] IUnknown** EnumVARIANT);
  4126. };
  4127. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4128. //
  4129. // ISpeechLexiconPronunciation
  4130. // SAPI C++ Only Interface Equivalent:
  4131. // Default Property: N/A
  4132. //
  4133. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4134. typedef [hidden] enum DISPID_SpeechLexiconPronunciation
  4135. {
  4136. DISPID_SLPType = 1,
  4137. DISPID_SLPLangId,
  4138. DISPID_SLPPartOfSpeech,
  4139. DISPID_SLPPhoneIds,
  4140. DISPID_SLPSymbolic,
  4141. } DISPID_SpeechLexiconPronunciation;
  4142. [
  4143. object,
  4144. uuid(95252C5D-9E43-4f4a-9899-48EE73352F9F),
  4145. dual,
  4146. helpstring("ISpeechLexiconPronunciation Interface"),
  4147. pointer_default(unique)
  4148. ]
  4149. interface ISpeechLexiconPronunciation : IDispatch
  4150. {
  4151. // Type
  4152. // SAPI C++ Only Interface Equivalent:
  4153. //
  4154. //
  4155. [id(DISPID_SLPType), propget, helpstring("Type")]
  4156. HRESULT Type([out, retval]SpeechLexiconType* LexiconType);
  4157. // LangID
  4158. // SAPI C++ Only Interface Equivalent:
  4159. //
  4160. //
  4161. [id(DISPID_SLPLangId), propget, helpstring("LangId")]
  4162. HRESULT LangId([out, retval]SpeechLanguageId* LangId);
  4163. // PartOfSpeech
  4164. // SAPI C++ Only Interface Equivalent:
  4165. //
  4166. //
  4167. [id(DISPID_SLPPartOfSpeech), propget, helpstring("PartOfSpeech")]
  4168. HRESULT PartOfSpeech([out, retval]SpeechPartOfSpeech* PartOfSpeech);
  4169. // PhoneIds
  4170. // SAPI C++ Only Interface Equivalent:
  4171. // Zero terminated string of phoneids
  4172. //
  4173. [id(DISPID_SLPPhoneIds), propget, helpstring("PhoneIds")]
  4174. HRESULT PhoneIds([out, retval]VARIANT* PhoneIds);
  4175. // Symbolic
  4176. // SAPI C++ Only Interface Equivalent:
  4177. // Zero terminated string of phones
  4178. //
  4179. [id(DISPID_SLPSymbolic), propget, helpstring("Symbolic")]
  4180. HRESULT Symbolic([out, retval]BSTR* Symbolic);
  4181. };
  4182. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4183. //
  4184. // ISpeechPhoneConverter
  4185. // SAPI C++ Only Interface Equivalent:
  4186. // Default Property: N/A
  4187. //
  4188. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4189. typedef [hidden] enum DISPID_SpeechPhoneConverter
  4190. {
  4191. DISPID_SPCLangId = 1,
  4192. DISPID_SPCPhoneToId,
  4193. DISPID_SPCIdToPhone
  4194. } DISPID_SpeechPhoneConverter;
  4195. [
  4196. object,
  4197. uuid(C3E4F353-433F-43d6-89A1-6A62A7054C3D),
  4198. dual,
  4199. helpstring("ISpeechPhoneConverter Interface"),
  4200. pointer_default(unique)
  4201. ]
  4202. interface ISpeechPhoneConverter : IDispatch
  4203. {
  4204. // Methods
  4205. // LanguageId
  4206. // SAPI C++ Only Interface Equivalent:
  4207. // This can only be set once, if tried it fails
  4208. //
  4209. [propget, helpstring("LanguageId"), id(DISPID_SPCLangId)]
  4210. HRESULT LanguageId([out,retval]SpeechLanguageId* LanguageId);
  4211. [propput, helpstring("LanguageId"), id(DISPID_SPCLangId)]
  4212. HRESULT LanguageId([in]SpeechLanguageId LanguageId);
  4213. // PhoneToId
  4214. // SAPI C++ Only Interface Equivalent:
  4215. //
  4216. [id(DISPID_SPCPhoneToId), helpstring("PhoneToId")]
  4217. HRESULT PhoneToId([in]const BSTR Phonemes,
  4218. [out,retval]VARIANT* IdArray);
  4219. // IdToPhone
  4220. // SAPI C++ Only Interface Equivalent:
  4221. //
  4222. [id(DISPID_SPCIdToPhone), helpstring("IdToPhone")]
  4223. HRESULT IdToPhone([in]const VARIANT IdArray,
  4224. [out,retval]BSTR* Phonemes);
  4225. }