libTLK  1.3.1
Data Structures | Enumerations | Functions
Recognition of samples
Algorithms

Data Structures

struct  tLRecWord
 Recognized word. More...
struct  tLRecStats
 Recognition statistics. More...

Enumerations

enum  tLRecAlignType { TL_REC_ALIGN_NONE, TL_REC_ALIGN_WORDS, TL_REC_ALIGN_SYMS }
 Recognition alignment type. More...

Functions

 tL_recogniser_free (tLRecogniser *rec)
 Frees memory.
 tL_recogniser_new (const tLAModel *amodel, const tLLexicon *lexicon, const tLLM *lm, const tLBool viterbi_states, const unsigned int wordgraph_density, const unsigned int lookahead_capacity, const unsigned int lookahead_depth, const unsigned int sil, char **err)
 Gets a tLRecogniser.
 tL_recognise (tLRecogniser *recogniser, const tLFea *fea, tLRecWord **rec, size_t *size, tLWordGraph **wg, tLRecStats *stats)
 Recognizes a sample.

Enumeration Type Documentation

Recognition alignment type.

Type of alignment using during recognition.

Enumerator:
TL_REC_ALIGN_NONE 

Recognize without aligning.

TL_REC_ALIGN_WORDS 

Align words.

TL_REC_ALIGN_SYMS 

Align words and symbols.


Function Documentation

tL_recognise ( tLRecogniser *  recogniser,
const tLFea fea,
tLRecWord **  rec,
size_t *  size,
tLWordGraph **  wg,
tLRecStats stats 
)

Recognizes a sample.

This function finds the maximum probability path of a given sample, feature vector sequence, for a provided recognizer. The resulting recognition is returned into the variable rec. The recognition is terminated with a tLRecoWord with a NULL symbol sequence. If rec points to NULL, the needed memory is allocated and the number of allocated words is stored in the variable size. If rec doesn't point to NULL, then rec will be reallocated if needed, according to the value stored in size, and the variable size will be updated.

Parameters:
recogniserThe recognizer.
feaA feature vector manager, which must contain a sequence of feature vectors of an adequate type for the amodel.
recPointer to the address where the recognition will be stored. It can point to NULL.
sizeMemory address where the number of allocated words of the recognition is stored.
wgPointer to the address of a word graph structure where the generated word graph will be stored. If the address is NULL, a new word graph is allocated. The value of this variable is ignored if no word graph is generated during the recognition process.
statsPointer to a RecStats structure, used to store statistics from the recognition process. It can be NULL.
Returns:
0 if the sample has been recognized, -1 otherwise.
tL_recogniser_free ( tLRecogniser *  rec)

Frees memory.

Frees the memory allocated for the recognizer.

Parameters:
recThe recognizer.
tL_recogniser_new ( const tLAModel amodel,
const tLLexicon lexicon,
const tLLM lm,
const tLBool  viterbi_states,
const unsigned int  wordgraph_density,
const unsigned int  lookahead_capacity,
const unsigned int  lookahead_depth,
const unsigned int  sil,
char **  err 
)

Gets a tLRecogniser.

This function creates a recognizer used to recognize samples. By default, recognition is carried out by embedding the HMMs into the states of the language model; however, when the language model is a back-off model, HMMs can be optionally embedded into the edges and the lexicon internally represented as a prefix tree, which can entail a faster recognition process. By default, the Viterbi approach, that is, the replacement of operator $\sum$ by operator $\max$, is only applied at state transition level. If desired, the Viterbi approach can be also applied to the emission probability functions. Currently supported types are: Bernoulli, DGaussian, Mixture and TiedStates.

Parameters:
amodelThe acoustic model.
lexiconThe lexicon model.
lmThe language model.
viterbi_statesIf TRUE, the viterbi approach is also applied inside the emission probability functions.
wordgraph_densityA positive number indicates that a word graph with that number of incoming hypothesis in each state will be generated. A zero value indicates that no word graph will be generated. Currently, word graphs can only be generated using back-off LMs.
lookahead_capacityIndicates the capacity of the lookahead cache. A zero value means lookahead disabled. Currently, lookahead only works with back-off LMs.
lookahead_depthIndicates the depth of the n-grams used in look-ahead, i.e., 1 refers to unigrams, 2 for bigrams, etc. 0 to the order of the language model.
silIf it is a valid symbol (sil<amodel->N), it is the symbol used as silence, which would be inserted between words. Otherwise, any symbol is used as silence.
errPointer to string variable. If not NULL, an error message is allocated in the variable in case of error.
Returns:
Auxiliary data, or NULL in case of error.
 All Data Structures Variables