#include <stdio.h>
#include <stdlib.h>
#include "segCommon.h"
#include "segStdLib.h"
#include "segDecoder.h"
Functions | |
int * | segRecoverStateSeq (int *numLabs, SEG_DP_ITEM **dpHist, SEG_SYNTAX *syn, int numVecs) |
Recover the optimal state sequence from the path record of node. | |
SEG_STATE ** | segRecoverStateIds (int *stateSeq, SEG_SYNTAX *syn, int numVecs) |
Recover the sequence of state identities from a state sequence. | |
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. | |
void | segFreeStateSeq (int *stateSeq) |
Free memory space of state 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. |
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 |