libTLK
1.3.1
|
Defines | |
#define | tL_occupancies_free(occs) |
Frees occupancies. | |
Typedefs | |
typedef void | tLAMiCounts |
Integer counts for tLAModel. | |
typedef void | tLAMlogCounts |
Logarithmic counts for tLAModel. | |
typedef void | tLMixCounts |
Mixture coefficient counts. | |
Functions | |
tL_amicounts_accum (const tLAMiCounts *counts, const tLAModel *amodel, gzFile from, const tLBool binary, char **err) | |
Accumulates the integer counts from file. | |
tL_amicounts_free (tLAMiCounts *counts, const tLAModel *amodel) | |
Frees memory. | |
tL_amicounts_get_mixcounts (tLAMiCounts *counts, const tLAModel *amodel, char **err) | |
Returns the counts of the mixture coefficients. | |
tL_amicounts_init (tLAMiCounts *counts, const tLAModel *amodel) | |
Initializes the integer counts to 0. | |
tL_amicounts_init_hmm (tLAMiCounts *counts, const tLAModel *amodel, const unsigned int c) | |
Initializes the integer counts of an HMM to 0. | |
tL_amicounts_init_hmm_val (tLAMiCounts *counts, const tLAModel *amodel, const unsigned int c, const unsigned long val) | |
Initializes the integer counts of an HMM. | |
tL_amicounts_init_val (tLAMiCounts *counts, const tLAModel *amodel, const unsigned long val) | |
Initializes the integer counts. | |
tL_amicounts_new (const tLAModel *amodel) | |
Creates a new AMiCounts. | |
tL_amicounts_print (const tLAMiCounts *counts, const tLAModel *amodel, FILE *to, const tLBool binary) | |
Prints the integer counts. | |
tL_amicounts_read (const tLAMiCounts *counts, const tLAModel *amodel, gzFile from, const tLBool binary, char **err) | |
Reads the integer counts from file. | |
tL_amicounts_update_hmm (const tLAMiCounts *counts, tLAModel *amodel, const unsigned int c) | |
Update parameters of an HMM. | |
tL_amicounts_update_amodel (const tLAMiCounts *counts, tLAModel *amodel) | |
Update parameters. | |
tL_amlogcounts_accum (const tLAMlogCounts *counts, const tLAModel *amodel, gzFile from, const tLBool binary, char **err) | |
Accumulates the logarithmic counts from file. | |
tL_amlogcounts_accum_eps (const tLAMlogCounts *counts, const tLAModel *amodel, gzFile from, const tLFloat eps, const tLBool binary, char **err) | |
Interpolates current logarithmic counts with the logarithmic counts from file. | |
tL_amlogcounts_free (tLAMlogCounts *counts, const tLAModel *amodel) | |
Frees memory. | |
tL_amlogcounts_get_mixcounts (tLAMlogCounts *counts, const tLAModel *amodel, char **err) | |
Returns the counts of the mixture coefficients. | |
tL_amlogcounts_init (tLAMlogCounts *counts, const tLAModel *amodel) | |
Initializes the logarithmic counts to -INF. | |
tL_amlogcounts_init_hmm (tLAMiCounts *counts, const tLAModel *amodel, const unsigned int c) | |
Initializes the logarithmic counts of an HMM to -INF. | |
tL_amlogcounts_init_hmm_val (tLAMiCounts *counts, const tLAModel *amodel, const unsigned int c, const tLFloat val) | |
Initializes the logarithmic counts of an HMM. | |
tL_amlogcounts_init_val (tLAMlogCounts *counts, const tLAModel *amodel, const tLFloat val) | |
Initializes the logarithmic counts. | |
tL_amlogcounts_new (const tLAModel *amodel) | |
Creates a new AMlogCounts. | |
tL_amlogcounts_new_cmllr (const tLAModel *amodel) | |
Creates a new AMlogCounts for CMLLR. | |
tL_amlogcounts_new_mllr (const tLAModel *amodel) | |
Creates a new AMlogCounts for MLLR. | |
tL_amlogcounts_print (const tLAMlogCounts *counts, const tLAModel *amodel, FILE *to, const tLBool binary) | |
Prints the logarithmic counts. | |
tL_amlogcounts_read (const tLAMlogCounts *counts, const tLAModel *amodel, gzFile from, const tLBool binary, char **err) | |
Reads the logarithmic counts from file. | |
tL_amlogcounts_update_hmm (const tLAMlogCounts *counts, tLAModel *amodel, const unsigned int c) | |
Update parameters of an HMM. | |
tL_amlogcounts_update_amodel (const tLAMlogCounts *counts, tLAModel *amodel) | |
Update parameters. | |
tL_mixcounts_free (tLMixCounts *mcounts, const tLAModel *amodel) | |
Frees mixture counts. | |
tL_mixcounts_print (const tLMixCounts *mcounts, const tLAModel *amodel, const tLDict *syms, FILE *to) | |
Prints mixture counts. | |
tL_mixcounts_read (const tLAModel *amodel, gzFile from, char **err) | |
Reads mixture counts from file. | |
tL_occupancies_init (tLFloat **occs, const tLAModel *amodel) | |
Inits the occupancy values. | |
tL_occupancies_new (const tLAModel *amodel) | |
Allocs memory to store the occupancies. | |
tL_occupancies_print (tLFloat **occs, FILE *to, const tLAModel *amodel, const tLDict *syms) | |
Prints the occupancy values. |
#define tL_occupancies_free | ( | occs | ) |
do { \ free ( (occs)[0] ); \ free ( (occs) ); \ } while(0)
Frees occupancies.
This macro frees the memory allocated for the occupancies matrix.
occs | The occupancy values. |
typedef void tLAMiCounts |
Integer counts for tLAModel.
This opaque structure is used to store integer counts for a set of HMMs.
typedef void tLAMlogCounts |
Logarithmic counts for tLAModel.
This opaque structure is used to store logarithmic counts for a set of HMMs.
typedef void tLMixCounts |
Mixture coefficient counts.
This opaque structure is used to store the counts related to the mixture coefficients.
tL_amicounts_accum | ( | const tLAMiCounts * | counts, |
const tLAModel * | amodel, | ||
gzFile | from, | ||
const tLBool | binary, | ||
char ** | err | ||
) |
Accumulates the integer counts from file.
This function reads the integer counts from the provided file, in text or binary format, and then it accumulates the read counts over the current counts. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The integer counts. |
amodel | The acoustic model which was used to create the counts. |
from | File where the counts are stored. |
binary | If TRUE, stored counts are assumed to be in binary format; else, in text format. |
err | Pointer to string variable. If not NULL, an error message is allocated in the variable in case of error. |
tL_amicounts_free | ( | tLAMiCounts * | counts, |
const tLAModel * | amodel | ||
) |
Frees memory.
Frees the memory allocated for the integer counts. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The integer counts to free. |
amodel | The acoustic model which was used to create the counts. |
tL_amicounts_get_mixcounts | ( | tLAMiCounts * | counts, |
const tLAModel * | amodel, | ||
char ** | err | ||
) |
Returns the counts of the mixture coefficients.
This function is only applicable to HMMs of type Mixture or TiedState Mixture.
counts | The integer counts. |
amodel | The acoustic model. |
err | Pointer to string variable. If not NULL, an error message is allocated in the variable in case of error. |
tL_amicounts_init | ( | tLAMiCounts * | counts, |
const tLAModel * | amodel | ||
) |
Initializes the integer counts to 0.
Initializes the integer counts to 0. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The integer counts to initialize. |
amodel | The acoustic model which was used to create the counts. |
tL_amicounts_init_hmm | ( | tLAMiCounts * | counts, |
const tLAModel * | amodel, | ||
const unsigned int | c | ||
) |
Initializes the integer counts of an HMM to 0.
Initializes the integer counts of the designated HMM to 0. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The integer counts to initialize. |
amodel | The acoustic model which was used to create the counts. |
c | HMM to be initialized. |
tL_amicounts_init_hmm_val | ( | tLAMiCounts * | counts, |
const tLAModel * | amodel, | ||
const unsigned int | c, | ||
const unsigned long | val | ||
) |
Initializes the integer counts of an HMM.
Initializes the integer counts of the designated HMM to val. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The integer counts to initialize. |
amodel | The acoustic model which was used to create the counts. |
c | HMM to be initialized. |
val | Value. |
tL_amicounts_init_val | ( | tLAMiCounts * | counts, |
const tLAModel * | amodel, | ||
const unsigned long | val | ||
) |
Initializes the integer counts.
Initializes the integer counts to val. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The integer counts to initialize. |
amodel | The acoustic model which was used to create the counts. |
val | Value. |
tL_amicounts_new | ( | const tLAModel * | amodel | ) |
Creates a new AMiCounts.
Creates a new AMiCounts to store the integer counts of the parameters of the provided HMMs. Counts are not initialized.
amodel | The provided HMMs. |
tL_amicounts_print | ( | const tLAMiCounts * | counts, |
const tLAModel * | amodel, | ||
FILE * | to, | ||
const tLBool | binary | ||
) |
Prints the integer counts.
This function prints the integer counts to a file in text or binary format. Counts are printed in the same order as the parameters of amodel are printed. The binary format is not a compact nor portable representation, but a way to ensure that counts are written like they are stored in memory. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The integer counts. |
amodel | The acoustic model which was used to create the counts. |
to | File to which the counts will be printed. |
binary | If TRUE, counts are printed in binary format; else, in text format. |
tL_amicounts_read | ( | const tLAMiCounts * | counts, |
const tLAModel * | amodel, | ||
gzFile | from, | ||
const tLBool | binary, | ||
char ** | err | ||
) |
Reads the integer counts from file.
This function reads the integer counts from the provided file, in text or binary format, overwriting the current counts. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The integer counts. |
amodel | The acoustic model which was used to create the counts. |
from | File where counts are stored. |
binary | If TRUE, stored counts are assumed to be in binary format; else, in text format. |
err | Pointer to string variable. If not NULL, an error message is allocated in the variable in case of error. |
tL_amicounts_update_amodel | ( | const tLAMiCounts * | counts, |
tLAModel * | amodel | ||
) |
Update parameters.
This function uses the current integer counts to reestimate the parameters of the given acoustic model. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one. This function is only supported by HMMs with linear topologies.
counts | The integer counts. |
amodel | The acoustic model to update. |
tL_amicounts_update_hmm | ( | const tLAMiCounts * | counts, |
tLAModel * | amodel, | ||
const unsigned int | c | ||
) |
Update parameters of an HMM.
This function uses the current integer counts to reestimate the parameters of the given HMM. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one. This function is only supported by HMMs with linear topologies.
counts | The integer counts. |
amodel | The acoustic model to update. |
c | HMM to be updated. |
tL_amlogcounts_accum | ( | const tLAMlogCounts * | counts, |
const tLAModel * | amodel, | ||
gzFile | from, | ||
const tLBool | binary, | ||
char ** | err | ||
) |
Accumulates the logarithmic counts from file.
This function reads the logarithmic counts from the provided file, in text or binary format, and then accumulates the read counts over the current counts. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The logarithmic counts. |
amodel | The acoustic model which was used to create the counts. |
from | File where counts are stored. |
binary | If TRUE, stored counts are assumed to be in binary format; else, in text format. |
err | Pointer to string variable. If not NULL, an error message is allocated in the variable in case of error. |
tL_amlogcounts_accum_eps | ( | const tLAMlogCounts * | counts, |
const tLAModel * | amodel, | ||
gzFile | from, | ||
const tLFloat | eps, | ||
const tLBool | binary, | ||
char ** | err | ||
) |
Interpolates current logarithmic counts with the logarithmic counts from file.
This function reads the logarithmic counts from the provided file, in text or binary format, and then interpolates them with the current counts, . It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The logarithmic counts. |
amodel | The acoustic model which was used to create the counts. |
from | File where counts are stored. |
eps | The epsilon value, must be ![]() |
binary | If TRUE, stored counts are assumed to be in binary format; else, in text format. |
err | Pointer to string variable. If not NULL, an error message is allocated in the variable in case of error. |
tL_amlogcounts_free | ( | tLAMlogCounts * | counts, |
const tLAModel * | amodel | ||
) |
Frees memory.
Frees the memory allocated for the logarithmic counts. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The logarithmic counts to free. |
amodel | The acoustic model which was used to create the counts. |
tL_amlogcounts_get_mixcounts | ( | tLAMlogCounts * | counts, |
const tLAModel * | amodel, | ||
char ** | err | ||
) |
Returns the counts of the mixture coefficients.
This function is only applicable to HMMs of the type Mixture or TiedState Mixture.
counts | The logarithmic counts. |
amodel | The acoustic model. |
err | Pointer to string variable. If not NULL, an error message is allocated in the variable in case of error. |
tL_amlogcounts_init | ( | tLAMlogCounts * | counts, |
const tLAModel * | amodel | ||
) |
Initializes the logarithmic counts to -INF.
Initializes the logarithmic counts to -INF (-HUGE_VAL). It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The logarithmic counts to initialize. |
amodel | The acoustic model which was used to create the counts. |
tL_amlogcounts_init_hmm | ( | tLAMiCounts * | counts, |
const tLAModel * | amodel, | ||
const unsigned int | c | ||
) |
Initializes the logarithmic counts of an HMM to -INF.
Initializes the logarithmic counts of the designated HMM to -INF. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The logarithmic counts to initialize. |
amodel | The acoustic model which was used to create the counts. |
c | HMM to be initialized. |
tL_amlogcounts_init_hmm_val | ( | tLAMiCounts * | counts, |
const tLAModel * | amodel, | ||
const unsigned int | c, | ||
const tLFloat | val | ||
) |
Initializes the logarithmic counts of an HMM.
Initializes the logarithmic counts of the designated HMM to val. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The logarithmic counts to initialize. |
amodel | The acoustic model which was used to create the counts. |
c | HMM to be initialized. |
val | Value. |
tL_amlogcounts_init_val | ( | tLAMlogCounts * | counts, |
const tLAModel * | amodel, | ||
const tLFloat | val | ||
) |
Initializes the logarithmic counts.
Initializes the logarithmic counts to val. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The logarithmic counts to initialize. |
amodel | The acoustic model which was used to create the counts. |
val | Value. |
tL_amlogcounts_new | ( | const tLAModel * | amodel | ) |
Creates a new AMlogCounts.
Creates a new AMlogCounts to store the logarithmic counts of the parameters of the provided acoustic model. Counts are not initialized.
amodel | The provided acoustic model. |
tL_amlogcounts_new_cmllr | ( | const tLAModel * | amodel | ) |
Creates a new AMlogCounts for CMLLR.
Creates a new AMlogCounts to store the logarithmic counts, as 'tL_amlogcounts_new', prepared for the CMLLR algorithm. Counts are not initialized.
amodel | The provided acoustic model. |
tL_amlogcounts_new_mllr | ( | const tLAModel * | amodel | ) |
Creates a new AMlogCounts for MLLR.
Creates a new AMlogCounts to store the logarithmic counts, as 'tL_amlogcounts_new', prepared for the MLLR algorithm. Counts are not initialized.
amodel | The provided acoustic model. |
tL_amlogcounts_print | ( | const tLAMlogCounts * | counts, |
const tLAModel * | amodel, | ||
FILE * | to, | ||
const tLBool | binary | ||
) |
Prints the logarithmic counts.
This function prints the logarithmic counts into a file in text or binary format. Counts are printed in the same order as the parameters of amodel are printed. The binary format is not a compact nor portable representation, but a way to ensure that counts are written like they are stored in memory. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The logarithmic counts. |
amodel | The acoustic model which was used to create the counts. |
to | File to which the counts will be printed. |
binary | If TRUE, counts are printed in binary format; else, in text format. |
tL_amlogcounts_read | ( | const tLAMlogCounts * | counts, |
const tLAModel * | amodel, | ||
gzFile | from, | ||
const tLBool | binary, | ||
char ** | err | ||
) |
Reads the logarithmic counts from file.
This function reads the logarithmic counts from the provided file, in text or binary format, overwriting the current counts. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one.
counts | The logarithmic counts. |
amodel | The acoustic model which was used to create the counts. |
from | File where counts are stored. |
binary | If TRUE, stored counts are assumed to be in binary format; else, in text format. |
err | Pointer to string variable. If not NULL, an error message is allocated in the variable in case of error. |
tL_amlogcounts_update_amodel | ( | const tLAMlogCounts * | counts, |
tLAModel * | amodel | ||
) |
Update parameters.
This function uses the current logarithmic counts to reestimate the parameters of the given acoustic model. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one. This function is only supported by HMMs with linear topologies.
counts | The logarithmic counts. |
amodel | The acoustic model to update. |
tL_amlogcounts_update_hmm | ( | const tLAMlogCounts * | counts, |
tLAModel * | amodel, | ||
const unsigned int | c | ||
) |
Update parameters of an HMM.
This function uses the current logarithmic counts to reestimate the parameters of the given HMM. It is mandatory to provide the acoustic model which was used to create the counts, or a topologically equivalent one. This function is only supported by HMMs with linear topologies.
counts | The logarithmic counts. |
amodel | The acoustic model to update. |
c | HMM to be updated. |
tL_mixcounts_free | ( | tLMixCounts * | mcounts, |
const tLAModel * | amodel | ||
) |
Frees mixture counts.
This function frees the memory allocated for the mixture coefficient counts.
mcounts | The mixture coefficient counts. |
amodel | The acoustic model which was used to create the counts. |
tL_mixcounts_print | ( | const tLMixCounts * | mcounts, |
const tLAModel * | amodel, | ||
const tLDict * | syms, | ||
FILE * | to | ||
) |
Prints mixture counts.
This function prints the mixture coefficient counts in text format.
mcounts | The mixture coefficient counts. |
amodel | The acoustic model which was used to create the counts. |
syms | The symbol dictionary. |
to | File to which the counts will be printed. |
tL_mixcounts_read | ( | const tLAModel * | amodel, |
gzFile | from, | ||
char ** | err | ||
) |
Reads mixture counts from file.
This function reads the mixture coefficient counts from the file provided. The labels in the file are ignored, therefore what is important is the order of the counts in the file.
amodel | The acoustic model which was used to create the counts stored in the file. |
from | File where counts are stored. |
err | Pointer to string variable. If not NULL, an error message is allocated in the variable in case of error. |
tL_occupancies_init | ( | tLFloat ** | occs, |
const tLAModel * | amodel | ||
) |
Inits the occupancy values.
Inits to zero (-HUGE_VAL) all the occupancy values.
occs | The occupancy values. |
amodel | The acoustic model related to the occupancy values. |
tL_occupancies_new | ( | const tLAModel * | amodel | ) |
Allocs memory to store the occupancies.
This function allocs a matrix to store state occupancies of the specified acoustic model. The matrix is accessed as follows: m[c][q]; where 'c' is the index related to the HMM and 'q' the index related to the state. Occupancy values are stored using logarithms.
amodel | The acoustic model. |
tL_occupancies_print | ( | tLFloat ** | occs, |
FILE * | to, | ||
const tLAModel * | amodel, | ||
const tLDict * | syms | ||
) |
Prints the occupancy values.
This function prints the values of the occupancies in plain text format.
occs | The occupancy values. |
to | File to which the occupancy values will be printed. |
amodel | The acoustic model related to the occupancy values. |
syms | A dictionary with the symbols related to the HMMs. |