libTLK  1.3.1
Data Structures | Functions
Feature extraction
Algorithms

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.

Function Documentation

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.

Parameters:
fextThe feature extractor.
inputInput sound wave.
lengthLength of the input.
infreqInput frequency in Hz.
feaFeature vector managers to which the output will be stored.

Frees memory.

Frees the memory allocated for the feature extractor.

Parameters:
fextThe feature extractor.

Gets a tLFeatureExtractor.

This function creates a feature extractor. Parameters are initialized to their default values.

Returns:
The new feature extractor.
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.

Parameters:
mustdThe tLMuStd structure.
feaThe 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.

Parameters:
mustdThe tLMuStd structure.
tL_mustd_free ( tLMuStd mustd)

Frees memory.

Frees the memory allocated for a tLMuStd.

Parameters:
mustdThe tLMuStd structure.
tL_mustd_init ( tLMuStd mustd)

Initializes a tLMuStd structure.

This function initializes the mean and standard deviation values to zero.

Parameters:
mustdThe tLMuStd structure.
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.

Parameters:
DThe dimension of the real fature vectors.
Returns:
The new tLMuStd structure.
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.

Parameters:
fromFile where the text description is stored.
errPointer to string variable. If not NULL, an error message is allocated in the variable in case of error.
Returns:
The new tLMuStd structure, or NULL 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.

Parameters:
lexiconThe tLMuStd structure.
toFile to which the mean and standard deviation will be written.
 All Data Structures Variables