Partager via


SAPI-Lite Error Codes

4/8/2010

Return Codes

These are defined either in the standard windows header file "winerror.h" or in the standard SAPI header file "sperror.h."

Success Codes

Value Description

S_OK

The operation finished successfully.

SP_INSUFFICIENT_DATA

The operation was successful, however the engine needs to prompt the user for an additional sample.

SP_ALREADY_IN_LEX

The word that was spoken during training was too close to, or matched, a word already in the lexicon

Failure Codes

Value Description

E_FAIL

Indicates general failure.

E_OUTOFMEMORY

The operation failed because there was inadequate memory.

E_ACCESSDENIED

Unable to access stored training samples.

E_INVALIDARG

The operation failed because there were one or more invalid arguments.

E_ABORT

The operation was cancelled by a call to the CancelProcessing function.

E_PENDING

Another training is in progress.

SPERR_UNINITIALIZED

The operation failed because the engine was not properly initialized.

SPERR_BUFFER_TOO_SMALL

The caller provided a buffer which was too small to return a result, such as in the SPBSTR structure.

SPERR_ALREADY_INITIALIZED

The engine was already initialized.

SPERR_NOT_IN_LEX

The recognition engine could not find the spoken word in the lexicon.

SPERR_NOT_FOUND

The tag, key, identifier that was passed in, was not valid.

SPERR_DEVICE_BUSY

The wave device was busy.

SPERR_SR_ENGINE_EXCEPTION

A general exception from the engine.

SPERR_ENGINE_BUSY

The operation failed because the engine is busy servicing another request.

SPERR_NO_WORD_PRONUNCIATION

The required training has not been completed.

SPERR_AUDIO_BUFFER_OVERFLOW

The speaker spoke for longer than the maximum allowed time.

SPERR_NO_AUDIO_DATA

The audio data was silence or too low in volume.

SPERR_TIMEOUT

The task could not complete because a timeout occurred during training or recognition.

SPERR_NO_WORD_PRONUNCIATION

The spoken training sample was too different from the others.

See Also

Concepts

SAPI-Lite Reference