SR_RecognizerResult API functions


Detailed Description

Recognition result.


Data Structures

struct  SR_RecognizerResult

Functions

SREC_RECOGNIZER_API
ESR_ReturnCode 
SR_RecognizerResultGetWaveform (const SR_RecognizerResult *self, const asr_int16_t **waveform, size_t *size)
SREC_RECOGNIZER_API
ESR_ReturnCode 
SR_RecognizerResultGetSize (const SR_RecognizerResult *self, size_t *resultSize)
SREC_RECOGNIZER_API
ESR_ReturnCode 
SR_RecognizerResultGetKeyCount (const SR_RecognizerResult *self, const size_t nbest, size_t *count)
SREC_RECOGNIZER_API
ESR_ReturnCode 
SR_RecognizerResultGetKeyList (const SR_RecognizerResult *self, const size_t nbest, LCHAR **list, size_t *listSize)
SREC_RECOGNIZER_API
ESR_ReturnCode 
SR_RecognizerResultGetValue (const SR_RecognizerResult *self, const size_t nbest, const LCHAR *key, LCHAR *value, size_t *len)
SREC_RECOGNIZER_API
ESR_ReturnCode 
SR_RecognizerResultGetLocale (const SR_RecognizerResult *self, ESR_Locale *locale)


Function Documentation

SREC_RECOGNIZER_API ESR_ReturnCode SR_RecognizerResultGetKeyCount ( const SR_RecognizerResult self,
const size_t  nbest,
size_t *  count 
)

Returns number of [key, value] pairs in the current results.

Parameters:
nbest Index of n-best list element (0-based)
self SemanticResult handler
count The number keys
Returns:
ESR_INVALID_ARGUMENT if self is null

SREC_RECOGNIZER_API ESR_ReturnCode SR_RecognizerResultGetKeyList ( const SR_RecognizerResult self,
const size_t  nbest,
LCHAR **  list,
size_t *  listSize 
)

Given an array of pointers to LCHAR*, populates that array with pointers to the keys used internally by the recognition result. These keys should not be modified!

Parameters:
self SemanticResult handler
nbest Index of n-best list element (0-based)
list [out] List of keys associated with n-best list entry.
listSize [in/out] Size of list. If the return code is ESR_BUFFER_OVERFLOW, the required size is returned in this variable.
Returns:
ESR_INVALID_ARGUMENT if self or list are null; ESR_OUT_OF_BOUNDS if nbest entry does not exist; ESR_BUFFER_OVERFLOW if the list that was passed in was too small

SREC_RECOGNIZER_API ESR_ReturnCode SR_RecognizerResultGetLocale ( const SR_RecognizerResult self,
ESR_Locale locale 
)

Returns locale of grammar that produced this result

Parameters:
self SR_RecognizerResult handle
locale The locale associated with the result
Returns:
ESR_INVALID_ARGUMENT if self is null

SREC_RECOGNIZER_API ESR_ReturnCode SR_RecognizerResultGetSize ( const SR_RecognizerResult self,
size_t *  resultSize 
)

Returns number of entries in the n-best list.

Parameters:
self RecognizerResult handler
resultSize [out] Number of entries
Returns:
ESR_INVALID_ARGUMENT if self is null

SREC_RECOGNIZER_API ESR_ReturnCode SR_RecognizerResultGetValue ( const SR_RecognizerResult self,
const size_t  nbest,
const LCHAR key,
LCHAR value,
size_t *  len 
)

Returns copy of semantic value.

Parameters:
self SemanticResult handler
nbest Index of n-best list element (0-based)
key The key to look up
value [out] The buffer used to hold the resulting value
len [in/out] Length of value argument. If the return code is ESR_BUFFER_OVERFLOW, the required length is returned in this variable.
Returns:
ESR_INVALID_ARGUMENT if self or list are null; ESR_OUT_OF_BOUNDS if nbest entry does not exist; ESR_BUFFER_OVERFLOW if the buffer that was passed in was too small

SREC_RECOGNIZER_API ESR_ReturnCode SR_RecognizerResultGetWaveform ( const SR_RecognizerResult self,
const asr_int16_t **  waveform,
size_t *  size 
)

Returns the endpointed waveform that was used for recognition. This returns a read-only buffer, and may not be modified externally.

Parameters:
self RecognizerResult handler
waveform [out] Waveform buffer
size [out] Size of waveform buffer (in bytes)
Returns:
ESR_INVALID_ARGUMENT if self, or waveform are null


Generated on Thu May 1 15:37:26 2008 for SREC by  doxygen 1.5.3