libTLK
1.3.1
|
Data Structures | |
struct | tLFeatureExtractor |
Feature extractor. More... | |
struct | tLMuStd |
Used to calculate and store the mean and the standard deviation of real feature vectors. More... | |
Functions | |
tL_extract_features (tLFeatureExtractor *fext, const double *input, int length, int infreq, tLFea *output) | |
Extracts features. | |
tL_feature_extractor_free (tLFeatureExtractor *fext) | |
Frees memory. | |
tL_feature_extractor_new (void) | |
Gets a tLFeatureExtractor. | |
tL_mustd_accum (tLMuStd *mustd, const tLFea *fea) | |
Accumulates statistics. | |
tL_mustd_calc (tLMuStd *mustd) | |
Calculates the mean and the standard deviations. | |
tL_mustd_free (tLMuStd *mustd) | |
Frees memory. | |
tL_mustd_init (tLMuStd *mustd) | |
Initializes a tLMuStd structure. | |
tL_mustd_new (const unsigned int D) | |
Allocs a new tLMuStd structure. | |
tL_mustd_new_from_file (gzFile from, char **err) | |
Reads the mean and standard deviation. | |
tL_mustd_print (const tLMuStd *mustd, FILE *to) | |
Prints the mean and standard deviation. |
tL_extract_features | ( | tLFeatureExtractor * | fext, |
const double * | input, | ||
int | length, | ||
int | infreq, | ||
tLFea * | output | ||
) |
Extracts features.
This functions transforms an input sound wave, stored as a sequence of doubles, into a sequence of feature vectors. Feature extraction parameters are stored in the feature extractor.
fext | The feature extractor. |
input | Input sound wave. |
length | Length of the input. |
infreq | Input frequency in Hz. |
fea | Feature vector managers to which the output will be stored. |
tL_feature_extractor_free | ( | tLFeatureExtractor * | fext | ) |
Frees memory.
Frees the memory allocated for the feature extractor.
fext | The feature extractor. |
tL_feature_extractor_new | ( | void | ) |
Gets a tLFeatureExtractor.
This function creates a feature extractor. Parameters are initialized to their default values.
tL_mustd_accum | ( | tLMuStd * | mustd, |
const tLFea * | fea | ||
) |
Accumulates statistics.
This function is used to accumulate statistics, from the provided feature vectors, for the calculation of the mean and the standard deviation. The mu and std fields are used to store these statistics provisionally. The feature vectors must be of dimension D and type TL_FEA_REAL.
mustd | The tLMuStd structure. |
fea | The feature vectors. |
tL_mustd_calc | ( | tLMuStd * | mustd | ) |
Calculates the mean and the standard deviations.
This function calculates the mean and the standard deviation using the statistics in the structure.
mustd | The tLMuStd structure. |
tL_mustd_free | ( | tLMuStd * | mustd | ) |
tL_mustd_init | ( | tLMuStd * | mustd | ) |
tL_mustd_new | ( | const unsigned int | D | ) |
Allocs a new tLMuStd structure.
This function allocates memory for new tLMuStd values, which will be used to estimate the mean and the standard deviation of real feature vectors of the given dimension. The new structure is always intialized using tL_mustd_init.
D | The dimension of the real fature vectors. |
tL_mustd_new_from_file | ( | gzFile | from, |
char ** | err | ||
) |
Reads the mean and standard deviation.
This function allocates memory for new tLMuStd values, and initializes them using the values from the provided text description.
from | File where the text description is stored. |
err | Pointer to string variable. If not NULL, an error message is allocated in the variable in case of error. |
tL_mustd_print | ( | const tLMuStd * | mustd, |
FILE * | to | ||
) |
Prints the mean and standard deviation.
This function writes to the given file the current value for mean and standard deviation.
lexicon | The tLMuStd structure. |
to | File to which the mean and standard deviation will be written. |