Data Fields | |
ESR_ReturnCode(* | start )(struct SR_Recognizer_t *self) |
ESR_ReturnCode(* | stop )(struct SR_Recognizer_t *self) |
ESR_ReturnCode(* | destroy )(struct SR_Recognizer_t *self) |
ESR_ReturnCode(* | setup )(struct SR_Recognizer_t *self) |
ESR_ReturnCode(* | unsetup )(struct SR_Recognizer_t *self) |
ESR_ReturnCode(* | isSetup )(struct SR_Recognizer_t *self, ESR_BOOL *isSetup) |
ESR_ReturnCode(* | getParameter )(struct SR_Recognizer_t *self, const LCHAR *key, LCHAR *value, size_t *len) |
ESR_ReturnCode(* | getSize_tParameter )(struct SR_Recognizer_t *self, const LCHAR *key, size_t *value) |
ESR_ReturnCode(* | getBoolParameter )(struct SR_Recognizer_t *self, const LCHAR *key, ESR_BOOL *value) |
ESR_ReturnCode(* | setParameter )(struct SR_Recognizer_t *self, const LCHAR *key, LCHAR *value) |
ESR_ReturnCode(* | setSize_tParameter )(struct SR_Recognizer_t *self, const LCHAR *key, size_t value) |
ESR_ReturnCode(* | setBoolParameter )(struct SR_Recognizer_t *self, const LCHAR *key, ESR_BOOL value) |
ESR_ReturnCode(* | setupRule )(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar, const LCHAR *ruleName) |
ESR_ReturnCode(* | hasSetupRules )(struct SR_Recognizer_t *self, ESR_BOOL *hasSetupRules) |
ESR_ReturnCode(* | activateRule )(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar, const LCHAR *ruleName, unsigned int weight) |
ESR_ReturnCode(* | deactivateRule )(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar, const LCHAR *ruleName) |
ESR_ReturnCode(* | deactivateAllRules )(struct SR_Recognizer_t *self) |
ESR_ReturnCode(* | isActiveRule )(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar, const LCHAR *ruleName, ESR_BOOL *isActiveRule) |
ESR_ReturnCode(* | setWordAdditionCeiling )(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar) |
ESR_ReturnCode(* | checkGrammarConsistency )(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar, ESR_BOOL *isConsistent) |
ESR_ReturnCode(* | getModels )(struct SR_Recognizer_t *self, SR_AcousticModels **pmodels) |
ESR_ReturnCode(* | putAudio )(struct SR_Recognizer_t *self, asr_int16_t *buffer, size_t *bufferSize, ESR_BOOL isLast) |
ESR_ReturnCode(* | advance )(struct SR_Recognizer_t *self, SR_RecognizerStatus *status, SR_RecognizerResultType *type, SR_RecognizerResult **result) |
ESR_ReturnCode(* | loadUtterance )(struct SR_Recognizer_t *self, const LCHAR *filename) |
ESR_ReturnCode(* | loadWaveFile )(struct SR_Recognizer_t *self, const LCHAR *filename) |
ESR_ReturnCode(* | logToken )(struct SR_Recognizer_t *self, const LCHAR *token, const LCHAR *value) |
ESR_ReturnCode(* | logTokenInt )(struct SR_Recognizer_t *self, const LCHAR *token, int value) |
ESR_ReturnCode(* | logEvent )(struct SR_Recognizer_t *self, const LCHAR *event) |
ESR_ReturnCode(* | logSessionStart )(struct SR_Recognizer_t *self, const LCHAR *sessionName) |
ESR_ReturnCode(* | logSessionEnd )(struct SR_Recognizer_t *self) |
ESR_ReturnCode(* | logWaveformData )(struct SR_Recognizer_t *self, const LCHAR *waveformFilename, const LCHAR *transcription, const double bos, const double eos, ESR_BOOL isInvocab) |
ESR_ReturnCode(* | setLockFunction )(struct SR_Recognizer_t *self, SR_RecognizerLockFunction function, void *data) |
ESR_ReturnCode(* | isSignalClipping )(struct SR_Recognizer_t *self, ESR_BOOL *isClipping) |
ESR_ReturnCode(* | isSignalDCOffset )(struct SR_Recognizer_t *self, ESR_BOOL *isDCOffset) |
ESR_ReturnCode(* | isSignalNoisy )(struct SR_Recognizer_t *self, ESR_BOOL *isNoisy) |
ESR_ReturnCode(* | isSignalTooQuiet )(struct SR_Recognizer_t *self, ESR_BOOL *isTooQuiet) |
ESR_ReturnCode(* | isSignalTooFewSamples )(struct SR_Recognizer_t *self, ESR_BOOL *isTooFewSamples) |
ESR_ReturnCode(* | isSignalTooManySamples )(struct SR_Recognizer_t *self, ESR_BOOL *isTooManySamples) |
ESR_ReturnCode(* SR_Recognizer::start)(struct SR_Recognizer_t *self) |
Starts recognition.
self | SR_Recognizer handle |
ESR_ReturnCode(* SR_Recognizer::stop)(struct SR_Recognizer_t *self) |
Stops the recognizer and invalidates the recognition result object. Calling this function before the recognizer receives the last frame causes the recognition to abort.
self | SR_Recognizer handle |
ESR_ReturnCode(* SR_Recognizer::destroy)(struct SR_Recognizer_t *self) |
Destroy a recognizer.
self | SR_Recognizer handle |
ESR_ReturnCode(* SR_Recognizer::setup)(struct SR_Recognizer_t *self) |
Associates a set of models with the recognizer.
self | SR_Recognizer handle |
ESR_ReturnCode(* SR_Recognizer::unsetup)(struct SR_Recognizer_t *self) |
Unconfigures recognizer.
self | SR_Recognizer handle |
ESR_ReturnCode(* SR_Recognizer::isSetup)(struct SR_Recognizer_t *self, ESR_BOOL *isSetup) |
Indicates whether recognizer is configured for use.
self | SR_Recognizer handle | |
isSetup | True if recognizer is configured |
ESR_ReturnCode(* SR_Recognizer::getParameter)(struct SR_Recognizer_t *self, const LCHAR *key, LCHAR *value, size_t *len) |
Returns copy of LCHAR recognition parameter.
self | SR_Recognizer handle | |
key | Parameter name | |
value | [out] Used to hold the parameter value | |
len | [in/out] Length of value argument. If the return code is ESR_BUFFER_OVERFLOW, the required length is returned in this variable. |
ESR_ReturnCode(* SR_Recognizer::getSize_tParameter)(struct SR_Recognizer_t *self, const LCHAR *key, size_t *value) |
Return copy of size_t recognition parameter.
self | SR_Recognizer handle | |
key | Parameter name | |
value | [out] Used to hold the parameter value |
ESR_ReturnCode(* SR_Recognizer::getBoolParameter)(struct SR_Recognizer_t *self, const LCHAR *key, ESR_BOOL *value) |
Return copy of BOOL recognition parameter.
self | SR_Recognizer handle | |
key | Parameter name | |
value | [out] Used to hold the parameter value |
ESR_ReturnCode(* SR_Recognizer::setParameter)(struct SR_Recognizer_t *self, const LCHAR *key, LCHAR *value) |
Sets recognition parameters.
Key: Description of associated value
VoiceEnrollment If "true", the next recognition will produce data required for Nametag support (i.e. Aurora bitstream).
self | SR_Recognizer handle | |
key | Parameter name | |
value | Parameter value |
ESR_ReturnCode(* SR_Recognizer::setSize_tParameter)(struct SR_Recognizer_t *self, const LCHAR *key, size_t value) |
Sets recognition parameters.
self | SR_Recognizer handle | |
key | Parameter name | |
value | Parameter value |
ESR_ReturnCode(* SR_Recognizer::setBoolParameter)(struct SR_Recognizer_t *self, const LCHAR *key, ESR_BOOL value) |
Sets recognition parameters.
self | SR_Recognizer handle | |
key | Parameter name | |
value | Parameter value |
ESR_ReturnCode(* SR_Recognizer::setupRule)(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar, const LCHAR *ruleName) |
Recognizer may be set up with multiple Grammars and multiple rules. All grammars must be unsetup before the recognizer can be destroy. A pre-compiled Grammar should have undergone a model consistency check with the recognizer prior to this call.
self | SR_Recognizer handle | |
grammar | Grammar containing rule | |
ruleName | Name of rule to associate with recognizer |
ESR_ReturnCode(* SR_Recognizer::hasSetupRules)(struct SR_Recognizer_t *self, ESR_BOOL *hasSetupRules) |
Indicates if Recognizer is configured with any rules within the specified Grammar.
self | SR_Recognizer handle | |
hasSetupRules | True if the Recognizer is configured for the Grammar |
ESR_ReturnCode(* SR_Recognizer::activateRule)(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar, const LCHAR *ruleName, unsigned int weight) |
Activates rule in recognizer.
self | SR_Recognizer handle | |
grammar | Grammar containing rule | |
ruleName | Name of rule | |
weight | Relative weight to assign to self grammar vs. other activated grammars. Values: Integers 0-2^31. |
ESR_ReturnCode(* SR_Recognizer::deactivateRule)(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar, const LCHAR *ruleName) |
Deactivates rule in recognizer.
self | SR_Recognizer handle | |
grammar | Grammar containing rule | |
ruleName | Name of root rule |
ESR_ReturnCode(* SR_Recognizer::deactivateAllRules)(struct SR_Recognizer_t *self) |
Deactivates all grammar rules in recognizer.
self | SR_Recognizer handle |
ESR_ReturnCode(* SR_Recognizer::isActiveRule)(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar, const LCHAR *ruleName, ESR_BOOL *isActiveRule) |
Indicates if rule is active in recognizer.
self | SR_Recognizer handle | |
grammar | Grammar containing rule | |
ruleName | Name of rule | |
isActiveRule | True if rule is active |
ESR_ReturnCode(* SR_Recognizer::setWordAdditionCeiling)(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar) |
Configures the grammar for maximum amount of word addition
self | SR_Recognizer handle | |
grammar | Grammar whose ceiling to be set |
ESR_ReturnCode(* SR_Recognizer::checkGrammarConsistency)(struct SR_Recognizer_t *self, struct SR_Grammar_t *grammar, ESR_BOOL *isConsistent) |
Ensure the model usage in a pre-compiled grammar is consistent with the models that are associated with the Recognizer. You must first have called Recognizer_Setup().
self | SR_Recognizer handle | |
grammar | Grammar to check against | |
isConsistent | True if rule is consistent |
ESR_ReturnCode(* SR_Recognizer::getModels)(struct SR_Recognizer_t *self, SR_AcousticModels **pmodels) |
Ensure the model usage in a pre-compiled grammar is consistent with the models that are associated with the Recognizer. You must first have called Recognizer_Setup().
self | SR_Recognizer handle | |
grammar | Grammar to check against | |
isConsistent | True if rule is consistent |
ESR_ReturnCode(* SR_Recognizer::putAudio)(struct SR_Recognizer_t *self, asr_int16_t *buffer, size_t *bufferSize, ESR_BOOL isLast) |
Get audio into the recognizer.
We decouple the Audio and frontend processing from the Recognizer processing via an internal FIFO frame buffer (aka utterance buffer). This ensures that this call is at least as fast as real time so that voicing events are not unduly delayed. The audio buffer size must be at least one frame buffer's worth and some reasonable maximum size for synchronous behaviour. This function may be called independently of Recognizer_Advance.
self | SR_Recognizer handle | |
buffer | Buffer containing audio data | |
bufferSize | [in/out] Size of buffer in samples. In case of a buffer overflow, ESR_BUFFER_OVERFLOW is returned and this value holds the actual amount of samples that were pushed. | |
isLast | Indicates if the audio frame is the last one in this recognition |
ESR_ReturnCode(* SR_Recognizer::advance)(struct SR_Recognizer_t *self, SR_RecognizerStatus *status, SR_RecognizerResultType *type, SR_RecognizerResult **result) |
Advance the recognizer by at least one utterance frame. The number of frames advanced depends on the underlying definition. We anticipate that the recognizer will keep up with the supplied audio buffers when waiting for voicing. After this point, the number of frames may be one (for our default frame-advance mode) or it may be more if the synchronous nature of this operation is not considered a problem. The recognizer may be advanced independently of the Recognizer_PutAudio call. It is permissible to advance when there is no further data. A stop condition could be an appropriate consequence.
self | Recognizer handle | |
status | Resulting recognizer status | |
type | Resulting recognition result type | |
result | Resulting recognizer result |
ESR_ReturnCode(* SR_Recognizer::loadUtterance)(struct SR_Recognizer_t *self, const LCHAR *filename) |
Loads utterance from file.
self | SR_Recognizer handle | |
filename | File to read from |
ESR_ReturnCode(* SR_Recognizer::loadWaveFile)(struct SR_Recognizer_t *self, const LCHAR *filename) |
Loads utterance from WAVE file.
self | SR_Recognizer handle | |
filename | WAVE file to read from |
ESR_ReturnCode(* SR_Recognizer::logToken)(struct SR_Recognizer_t *self, const LCHAR *token, const LCHAR *value) |
Log recognizer-related event token.
self | SR_Recognizer handle | |
event | Token name | |
value | Value to be logged |
ESR_ReturnCode(* SR_Recognizer::logTokenInt)(struct SR_Recognizer_t *self, const LCHAR *token, int value) |
Log recognizer-related event token integer.
self | SR_Recognizer handle | |
event | Token name | |
value | Value to be logged |
ESR_ReturnCode(* SR_Recognizer::logEvent)(struct SR_Recognizer_t *self, const LCHAR *event) |
Log recognizer-related event and dump all previously accumulated tokens since last event to log.
self | SR_Recognizer handle | |
event | Event name |
ESR_ReturnCode(* SR_Recognizer::logSessionStart)(struct SR_Recognizer_t *self, const LCHAR *sessionName) |
Log the beginning of a new log session. A log session contains zero or more recognitions (transactions) and it is up to the application to decided when the session ends and a new one begins (e.g. timeout, number of recognitions, etc.)
self | SR_Recognizer handle | |
sessionName | Session name |
ESR_ReturnCode(* SR_Recognizer::logSessionEnd)(struct SR_Recognizer_t *self) |
Log the end of a log session.
self | SR_Recognizer handle |
ESR_ReturnCode(* SR_Recognizer::logWaveformData)(struct SR_Recognizer_t *self, const LCHAR *waveformFilename, const LCHAR *transcription, const double bos, const double eos, ESR_BOOL isInvocab) |
Log data about a waveform obtained from a TCP file. This function is not called when doing live recognition.
self | SR_Recognizer handle | |
waveformFilename | Session name | |
transcription | Transcription for the utterance | |
bos | Beginning of speech (seconds) | |
eos | End of speech (seconds) | |
isInvocab | True if the transcription is accepted by the grammar, False otherwise |
ESR_ReturnCode(* SR_Recognizer::setLockFunction)(struct SR_Recognizer_t *self, SR_RecognizerLockFunction function, void *data) |
Associates a locking function with the recognizer. This function is used to protect internal data from multithreaded access.
self | SR_Recognizer handle | |
function | Locking function | |
data | Function data |
ESR_ReturnCode(* SR_Recognizer::isSignalClipping)(struct SR_Recognizer_t *self, ESR_BOOL *isClipping) |
Indicates if signal is getting clipped.
self | SR_Recognizer handle | |
isClipping | [out] Result value |
ESR_ReturnCode(* SR_Recognizer::isSignalDCOffset)(struct SR_Recognizer_t *self, ESR_BOOL *isDCOffset) |
Indicates if signal has a DC-offset component.
self | SR_Recognizer handle | |
isDCOffset | [out] Result value |
ESR_ReturnCode(* SR_Recognizer::isSignalNoisy)(struct SR_Recognizer_t *self, ESR_BOOL *isNoisy) |
Indicates if signal is noisy.
self | SR_Recognizer handle | |
isNoisy | [out] Result value |
ESR_ReturnCode(* SR_Recognizer::isSignalTooQuiet)(struct SR_Recognizer_t *self, ESR_BOOL *isTooQuiet) |
Indicates if speech contained within the signal is too quiet.
self | SR_Recognizer handle | |
isTooQuiet | [out] Result value |
ESR_ReturnCode(* SR_Recognizer::isSignalTooFewSamples)(struct SR_Recognizer_t *self, ESR_BOOL *isTooFewSamples) |
Indicates if there are too few samples in the signal for a proper recognition.
self | SR_Recognizer handle | |
isTooFewSamples | [out] Result value |
ESR_ReturnCode(* SR_Recognizer::isSignalTooManySamples)(struct SR_Recognizer_t *self, ESR_BOOL *isTooManySamples) |
Indicates if there are too many samples in the signal for a proper recognition.
self | SR_Recognizer handle | |
isTooManySamples | [out] Result value |