libTLK
1.3.1
|
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. |
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.
aligner | The aligner. |
fea | A feature vector manager, which must contain a sequence of feature vectors of an adequate type for the amodel. |
seq | The code of the symbol sequence which will be aligned. |
alignment | Pointer to the address where the alignment will be stored. It can be pointed to NULL. |
size | Memory address where the number of allocated segments of alignment is stored. |
prob | The probability of the sample. |
tL_aligner_free | ( | tLAligner * | aligner | ) |
Frees memory.
Frees the memory allocated for the aligner.
aligner | The 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.
amodel | The acoustic model. |
seqs | A symbol sequence manager containing the symbol sequences which can be used to align samples. |
statealign | If TRUE, alignment is performed at state level; else, at symbol level. |
err | Pointer to string variable. If not NULL, an error message is allocated in the variable in case of error. |