#include "segSyntax.h"
Go to the source code of this file.
Data Structures | |
struct | segDpItem |
structure to store decoding results for each node, which are used during trace-back More... | |
struct | segPruningParameter |
pruning parameters More... | |
struct | segDecoderParameter |
decoder parameters More... | |
Defines | |
#define | VOID -1 |
special value for path pointers of node in trellis | |
#define | NO_PRUN 0 |
no specified pruning method | |
#define | THRESH_PRUN 1 |
beam pruning with probability threshold | |
#define | N_BEST_PRUN 2 |
N best nodes to be maintained. | |
Typedefs | |
typedef segDpItem | SEG_DP_ITEM |
structure to store decoding results for each node, which are used during trace-back | |
typedef segPruningParameter | SEG_PRUN_PARAM |
pruning parameters | |
typedef segDecoderParameter | SEG_DEC_PARAM |
decoder parameters | |
Functions | |
double | segViterbiDecoder (SEG_DP_ITEM ***, SEG_SYNTAX *, double **, int *, int, int, int, SEG_DEC_PARAM *) |
Generic Viterbi-type decorder for segmental HMMs. | |
int * | segRecoverStateSeq (int *, SEG_DP_ITEM **, SEG_SYNTAX *, int) |
Recover the optimal state sequence from the path record of node. | |
SEG_ANN_DATA * | segRecoverRecogSeq (SEG_DP_ITEM **, SEG_SYNTAX *, int, int) |
Recover the model labels and their start and end times. | |
SEG_STATE ** | segRecoverStateIds (int *, SEG_SYNTAX *, int) |
Recover the sequence of state identities from a state sequence. | |
int | segGetDurationLimits (int *, int *, SEG_MODEL_SET *, SEG_SYNTAX *, int) |
Find the minimum and maximum possible durations for a given syntax. | |
int | segFreeDecoder (SEG_DP_ITEM **, int) |
Free memory space storing all the paths in the trellis. | |
void | segFreeStateSeq (int *) |
Free memory space of state sequence. |
int segFreeDecoder | ( | SEG_DP_ITEM ** | dpHist, | |
int | numStates | |||
) |
Free memory space storing all the paths in the trellis.
[in] | dpHist | Paths in the trellis for back-tracing |
[in] | numStates | Number of states |
NO_ERROR | Successful execution |
void segFreeStateSeq | ( | int * | stateSeq | ) |
Free memory space of state sequence.
[in] | stateSeq | State (index) sequence |
int segGetDurationLimits | ( | int * | minUttDur, | |
int * | maxUttDur, | |||
SEG_MODEL_SET * | models, | |||
SEG_SYNTAX * | synt, | |||
int | eStates | |||
) |
Find the minimum and maximum possible durations for a given syntax.
[in] | minUttDur | Minimum utterance duration |
[in] | maxUttDur | Maximum utterance duration |
[in] | models | Model set |
[in] | synt | Syntax |
[in] | eStates | Number of emitting states in the syntax |
RTN_ERROR | Inconsistency in the models | |
NO_ERROR | Successfully executed |
SEG_ANN_DATA* segRecoverRecogSeq | ( | SEG_DP_ITEM ** | dpMat, | |
SEG_SYNTAX * | syn, | |||
int | numVecs, | |||
int | numLabs | |||
) |
Recover the model labels and their start and end times.
This function traces back through the DP matrix to obtain the model labels and their start and end times (in frame), ready to write them out in the master label file.
[in] | dpMat | Paths in the trellis for back-tracing |
[in] | syn | Syntax |
[in] | numVecs | Number of frames in the sequence |
[in] | numLabs | Number of models in the sequence |
NULL | Memory allocation error | |
otherwise | Pointer to the array of struct annData variables each of which contains a label, and start and end times. |
SEG_STATE** segRecoverStateIds | ( | int * | stateSeq, | |
SEG_SYNTAX * | syn, | |||
int | numVecs | |||
) |
Recover the sequence of state identities from a state sequence.
This function returns the state identities (as pointers to states) of the best state sequence obtained by segRecoverStateSeq().
[in] | stateSeq | State sequence |
[in] | syn | Syntax |
[in] | numVecs | Number of frames in the utterance |
NULL | Memory allocation error | |
otherwise | Pointer to the array of struct stateInfo pointers |
int* segRecoverStateSeq | ( | int * | numLabs, | |
SEG_DP_ITEM ** | dpHist, | |||
SEG_SYNTAX * | syn, | |||
int | numVecs | |||
) |
Recover the optimal state sequence from the path record of node.
This function is used to find the best state sequence by tracing back through the DP matrix with path record of each node in the trellis.
[in,out] | numLabs | Number of models in the sequence recovered |
[in] | dpHist | Paths in the trellis for back-tracing |
[in] | syn | Syntax |
[in] | numVecs | Number of frames in the utterance |
NULL | Memory allocation error | |
Otherwise | Pointer to the array of state sequence recovered |
double segViterbiDecoder | ( | SEG_DP_ITEM *** | dpHist, | |
SEG_SYNTAX * | synt, | |||
double ** | spData, | |||
int * | breakPt, | |||
int | sT, | |||
int | eT, | |||
int | maxDur, | |||
SEG_DEC_PARAM * | decParam | |||
) |
Generic Viterbi-type decorder for segmental HMMs.
[out] | dpHist | Paths in the trellis for back-tracing |
[in] | synt | Syntax |
[in] | spData | Acoustic feature vectors |
[in] | breakPt | Break point attributes |
[in] | sT | Utterance start time (frame #) |
[in] | eT | Utterance end time (frame #) |
[in] | maxDur | Maximal segment-duration (Dmax) |
[in] | decParam | Decoder parameters |
RTN_ERROR | Memory allocation error | |
Otherwise | The best cost (minProb) computed |