sperror.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:26k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /*******************************************************************************
  2. * SPError.h *
  3. *-----------*
  4. *   Description:
  5. *       This header file contains the custom error codes specific to SAPI5
  6. *-------------------------------------------------------------------------------
  7. *   Copyright (c) Microsoft Corporation. All rights reserved.
  8. *******************************************************************************/
  9. #ifndef SPError_h
  10. #define SPError_h
  11. #ifndef _WINERROR_
  12. #include <winerror.h>
  13. #endif
  14. #define FACILITY_SAPI      FACILITY_ITF
  15. #define SAPI_ERROR_BASE    0x5000
  16. #define MAKE_SAPI_HRESULT(sev, err)    MAKE_HRESULT(sev, FACILITY_SAPI, err)
  17. #define MAKE_SAPI_ERROR(err)           MAKE_SAPI_HRESULT(SEVERITY_ERROR, err + SAPI_ERROR_BASE)
  18. #define MAKE_SAPI_SCODE(scode)         MAKE_SAPI_HRESULT(SEVERITY_SUCCESS, scode + SAPI_ERROR_BASE)
  19. /*** SPERR_UNINITIALIZED                                   0x80045001    -2147201023
  20. *   The object has not been properly initialized.
  21. */
  22. #define SPERR_UNINITIALIZED                                MAKE_SAPI_ERROR(0x001)
  23. /*** SPERR_ALREADY_INITIALIZED                             0x80045002    -2147201022
  24. *   The object has already been initialized.
  25. */
  26. #define SPERR_ALREADY_INITIALIZED                          MAKE_SAPI_ERROR(0x002)
  27. /*** SPERR_UNSUPPORTED_FORMAT                              0x80045003    -2147201021
  28. *   The caller has specified an unsupported format.
  29. */
  30. #define SPERR_UNSUPPORTED_FORMAT                           MAKE_SAPI_ERROR(0x003)
  31. /*** SPERR_INVALID_FLAGS                                   0x80045004    -2147201020
  32. *   The caller has specified invalid flags for this operation.
  33. */
  34. #define SPERR_INVALID_FLAGS                                MAKE_SAPI_ERROR(0x004)
  35. /*** SP_END_OF_STREAM                                      0x00045005    282629
  36. *   The operation has reached the end of stream.
  37. */
  38. #define SP_END_OF_STREAM                                   MAKE_SAPI_SCODE(0x005)
  39. /*** SPERR_DEVICE_BUSY                                     0x80045006    -2147201018
  40. *   The wave device is busy.
  41. */
  42. #define SPERR_DEVICE_BUSY                                  MAKE_SAPI_ERROR(0x006)
  43. /*** SPERR_DEVICE_NOT_SUPPORTED                            0x80045007    -2147201017
  44. *   The wave device is not supported.
  45. */
  46. #define SPERR_DEVICE_NOT_SUPPORTED                         MAKE_SAPI_ERROR(0x007)
  47. /*** SPERR_DEVICE_NOT_ENABLED                              0x80045008    -2147201016
  48. *   The wave device is not enabled.
  49. */
  50. #define SPERR_DEVICE_NOT_ENABLED                           MAKE_SAPI_ERROR(0x008)
  51. /*** SPERR_NO_DRIVER                                       0x80045009    -2147201015
  52. *   There is no wave driver installed.
  53. */
  54. #define SPERR_NO_DRIVER                                    MAKE_SAPI_ERROR(0x009)
  55. /*** SPERR_FILEMUSTBEUNICODE                               0x8004500a    -2147201014
  56. *   The file must be Unicode.
  57. */
  58. #define SPERR_FILE_MUST_BE_UNICODE                         MAKE_SAPI_ERROR(0x00a)
  59. /*** SP_INSUFFICIENTDATA                                   0x0004500b    282635
  60. *
  61. */
  62. #define SP_INSUFFICIENT_DATA                               MAKE_SAPI_SCODE(0x00b)
  63. /*** SPERR_INVALID_PHRASE_ID                               0x8004500c    -2147201012
  64. *   The phrase ID specified does not exist or is out of range.
  65. */
  66. #define SPERR_INVALID_PHRASE_ID                            MAKE_SAPI_ERROR(0x00c)
  67. /*** SPERR_BUFFER_TOO_SMALL                                0x8004500d    -2147201011
  68. *   The caller provided a buffer too small to return a result.
  69. */
  70. #define SPERR_BUFFER_TOO_SMALL                             MAKE_SAPI_ERROR(0x00d)
  71. /*** SPERR_FORMAT_NOT_SPECIFIED                            0x8004500e    -2147201010
  72. *   Caller did not specify a format prior to opening a stream.
  73. */
  74. #define SPERR_FORMAT_NOT_SPECIFIED                         MAKE_SAPI_ERROR(0x00e)
  75. /*** SPERR_AUDIO_STOPPED                                   0x8004500f    -2147201009
  76. *   The stream I/O was aborted by setting the audio object to the stopped state.
  77. *   This will be returned for both read and write streams.
  78. */
  79. #define SPERR_AUDIO_STOPPED                                MAKE_SAPI_ERROR(0x00f)
  80. /*** SP_AUDIO_PAUSED                                       0x00045010    282640
  81. *   This will be returned only on input (read) streams when the stream is paused.  Reads on
  82. *   paused streams will not block, and this return code indicates that all of the data has been
  83. *   removed from the stream.
  84. */
  85. #define SP_AUDIO_PAUSED                                    MAKE_SAPI_SCODE(0x010)
  86. /*** SPERR_RULE_NOT_FOUND                                  0x80045011    -2147201007
  87. *   Invalid rule name passed to ActivateGrammar.
  88. */
  89. #define SPERR_RULE_NOT_FOUND                               MAKE_SAPI_ERROR(0x011)
  90. /*** SPERR_TTS_ENGINE_EXCEPTION                            0x80045012    -2147201006
  91. *   An exception was raised during a call to the current TTS driver.
  92. */
  93. #define SPERR_TTS_ENGINE_EXCEPTION                         MAKE_SAPI_ERROR(0x012)
  94. /*** SPERR_TTS_NLP_EXCEPTION                               0x80045013    -2147201005
  95. *   An exception was raised during a call to an application sentence filter.
  96. */
  97. #define SPERR_TTS_NLP_EXCEPTION                            MAKE_SAPI_ERROR(0x013)
  98. /*** SPERR_ENGINE_BUSY                                     0x80045014    -2147201004
  99. *   In speech recognition, the current method can not be performed while
  100. *   a grammar rule is active.
  101. */
  102. #define SPERR_ENGINE_BUSY                                  MAKE_SAPI_ERROR(0x014)
  103. /*** SP_AUDIO_CONVERSION_ENABLED                           0x00045015    282645
  104. *   The operation was successful, but only with automatic stream format conversion.
  105. */
  106. #define SP_AUDIO_CONVERSION_ENABLED                        MAKE_SAPI_SCODE(0x015)
  107. /*** SP_NO_HYPOTHESIS_AVAILABLE                            0x00045016    282646
  108. *   There is currently no hypothesis recognition available.
  109. */
  110. #define SP_NO_HYPOTHESIS_AVAILABLE                         MAKE_SAPI_SCODE(0x016)
  111. /*** SPERR_CANT_CREATE                                     0x80045017    -2147201001
  112. *   Can not create a new object instance for the specified object category.
  113. */
  114. #define SPERR_CANT_CREATE                                  MAKE_SAPI_ERROR(0x017)
  115. /*** SP_ALREADY_IN_LEX                                     0x00045018    282648
  116. *   The word, pronunciation, or POS pair being added is already in lexicon.
  117. */
  118. #define SP_ALREADY_IN_LEX                                  MAKE_SAPI_SCODE(0x018)
  119. /*** SPERR_NOT_IN_LEX                                      0x80045019    -2147200999
  120. *   The word does not exist in the lexicon.
  121. */
  122. #define SPERR_NOT_IN_LEX                                   MAKE_SAPI_ERROR(0x019)
  123. /*** SP_LEX_NOTHING_TO_SYNC                                0x0004501a    282650
  124. *   The client is currently synced with the lexicon.
  125. */
  126. #define SP_LEX_NOTHING_TO_SYNC                             MAKE_SAPI_SCODE(0x01a)
  127. /*** SPERR_LEX_VERY_OUT_OF_SYNC                            0x8004501b    -2147200997
  128. *   The client is excessively out of sync with the lexicon. Mismatches may not be incrementally sync'd.
  129. */
  130. #define SPERR_LEX_VERY_OUT_OF_SYNC                         MAKE_SAPI_ERROR(0x01b)
  131. /*** SPERR_UNDEFINED_FORWARD_RULE_REF                      0x8004501c    -2147200996
  132. *   A rule reference in a grammar was made to a named rule that was never defined.
  133. */
  134. #define SPERR_UNDEFINED_FORWARD_RULE_REF                   MAKE_SAPI_ERROR(0x01c)
  135. /*** SPERR_EMPTY_RULE                                      0x8004501d    -2147200995
  136. *   A non-dynamic grammar rule that has no body.
  137. */
  138. #define SPERR_EMPTY_RULE                                   MAKE_SAPI_ERROR(0x01d)
  139. /*** SPERR_GRAMMAR_COMPILER_INTERNAL_ERROR                 0x8004501e    -2147200994
  140. *   The grammar compiler failed due to an internal state error.
  141. */
  142. #define SPERR_GRAMMAR_COMPILER_INTERNAL_ERROR              MAKE_SAPI_ERROR(0x01e)
  143. /*** SPERR_RULE_NOT_DYNAMIC                                0x8004501f    -2147200993
  144. *   An attempt was made to modify a non-dynamic rule.
  145. */
  146. #define SPERR_RULE_NOT_DYNAMIC                             MAKE_SAPI_ERROR(0x01f)
  147. /*** SPERR_DUPLICATE_RULE_NAME                             0x80045020    -2147200992
  148. *   A rule name was duplicated.
  149. */
  150. #define SPERR_DUPLICATE_RULE_NAME                          MAKE_SAPI_ERROR(0x020)
  151. /*** SPERR_DUPLICATE_RESOURCE_NAME                         0x80045021    -2147200991
  152. *   A resource name was duplicated for a given rule.
  153. */
  154. #define SPERR_DUPLICATE_RESOURCE_NAME                      MAKE_SAPI_ERROR(0x021)
  155. /*** SPERR_TOO_MANY_GRAMMARS                               0x80045022    -2147200990
  156. *   Too many grammars have been loaded.
  157. */
  158. #define SPERR_TOO_MANY_GRAMMARS                            MAKE_SAPI_ERROR(0x022)
  159. /*** SPERR_CIRCULAR_REFERENCE                              0x80045023    -2147200989
  160. *   Circular reference in import rules of grammars.
  161. */
  162. #define SPERR_CIRCULAR_REFERENCE                           MAKE_SAPI_ERROR(0x023)
  163. /*** SPERR_INVALID_IMPORT                                  0x80045024    -2147200988
  164. *   A rule reference to an imported grammar that could not be resolved.
  165. */
  166. #define SPERR_INVALID_IMPORT                               MAKE_SAPI_ERROR(0x024)
  167. /*** SPERR_INVALID_WAV_FILE                                0x80045025    -2147200987
  168. *   The format of the WAV file is not supported.
  169. */
  170. #define SPERR_INVALID_WAV_FILE                             MAKE_SAPI_ERROR(0x025)
  171. /*** SP_REQUEST_PENDING                                    0x00045026    282662
  172. *   This success code indicates that an SR method called with the SPRIF_ASYNC flag is
  173. *   being processed.  When it has finished processing, an SPFEI_ASYNC_COMPLETED event will be generated.
  174. */
  175. #define SP_REQUEST_PENDING                                 MAKE_SAPI_SCODE(0x026)
  176. /*** SPERR_ALL_WORDS_OPTIONAL                              0x80045027    -2147200985
  177. *   A grammar rule was defined with a null path through the rule.  That is, it is possible
  178. *   to satisfy the rule conditions with no words.
  179. */
  180. #define SPERR_ALL_WORDS_OPTIONAL                           MAKE_SAPI_ERROR(0x027)
  181. /*** SPERR_INSTANCE_CHANGE_INVALID                         0x80045028    -2147200984
  182. *   It is not possible to change the current engine or input.  This occurs in the
  183. *   following cases:
  184. *
  185. *       1) SelectEngine called while a recognition context exists, or
  186. *       2) SetInput called in the shared instance case.
  187. */
  188. #define SPERR_INSTANCE_CHANGE_INVALID                      MAKE_SAPI_ERROR(0x028)
  189. /*** SPERR_RULE_NAME_ID_CONFLICT                          0x80045029    -2147200983
  190. *   A rule exists with matching IDs (names) but different names (IDs).  
  191. */
  192. #define SPERR_RULE_NAME_ID_CONFLICT                        MAKE_SAPI_ERROR(0x029)
  193. /*** SPERR_NO_RULES                                       0x8004502a    -2147200982
  194. *   A grammar contains no top-level, dynamic, or exported rules.  There is no possible
  195. *   way to activate or otherwise use any rule in this grammar.
  196. */
  197. #define SPERR_NO_RULES                                     MAKE_SAPI_ERROR(0x02a)
  198. /*** SPERR_CIRCULAR_RULE_REF                              0x8004502b    -2147200981
  199. *   Rule 'A' refers to a second rule 'B' which, in turn, refers to rule 'A'. 
  200. */
  201. #define SPERR_CIRCULAR_RULE_REF                            MAKE_SAPI_ERROR(0x02b)
  202. /*** SP_NO_PARSE_FOUND                                    0x0004502c    282668
  203. *   Parse path cannot be parsed given the currently active rules.
  204. */
  205. #define SP_NO_PARSE_FOUND                                  MAKE_SAPI_SCODE(0x02c)
  206. /*** SPERR_NO_PARSE_FOUND                                 0x8004502d    -2147200979
  207. *   Parse path cannot be parsed given the currently active rules.
  208. */
  209. #define SPERR_INVALID_HANDLE                               MAKE_SAPI_ERROR(0x02d)
  210. /*** SPERR_REMOTE_CALL_TIMED_OUT                          0x8004502e    -2147200978
  211. *   A marshaled remote call failed to respond.
  212. */
  213. #define SPERR_REMOTE_CALL_TIMED_OUT                        MAKE_SAPI_ERROR(0x02e)
  214. /*** SPERR_AUDIO_BUFFER_OVERFLOW                           0x8004502f    -2147200977
  215. *   This will only be returned on input (read) streams when the stream is paused because
  216. *   the SR driver has not retrieved data recently.
  217. */
  218. #define SPERR_AUDIO_BUFFER_OVERFLOW                        MAKE_SAPI_ERROR(0x02f)
  219. /*** SPERR_NO_AUDIO_DATA                                   0x80045030    -2147200976
  220. *   The result does not contain any audio, nor does the portion of the element chain of the result
  221. *   contain any audio.
  222. */
  223. #define SPERR_NO_AUDIO_DATA                                MAKE_SAPI_ERROR(0x030)
  224. /*** SPERR_DEAD_ALTERNATE                                  0x80045031    -2147200975
  225. *   This alternate is no longer a valid alternate to the result it was obtained from.
  226. *   Returned from ISpPhraseAlt methods.
  227. */
  228. #define SPERR_DEAD_ALTERNATE                               MAKE_SAPI_ERROR(0x031)
  229. /*** SPERR_HIGH_LOW_CONFIDENCE                             0x80045032    -2147200974
  230. *   The result does not contain any audio, nor does the portion of the element chain of the result
  231. *   contain any audio.  Returned from ISpResult::GetAudio and ISpResult::SpeakAudio.
  232. */
  233. #define SPERR_HIGH_LOW_CONFIDENCE                          MAKE_SAPI_ERROR(0x032)
  234. /*** SPERR_INVALID_FORMAT_STRING                           0x80045033    -2147200973
  235. *   The XML format string for this RULEREF is invalid, e.g. not a GUID or REFCLSID.
  236. */
  237. #define SPERR_INVALID_FORMAT_STRING                        MAKE_SAPI_ERROR(0x033)
  238. /*** SP_UNSUPPORTED_ON_STREAM_INPUT                        0x00045034    282676
  239. *   The operation is not supported for stream input.
  240. */
  241. #define SP_UNSUPPORTED_ON_STREAM_INPUT                     MAKE_SAPI_SCODE(0x034)
  242. /*** SPERR_APPLEX_READ_ONLY                                0x80045035    -2147200971
  243. *   The operation is invalid for all but newly created application lexicons.
  244. */
  245. #define SPERR_APPLEX_READ_ONLY                             MAKE_SAPI_ERROR(0x035)
  246. /*** SPERR_NO_TERMINATING_RULE_PATH                        0x80045036    -2147200970
  247. *
  248. */
  249. #define SPERR_NO_TERMINATING_RULE_PATH                     MAKE_SAPI_ERROR(0x036)
  250. /*** SP_WORD_EXISTS_WITHOUT_PRONUNCIATION                  0x00045037    282679
  251. *   The word exists but without pronunciation.
  252. */
  253. #define SP_WORD_EXISTS_WITHOUT_PRONUNCIATION               MAKE_SAPI_SCODE(0x037)
  254. /*** SPERR_STREAM_CLOSED                                   0x80045038    -2147200968
  255. *   An operation was attempted on a stream object that has been closed.
  256. */
  257. #define SPERR_STREAM_CLOSED                                MAKE_SAPI_ERROR(0x038)
  258. // --- The following error codes are taken directly from WIN32  ---
  259. /*** SPERR_NO_MORE_ITEMS                                   0x80045039    -2147200967
  260. *   When enumerating items, the requested index is greater than the count of items.
  261. */
  262. #define SPERR_NO_MORE_ITEMS                                MAKE_SAPI_ERROR(0x039)
  263. /*** SPERR_NOT_FOUND                                       0x8004503a    -2147200966
  264. *   The requested data item (data key, value, etc.) was not found.
  265. */
  266. #define SPERR_NOT_FOUND                                    MAKE_SAPI_ERROR(0x03a)
  267. /*** SPERR_INVALID_AUDIO_STATE                             0x8004503b    -2147200965
  268. *   Audio state passed to SetState() is invalid.
  269. */
  270. #define SPERR_INVALID_AUDIO_STATE                          MAKE_SAPI_ERROR(0x03b)
  271. /*** SPERR_GENERIC_MMSYS_ERROR                             0x8004503c    -2147200964
  272. *   A generic MMSYS error not caught by _MMRESULT_TO_HRESULT.
  273. */
  274. #define SPERR_GENERIC_MMSYS_ERROR                          MAKE_SAPI_ERROR(0x03c)
  275. /*** SPERR_MARSHALER_EXCEPTION                             0x8004503d    -2147200963
  276. *   An exception was raised during a call to the marshaling code.
  277. */
  278. #define SPERR_MARSHALER_EXCEPTION                          MAKE_SAPI_ERROR(0x03d)
  279. /*** SPERR_NOT_DYNAMIC_GRAMMAR                             0x8004503e    -2147200962
  280. *   Attempt was made to manipulate a non-dynamic grammar.
  281. */
  282. #define SPERR_NOT_DYNAMIC_GRAMMAR                          MAKE_SAPI_ERROR(0x03e)
  283. /*** SPERR_AMBIGUOUS_PROPERTY                              0x8004503f    -2147200961
  284. *   Cannot add ambiguous property.
  285. */
  286. #define SPERR_AMBIGUOUS_PROPERTY                           MAKE_SAPI_ERROR(0x03f)
  287. /*** SPERR_INVALID_REGISTRY_KEY                            0x80045040    -2147200960
  288. *   The key specified is invalid.
  289. */
  290. #define SPERR_INVALID_REGISTRY_KEY                         MAKE_SAPI_ERROR(0x040)
  291. /*** SPERR_INVALID_TOKEN_ID                                0x80045041    -2147200959
  292. *   The token specified is invalid.
  293. */
  294. #define SPERR_INVALID_TOKEN_ID                             MAKE_SAPI_ERROR(0x041)
  295. /*** SPERR_XML_BAD_SYNTAX                                  0x80045042    -2147200958
  296. *   The xml parser failed due to bad syntax.
  297. */
  298. #define SPERR_XML_BAD_SYNTAX                               MAKE_SAPI_ERROR(0x042)
  299. /*** SPERR_XML_RESOURCE_NOT_FOUND                          0x80045043    -2147200957
  300. *   The xml parser failed to load a required resource (e.g., voice, phoneconverter, etc.).
  301. */
  302. #define SPERR_XML_RESOURCE_NOT_FOUND                       MAKE_SAPI_ERROR(0x043)
  303. /*** SPERR_TOKEN_IN_USE                                    0x80045044    -2147200956
  304. *   Attempted to remove registry data from a token that is already in use elsewhere.
  305. */
  306. #define SPERR_TOKEN_IN_USE                                 MAKE_SAPI_ERROR(0x044)
  307. /*** SPERR_TOKEN_DELETED                                   0x80045045    -2147200955
  308. *   Attempted to perform an action on an object token that has had associated registry key deleted.
  309. */
  310. #define SPERR_TOKEN_DELETED                                MAKE_SAPI_ERROR(0x045)
  311. /*** SPERR_MULTI_LINGUAL_NOT_SUPPORTED                     0x80045046    -2147200954
  312. *   The selected voice was registered as multi-lingual. SAPI does not support multi-lingual registration. 
  313. */
  314. #define SPERR_MULTI_LINGUAL_NOT_SUPPORTED                  MAKE_SAPI_ERROR(0x046)
  315. /*** SPERR_EXPORT_DYNAMIC_RULE                             0x80045047    -2147200953
  316. *   Exported rules cannot refer directly or indirectly to a dynamic rule.
  317. */
  318. #define SPERR_EXPORT_DYNAMIC_RULE                          MAKE_SAPI_ERROR(0x047)
  319. /*** SPERR_STGF_ERROR                                      0x80045048    -2147200952
  320. *   Error parsing the SAPI Text Grammar Format (XML grammar).
  321. */
  322. #define SPERR_STGF_ERROR                                   MAKE_SAPI_ERROR(0x048)
  323. /*** SPERR_WORDFORMAT_ERROR                                0x80045049    -2147200951
  324. *   Incorrect word format, probably due to incorrect pronunciation string.
  325. */
  326. #define SPERR_WORDFORMAT_ERROR                             MAKE_SAPI_ERROR(0x049)
  327. /*** SPERR_STREAM_NOT_ACTIVE                               0x8004504a    -2147200950
  328. *   Methods associated with active audio stream cannot be called unless stream is active.
  329. */
  330. #define SPERR_STREAM_NOT_ACTIVE                            MAKE_SAPI_ERROR(0x04a)
  331. /*** SPERR_ENGINE_RESPONSE_INVALID                         0x8004504b    -2147200949
  332. *   Arguments or data supplied by the engine are in an invalid format or are inconsistent.
  333. */
  334. #define SPERR_ENGINE_RESPONSE_INVALID                      MAKE_SAPI_ERROR(0x04b)
  335. /*** SPERR_SR_ENGINE_EXCEPTION                             0x8004504c    -2147200948
  336. *   An exception was raised during a call to the current SR engine.
  337. */
  338. #define SPERR_SR_ENGINE_EXCEPTION                          MAKE_SAPI_ERROR(0x04c)
  339. /*** SPERR_STREAM_POS_INVALID                              0x8004504d    -2147200947
  340. *   Stream position information supplied from engine is inconsistent.
  341. */
  342. #define SPERR_STREAM_POS_INVALID                           MAKE_SAPI_ERROR(0x04d)
  343. /*** SP_RECOGNIZER_INACTIVE                                0x0004504e    282702
  344. *   Operation could not be completed because the recognizer is inactive. It is inactive either
  345. *   because the recognition state is currently inactive or because no rules are active .
  346. */
  347. #define SP_RECOGNIZER_INACTIVE                             MAKE_SAPI_SCODE(0x04e)
  348. /*** SPERR_REMOTE_CALL_ON_WRONG_THREAD                     0x8004504f    -2147200945
  349. *   When making a remote call to the server, the call was made on the wrong thread.
  350. */
  351. #define SPERR_REMOTE_CALL_ON_WRONG_THREAD                  MAKE_SAPI_ERROR(0x04f)
  352. /*** SPERR_REMOTE_PROCESS_TERMINATED                       0x80045050    -2147200944
  353. *   The remote process terminated unexpectedly.
  354. */
  355. #define SPERR_REMOTE_PROCESS_TERMINATED                    MAKE_SAPI_ERROR(0x050)
  356. /*** SPERR_REMOTE_PROCESS_ALREADY_RUNNING                  0x80045051    -2147200943
  357. *   The remote process is already running; it cannot be started a second time.
  358. */
  359. #define SPERR_REMOTE_PROCESS_ALREADY_RUNNING               MAKE_SAPI_ERROR(0x051)
  360. /*** SPERR_LANGID_MISMATCH                                 0x80045052    -2147200942
  361. *   An attempt to load a CFG grammar with a LANGID different than other loaded grammars.
  362. */
  363. #define SPERR_LANGID_MISMATCH                              MAKE_SAPI_ERROR(0x052)
  364. /*** SP_PARTIAL_PARSE_FOUND                               0x00045053    282707
  365. *   A grammar-ending parse has been found that does not use all available words.
  366. */
  367. #define SP_PARTIAL_PARSE_FOUND                             MAKE_SAPI_SCODE(0x053)
  368. /*** SPERR_NOT_TOPLEVEL_RULE                              0x80045054    -2147200940
  369. *   An attempt to deactivate or activate a non-toplevel rule.
  370. */
  371. #define SPERR_NOT_TOPLEVEL_RULE                            MAKE_SAPI_ERROR(0x054)
  372. /*** SP_NO_RULE_ACTIVE                                    0x00045055    282709
  373. *   An attempt to parse when no rule was active.
  374. */
  375. #define SP_NO_RULE_ACTIVE                                  MAKE_SAPI_SCODE(0x055)
  376. /*** SPERR_LEX_REQUIRES_COOKIE                            0x80045056    -2147200938
  377. *   An attempt to ask a container lexicon for all words at once.
  378. */
  379. #define SPERR_LEX_REQUIRES_COOKIE                          MAKE_SAPI_ERROR(0x056)
  380. /*** SP_STREAM_UNINITIALIZED                              0x00045057    282711
  381. *   An attempt to activate a rule/dictation/etc without calling SetInput 
  382. *   first in the inproc case.
  383. */
  384. #define SP_STREAM_UNINITIALIZED                            MAKE_SAPI_SCODE(0x057)
  385. // Error x058 is not used in SAPI 5.0
  386. /*** SPERR_UNSUPPORTED_LANG                               0x80045059    -2147200935
  387. *   The requested language is not supported.
  388. */
  389. #define SPERR_UNSUPPORTED_LANG                             MAKE_SAPI_ERROR(0x059)
  390. /*** SPERR_VOICE_PAUSED                                   0x8004505a    -2147200934
  391. *   The operation cannot be performed because the voice is currently paused.
  392. */
  393. #define SPERR_VOICE_PAUSED                                 MAKE_SAPI_ERROR(0x05a)
  394. /*** SPERR_AUDIO_BUFFER_UNDERFLOW                          0x8004505b    -2147200933
  395. *   This will only be returned on input (read) streams when the real time audio device
  396. *   stops returning data for a long period of time.
  397. */
  398. #define SPERR_AUDIO_BUFFER_UNDERFLOW                       MAKE_SAPI_ERROR(0x05b)
  399. /*** SPERR_AUDIO_STOPPED_UNEXPECTEDLY                     0x8004505c    -2147200932
  400. *   An audio device stopped returning data from the Read() method even though it was in
  401. *   the run state.  This error is only returned in the END_SR_STREAM event.
  402. */
  403. #define SPERR_AUDIO_STOPPED_UNEXPECTEDLY                   MAKE_SAPI_ERROR(0x05c)
  404. /*** SPERR_NO_WORD_PRONUNCIATION                           0x8004505d    -2147200931
  405. *   The SR engine is unable to add this word to a grammar. The application may need to supply 
  406. *   an explicit pronunciation for this word.
  407. */
  408. #define SPERR_NO_WORD_PRONUNCIATION                        MAKE_SAPI_ERROR(0x05d)
  409. /*** SPERR_ALTERNATES_WOULD_BE_INCONSISTENT                0x8004505e    -2147200930
  410. *   An attempt to call ScaleAudio on a recognition result having previously
  411. *   called GetAlternates. Allowing the call to succeed would result in
  412. *   the previously created alternates located in incorrect audio stream positions.
  413. */
  414. #define SPERR_ALTERNATES_WOULD_BE_INCONSISTENT             MAKE_SAPI_ERROR(0x05e)
  415. /*** SPERR_NOT_SUPPORTED_FOR_SHARED_RECOGNIZER             0x8004505f    -2147200929
  416. *   The method called is not supported for the shared recognizer.
  417. *   For example, ISpRecognizer::GetInputStream().
  418. */
  419. #define SPERR_NOT_SUPPORTED_FOR_SHARED_RECOGNIZER          MAKE_SAPI_ERROR(0x05f)
  420. /*** SPERR_TIMEOUT                                         0x80045060    -2147200928
  421. *   A task could not complete because the SR engine had timed out.
  422. */
  423. #define SPERR_TIMEOUT                                      MAKE_SAPI_ERROR(0x060)
  424. /*** SPERR_REENTER_SYNCHRONIZE                             0x80045061    -2147200927
  425. *   A SR engine called synchronize while inside of a synchronize call.
  426. */
  427. #define SPERR_REENTER_SYNCHRONIZE                          MAKE_SAPI_ERROR(0x061)
  428. /*** SPERR_STATE_WITH_NO_ARCS                              0x80045062    -2147200926
  429. *   The grammar contains a node no arcs.
  430. */
  431. #define SPERR_STATE_WITH_NO_ARCS                           MAKE_SAPI_ERROR(0x062)
  432. /*** SPERR_NOT_ACTIVE_SESSION                              0x80045063    -2147200925
  433. *   Neither audio output and input is supported for non-active console sessions.
  434. */
  435. #define SPERR_NOT_ACTIVE_SESSION                           MAKE_SAPI_ERROR(0x063)
  436. /*** SPERR_ALREADY_DELETED                                 0x80045064    -2147200924
  437. *   The object is a stale reference and is invalid to use.
  438. *   For example having a ISpeechGrammarRule object reference and then calling 
  439. *   ISpeechRecoGrammar::Reset() will cause the rule object to be invalidated.
  440. *   Calling any methods after this will result in this error.
  441. */
  442. #define SPERR_ALREADY_DELETED                              MAKE_SAPI_ERROR(0x064)
  443. #endif  //--- This must be the last line in the file