Error codesΒΆ

Below is the definition for all error codes used in the API, their numerical values, and a human readable description.


#define STT_FOR_EACH_ERROR(APPLY) \
  APPLY(STT_ERR_OK,                      0x0000, "No error.") \
  APPLY(STT_ERR_NO_MODEL,                0x1000, "Missing model information.") \
  APPLY(STT_ERR_INVALID_ALPHABET,        0x2000, "Invalid alphabet embedded in model. (Data corruption?)") \
  APPLY(STT_ERR_INVALID_SHAPE,           0x2001, "Invalid model shape.") \
  APPLY(STT_ERR_INVALID_SCORER,          0x2002, "Invalid scorer file.") \
  APPLY(STT_ERR_MODEL_INCOMPATIBLE,      0x2003, "Incompatible model.") \
  APPLY(STT_ERR_SCORER_NOT_ENABLED,      0x2004, "External scorer is not enabled.") \
  APPLY(STT_ERR_SCORER_UNREADABLE,       0x2005, "Could not read scorer file.") \
  APPLY(STT_ERR_SCORER_INVALID_LM,       0x2006, "Could not recognize language model header in scorer.") \
  APPLY(STT_ERR_SCORER_NO_TRIE,          0x2007, "Reached end of scorer file before loading vocabulary trie.") \
  APPLY(STT_ERR_SCORER_INVALID_TRIE,     0x2008, "Invalid magic in trie header.") \
  APPLY(STT_ERR_SCORER_VERSION_MISMATCH, 0x2009, "Scorer file version does not match expected version.") \
  APPLY(STT_ERR_FAIL_INIT_MMAP,          0x3000, "Failed to initialize memory mapped model.") \
  APPLY(STT_ERR_FAIL_INIT_SESS,          0x3001, "Failed to initialize the session.") \
  APPLY(STT_ERR_FAIL_INTERPRETER,        0x3002, "Interpreter failed.") \
  APPLY(STT_ERR_FAIL_RUN_SESS,           0x3003, "Failed to run the session.") \
  APPLY(STT_ERR_FAIL_CREATE_STREAM,      0x3004, "Error creating the stream.") \
  APPLY(STT_ERR_FAIL_READ_PROTOBUF,      0x3005, "Error reading the proto buffer model file.") \
  APPLY(STT_ERR_FAIL_CREATE_SESS,        0x3006, "Failed to create session.") \
  APPLY(STT_ERR_FAIL_CREATE_MODEL,       0x3007, "Could not allocate model state.") \
  APPLY(STT_ERR_FAIL_INSERT_HOTWORD,     0x3008, "Could not insert hot-word.") \
  APPLY(STT_ERR_FAIL_CLEAR_HOTWORD,      0x3009, "Could not clear hot-words.") \
  APPLY(STT_ERR_FAIL_ERASE_HOTWORD,      0x3010, "Could not erase hot-word.")