libTLK  1.3.1
Data Structures | Functions
Alignment of samples with symbol sequences
Algorithms

Data Structures

struct  tLSegment
 Alignment. More...

Functions

 tL_aligner_free (tLAligner *aligner)
 Frees memory.
 tL_aligner_new (tLAModel *amodel, const tLSeqs *seqs, const tLBool statealign, char **err)
 Gets a tLAligner.
 tL_align (tLAligner *aligner, const tLFea *fea, const size_t seq, tLSegment **alignment, size_t *size, tLFloat *prob)
 Aligns a sample with a symbol sequence.

Function Documentation

tL_align ( tLAligner *  aligner,
const tLFea fea,
const size_t  seq,
tLSegment **  alignment,
size_t *  size,
tLFloat prob 
)

Aligns a sample with a symbol sequence.

This function finds the maximum probability path of a given sample, feature vector sequence, for a provided symbol sequence, and gets the alignment. The sequence is specified as integer code according to the sequence manager used during the creation of the aligner. The resulting alignment is returned into the variable alignment. The alignment is terminated with a tLSegment with length -1. If alignment points to NULL, the needed memory is allocated and the number of allocated segments is stored in the variable size. If alignment doesn't point to NULL, then alignment will be reallocated if needed, according to the value stored in size, and the variable size will be updated.

Parameters:
alignerThe aligner.
feaA feature vector manager, which must contain a sequence of feature vectors of an adequate type for the amodel.
seqThe code of the symbol sequence which will be aligned.
alignmentPointer to the address where the alignment will be stored. It can be pointed to NULL.
sizeMemory address where the number of allocated segments of alignment is stored.
probThe probability of the sample.
Returns:
0 if the sample has been successfully aligned, -1 otherwise.
tL_aligner_free ( tLAligner *  aligner)

Frees memory.

Frees the memory allocated for the aligner.

Parameters:
alignerThe aligner
tL_aligner_new ( tLAModel amodel,
const tLSeqs seqs,
const tLBool  statealign,
char **  err 
)

Gets a tLAligner.

This function creates an aligner used to align samples with symbol sequences. This data can only be used to align samples, using the provided acoustic model, with the symbol sequences stored in seqs during the creation of the aligner. Alignment can be done at symbol level or state level. This structure stores a reference to the provided acoustic model and sequence manager, thus, the acoustic model and sequence manager must not be freed. Currently supported types are: Bernoulli, DGaussian, Mixture and TiedStates.

Parameters:
amodelThe acoustic model.
seqsA symbol sequence manager containing the symbol sequences which can be used to align samples.
statealignIf TRUE, alignment is performed at state level; else, at symbol level.
errPointer to string variable. If not NULL, an error message is allocated in the variable in case of error.
Returns:
Aligner or NULL in case of error.
 All Data Structures Variables