Skip to content

Error Codes

Application developers may encounter error codes returned by the THF-Micro™ library during application development. The error codes will be returned as a hex value; refer to the corresponding descriptions for more details.

0x0: Generic Errors

Error Code Value Description
ERR_OK 0x00 Generic success return.
ERR_NOT_OK 0x01 Generic error return.

0x1: Audio Data Collection Errors

Error Code Value Description
ERR_DATACOL_TIMEOUT 0x11 No utterance detected.
ERR_DATACOL_TOO_SHORT 0x13 Utterance was too short.
ERR_DATACOL_TOO_SOFT 0x14 Utterance was too quiet.

0x3: Recognition Errors

These error codes will only be returned with non-spotted vocabularies.

Error Code Value Description
ERR_RECOG_FAIL 0x31 Recognition failed.
ERR_RECOG_LOW_CONF 0x32 The recognizer found potential recognition, but it is doubtful (low-confidence).
ERR_RECOG_MID_CONF 0x33 The recognizer found a potential recognition, but it is a 'maybe' (mid-confidence).

0x5: T2SI Errors

Error Code Value Description
ERR_T2SI_PSTORE 0x50 t->spp is NULL.
ERR_T2SI_BAD_VERSION 0x51 Grammar version not supported.
ERR_T2SI_NN_BAD_VERSION 0x52 NN version not supported.
ERR_T2SI_BAD_SETUP 0x53 Net or grammar not specified.
ERR_T2SI_TRIG_NOTA 0x54 Trigger NOTA - continues.
ERR_T2SI_NN_MISMATCH 0x55 Net/grammar mismatch.
ERR_T2SI_TOO_MANY_RESULTS 0x56 MAX_RESULTS is too small.
ERR_T2SI_UNEXPECTED_NUM_EXTRA_MODELS 0x57 Too many extra models.
ERR_T2SI_UNEXPECTED_NUM_EXTRA_GRAMS 0x58 Too many extra grammars.
ERR_T2SI_UNEXPECTED_NUM_EXTRA_NETS 0x59 Too many extra nets.
ERR_T2SI_UNEXPECTED_MFCC_TYPE 0x5A The MFCC type is not supported.
ERR_T2SI_GRAMMAR_UNALIGNED 0x5B Grammar memory is not 4-byte aligned.
ERR_T2SI_FEATURE_MISMATCH 0x5C SensoryProcessFeatures must have matching features.

0x6: DNN Errors

Error Code Value Description
ERR_DNN_BAD_VERSION 0x60 DNN version not supported
ERR_DNN_TOO_MANY_NETS 0x61 Too many DNN nets (> MAX_DNN_NETS).
ERR_DNN_BAD_FORMAT 0x62 DNN format not supported.
ERR_DNN_SV_OR_NNPQ_MISMATCH 0x63 DNN mismatch for SV or NNPQ.
ERR_DNN_UNALIGNED 0x64 DNN memory is not 4-byte aligned.
ERR_DNN_UNSUPPORTED 0x65 DNN type not supported.

0x7: Audio Buffer Errors

Error Code Value Description
ERR_AUDIOBUFFER_BAD_SIZE 0x70 Audio buffer not evenly divisible by sample count.
ERR_AUDIO_REWIND_TOO_LARGE 0x71 Trying to rewind audio buffer by amount larger than buffer length.

0xF: Setup Errors

Error Code Value Description
ERR_HEADER_VERSION 0xF0 sensorylib.h version does not match libTHFMicro.a.
ERR_N_WAY_LIMIT 0xF1 Too many or too few channels / depth.
ERR_SETUP_NOT_SUPPORTED 0xF2 Recognizer configuration settings incompatible with each other.
ERR_LIB_VERSION_TOO_LOW 0xF3 Lib version is lower than BIN file version
ERR_SEARCH_PRUNED 0xFA Search is being limited by maxTokens.
ERR_MEMORY_CORRUPT 0xFB RAM changed during application runtime.
ERR_NULL_POINTER 0xFC Fatal null pointer.
ERR_NOT_FINISHED 0xFD Recognition process has not finished.
ERR_NO_FREE_TOKENS 0xFE No free tokens left.
ERR_LICENSE 0xFF License is not valid or license limits have been reached.