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.

108 lines
12 KiB

case SPERR_UNINITIALIZED: return L"The object has not been properly initialized.";
case SPERR_ALREADY_INITIALIZED: return L"The object has already been initialized.";
case SPERR_UNSUPPORTED_FORMAT: return L"The caller has specified an unsupported format.";
case SPERR_INVALID_FLAGS: return L"The caller has specified invalid flags for this operation.";
case SP_END_OF_STREAM: return L"The operation has reached the end of stream.";
case SPERR_DEVICE_BUSY: return L"The wave device is busy.";
case SPERR_DEVICE_NOT_SUPPORTED: return L"The wave device is not supported.";
case SPERR_DEVICE_NOT_ENABLED: return L"The wave device is not enabled.";
case SPERR_NO_DRIVER: return L"There is no wave driver installed.";
// case SPERR_FILEMUSTBEUNICODE: return L"The file must be Unicode.";
// case SP_INSUFFICIENTDATA: return L"Insufficient data.";
case SPERR_INVALID_PHRASE_ID: return L"The phrase ID specified does not exist or is out of range.";
case SPERR_BUFFER_TOO_SMALL: return L"The caller provided a buffer too small to return a result.";
case SPERR_FORMAT_NOT_SPECIFIED: return L"Caller did not specify a format prior to opening a stream.";
case SPERR_AUDIO_STOPPED: return L"The stream I/O was stopped by setting the audio object to the stopped state. This will be returned for both read and write streams.";
case SP_AUDIO_PAUSED: return L"This will be returned only on input (read) streams when the stream is paused. Reads on paused streams will not block, and this return code indicates that all of the data has been removed from the stream.";
case SPERR_RULE_NOT_FOUND: return L"Invalid rule name passed to ActivateGrammar.";
case SPERR_TTS_ENGINE_EXCEPTION: return L"An exception was raised during a call to the current TTS driver.";
case SPERR_TTS_NLP_EXCEPTION: return L"An exception was raised during a call to an application sentence filter.";
case SPERR_ENGINE_BUSY: return L"In speech recognition, the current method cannot be performed while a grammar rule is active.";
case SP_AUDIO_CONVERSION_ENABLED: return L"The operation was successful, but only with automatic stream format conversion.";
case SP_NO_HYPOTHESIS_AVAILABLE: return L"There is currently no hypothesis recognition available.";
case SPERR_CANT_CREATE: return L"Cannot create a new object instance for the specified object category.";
case SP_ALREADY_IN_LEX: return L"The word, pronunciation, or POS pair being added is already in lexicon.";
case SPERR_NOT_IN_LEX: return L"The word does not exist in the lexicon.";
case SP_LEX_NOTHING_TO_SYNC: return L"The client is currently synced with the lexicon.";
case SPERR_LEX_VERY_OUT_OF_SYNC: return L"The client is excessively out of sync with the lexicon. Mismatches may not sync incrementally.";
case SPERR_UNDEFINED_FORWARD_RULE_REF: return L"A rule reference in a grammar was made to a named rule that was never defined.";
case SPERR_EMPTY_RULE: return L"A non-dynamic grammar rule that has no body.";
case SPERR_GRAMMAR_COMPILER_INTERNAL_ERROR: return L"The grammar compiler failed due to an internal state error.";
case SPERR_RULE_NOT_DYNAMIC: return L"An attempt was made to modify a non-dynamic rule.";
case SPERR_DUPLICATE_RULE_NAME: return L"A rule name was duplicated.";
case SPERR_DUPLICATE_RESOURCE_NAME: return L"A resource name was duplicated for a given rule.";
case SPERR_TOO_MANY_GRAMMARS: return L"Too many grammars have been loaded.";
case SPERR_CIRCULAR_REFERENCE: return L"Circular reference in import rules of grammars.";
case SPERR_INVALID_IMPORT: return L"A rule reference to an imported grammar that could not be resolved.";
case SPERR_INVALID_WAV_FILE: return L"The format of the WAV file is not supported.";
case SP_REQUEST_PENDING: return L"This success code indicates that an SR method called with the SPRIF_ASYNC flag is being processed. When it has finished processing, an SPFEI_ASYNC_COMPLETED event will be generated.";
case SPERR_ALL_WORDS_OPTIONAL: return L"A grammar rule was defined with a null path through the rule. That is, it is possible to satisfy the rule conditions with no words.";
case SPERR_INSTANCE_CHANGE_INVALID: return L"It is not possible to change the current engine or input. This occurs in the following cases: 1) SelectEngine called while a recognition context exists, or 2) SetInput called in the shared instance case.";
case SPERR_RULE_NAME_ID_CONFLICT: return L"A rule exists with matching IDs (names) but different names (IDs).";
case SPERR_NO_RULES: return L"A grammar contains no top-level, dynamic, or exported rules. There is no possible way to activate or otherwise use any rule in this grammar.";
case SPERR_CIRCULAR_RULE_REF: return L"Rule 'A' refers to a second rule 'B' which, in turn, refers to rule 'A'.";
case SP_NO_PARSE_FOUND: return L"Parse path cannot be parsed given the currently active rules.";
// case SPERR_NO_PARSE_FOUND: return L"Parse path cannot be parsed given the currently active rules.";
case SPERR_REMOTE_CALL_TIMED_OUT: return L"A marshaled remote call failed to respond.";
case SPERR_AUDIO_BUFFER_OVERFLOW: return L"This will only be returned on input (read) streams when the stream is paused because the SR driver has not retrieved data recently.";
case SPERR_NO_AUDIO_DATA: return L"The result does not contain any audio, nor does the portion of the element chain of the result contain any audio.";
case SPERR_DEAD_ALTERNATE: return L"This alternate is no longer a valid alternate to the result it was obtained from. Returned from ISpPhraseAlt methods.";
case SPERR_HIGH_LOW_CONFIDENCE: return L"The result does not contain any audio, nor does the portion of the element chain of the result contain any audio. Returned from ISpResult::GetAudio and ISpResult::SpeakAudio.";
case SPERR_INVALID_FORMAT_STRING: return L"The XML format string for this RULEREF is invalid, e.g. not a GUID or REFCLSID.";
case SP_UNSUPPORTED_ON_STREAM_INPUT: return L"The operation is not supported for stream input.";
case SPERR_APPLEX_READ_ONLY: return L"The operation is invalid for all but newly created application lexicons.";
case SPERR_NO_TERMINATING_RULE_PATH: return L"SP_WORD_EXISTS_WITHOUT_PRONUNCIATION 0x00045037 282679 The word exists but without pronunciation.";
case SPERR_STREAM_CLOSED: return L"An operation was attempted on a stream object that has been closed.";
case SPERR_NO_MORE_ITEMS: return L"When enumerating items, the requested index is greater than the count of items.";
case SPERR_NOT_FOUND: return L"The requested data item (data key, value, etc.) was not found.";
case SPERR_INVALID_AUDIO_STATE: return L"Audio state passed to SetState() is invalid.";
case SPERR_GENERIC_MMSYS_ERROR: return L"A generic MMSYS error not caught by _MMRESULT_TO_HRESULT.";
case SPERR_MARSHALER_EXCEPTION: return L"An exception was raised during a call to the marshaling code.";
case SPERR_NOT_DYNAMIC_GRAMMAR: return L"Attempt was made to manipulate a non-dynamic grammar.";
case SPERR_AMBIGUOUS_PROPERTY: return L"Cannot add ambiguous property.";
case SPERR_INVALID_REGISTRY_KEY: return L"The key specified is invalid.";
case SPERR_INVALID_TOKEN_ID: return L"The token specified is invalid.";
case SPERR_XML_BAD_SYNTAX: return L"The xml parser failed due to bad syntax.";
case SPERR_XML_RESOURCE_NOT_FOUND: return L"The xml parser failed to load a required resource (e.g., voice, phoneconverter, etc.).";
case SPERR_TOKEN_IN_USE: return L"Attempted to remove registry data from a token that is already in use elsewhere.";
case SPERR_TOKEN_DELETED: return L"Attempted to perform an action on an object token that has had associated registry key deleted.";
case SPERR_MULTI_LINGUAL_NOT_SUPPORTED: return L"The selected voice was registered as multi-lingual. SAPI does not support multi-lingual registration.";
case SPERR_EXPORT_DYNAMIC_RULE: return L"Exported rules cannot refer directly or indirectly to a dynamic rule.";
case SPERR_STGF_ERROR: return L"Error parsing the SAPI Text Grammar Format (XML grammar).";
case SPERR_WORDFORMAT_ERROR: return L"Incorrect word format, probably due to incorrect pronunciation string.";
case SPERR_STREAM_NOT_ACTIVE: return L"Methods associated with active audio stream cannot be called unless stream is active.";
case SPERR_ENGINE_RESPONSE_INVALID: return L"Arguments or data supplied by the engine are in an invalid format or are inconsistent.";
case SPERR_SR_ENGINE_EXCEPTION: return L"An exception was raised during a call to the current SR engine.";
case SPERR_STREAM_POS_INVALID: return L"Stream position information supplied from engine is inconsistent.";
case SP_RECOGNIZER_INACTIVE: return L"Operation could not be completed because the recognizer is inactive. It is inactive either because the recognition state is currently inactive or because no rules are active.";
case SPERR_REMOTE_CALL_ON_WRONG_THREAD: return L"When making a remote call to the server, the call was made on the wrong thread.";
case SPERR_REMOTE_PROCESS_TERMINATED: return L"The remote process terminated unexpectedly.";
case SPERR_REMOTE_PROCESS_ALREADY_RUNNING: return L"The remote process is already running; it cannot be started a second time.";
case SPERR_LANGID_MISMATCH: return L"An attempt to load a CFG grammar with a LANGID different than other loaded grammars.";
case SP_PARTIAL_PARSE_FOUND: return L"A grammar-ending parse has been found that does not use all available words.";
case SPERR_NOT_TOPLEVEL_RULE: return L"An attempt to deactivate or activate a non top-level rule.";
case SP_NO_RULE_ACTIVE: return L"An attempt to parse when no rule was active.";
case SPERR_LEX_REQUIRES_COOKIE: return L"An attempt to ask a container lexicon for all words at once.";
case SP_STREAM_UNINITIALIZED: return L"An attempt to activate a rule/dictation/etc without calling SetInput first in the InProc case.";
case SPERR_UNSUPPORTED_LANG: return L"The requested language is not supported.";
case SPERR_VOICE_PAUSED: return L"The operation cannot be performed because the voice is currently paused.";
case SPERR_AUDIO_BUFFER_UNDERFLOW: return L"This will only be returned on input (read) streams when the real time audio device stops returning data for a long period of time.";
case SPERR_AUDIO_STOPPED_UNEXPECTEDLY: return L"An audio device stopped returning data from the Read() method even though it was in the run state. This error is only returned in the END_SR_STREAM event.";
case SPERR_NO_WORD_PRONUNCIATION: return L"The SR engine is unable to add this word to a grammar. The application may need to supply an explicit pronunciation for this word.";
case SPERR_ALTERNATES_WOULD_BE_INCONSISTENT: return L"An attempt to call ScaleAudio on a recognition result having previously called GetAlternates. Allowing the call to succeed would result in the previously created alternates located in incorrect audio stream positions.";
case SPERR_NOT_SUPPORTED_FOR_SHARED_RECOGNIZER: return L"The method called is not supported for the shared recognizer For example, ISpRecognizer::GetInputStream().";
case SPERR_TIMEOUT: return L"A task could not complete because the SR engine had timed out.";
case SPERR_REENTER_SYNCHRONIZE: return L"An SR engine called synchronize while inside of a synchronize call.";
case SPERR_STATE_WITH_NO_ARCS: return L"The grammar contains a node no arcs.";
case SPERR_NOT_ACTIVE_SESSION: return L"Neither audio output nor input is supported for non-active console sessions.";
case SPERR_ALREADY_DELETED: return L"The object is a stale reference and is invalid to use. For example, having an ISpeechGrammarRule object reference and then calling ISpeechRecoGrammar::Reset() will cause the rule object to be invalidated. Calling any methods after this will result in this error. ";
case S_OK: return L"Success";
case REGDB_E_CLASSNOTREG: return L"A specified class is not registered in the registration database.";
case CLASS_E_NOAGGREGATION: return L"This class cannot be created as part of an aggregate.";
case E_NOINTERFACE: return L"The specified class does not implement the requested interface, or the controlling IUnknown does not expose the requested interface.";
case E_POINTER: return L"The ppv parameter is NULL.";
case E_OUTOFMEMORY: return L"Out of memory.";
case E_INVALIDARG: return L"Invalid argument.";
case E_FAIL: return L"Failure";