segReest.c File Reference

Reestimation for uniform trajectory segmental HMMs. More...

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include "segCommon.h"
#include "segStdLib.h"
#include "segReest.h"

Defines

#define GAMMA_DUR_MODEL
 Defining this means the gamma function is used to approximate the duration distribution.
#define DUR_PROB_OFFSET   0.0
 This is used to avoid the duration model outputting BIGNUMs.
#define DUR_SD_FLOOR   (1/sqrt(2))
 Floor of variance for the duration model.

Functions

int segIncrementLinearHMMAccumulators (SEG_STATE **stateId, int *stateSeq, SEG_SYNTAX *syn, double **spData, int sT, int eT, int maxDur)
 Increment the reestimation bins, according to the current utterance alignment.
int segInitialiseHMMAccumulators (SEG_MODEL_SET *hmmSet)
 Initialise reestimation accumulators for the entire set of models.
int segReestSegModels (SEG_MODEL_SET *hmmSet, SEG_CONFIG *config)
 Reestimate linear segmental-HMM parameters.


Detailed Description

Reestimation for uniform trajectory segmental HMMs.

Date:
12.05.2006
05.07.2007 (documented)
Author:
Yoshinori Shiga @ CVSSP, University of Surrey
Note:
This code was originally created on the basis of Martin Russell & P Jackson's SEGVit Ver.3.4.
Revision

Function Documentation

int segIncrementLinearHMMAccumulators ( SEG_STATE **  stateId,
int *  stateSeq,
SEG_SYNTAX syn,
double **  spData,
int  sT,
int  eT,
int  maxDur 
)

Increment the reestimation bins, according to the current utterance alignment.

The function uses the optimal state sequence (i.e., the current utterance alignment) to add each acoustic vector to the accumulator of the corresponding HMM state on the optimal state sequence Linear trajectory model (i.e. slope and mean value).

Parameters:
[in,out] stateId Array of state IDs of the best state-sequence
[in] stateSeq The best state sequence
[in] syn Syntax
[in] spData Acoustic feature vectors of speech data
[in] sT Start time of the utterance
[in] eT End time of the utterance
[in] maxDur Maximum segment duration
Return values:
RTN_ERROR Memory allocation error
NO_ERROR Successfully executed
Author:
Yoshinori Shiga @ CVSSP, University of Surrey
Note:
The accumulation is carried out based on the optimal state sequence from training.

int segInitialiseHMMAccumulators ( SEG_MODEL_SET hmmSet  ) 

Initialise reestimation accumulators for the entire set of models.

The function initialises reestimation accumulators for the entire set of models.

Parameters:
[in,out] hmmSet Model set
Returns:
NO_ERROR Successfully executed
Author:
Yoshinori Shiga @ CVSSP, University of Surrey
Note:
The following functions are called internally: initTransProbs(), initStates(), initTrjModels() and initDurModels().
See also:
initTransProbs(), initStates(), initTrjModels() and initDurModels().

int segReestSegModels ( SEG_MODEL_SET hmmSet,
SEG_CONFIG config 
)

Reestimate linear segmental-HMM parameters.

The function reestimates the segmental HMMs using the accumulated values in the reestimation bins.

Parameters:
[in,out] hmmSet Model set
[in] config Configuration parameters
Return values:
NO_ERROR Successfully executed
RTN_ERROR Too small number of samples for the model
Author:
Yoshinori Shiga @ CVSSP, University of Surrey
Note:
The following functions are called internally: modelOccupancy(), reestTransProbs(), reestTrjModels(), durModelOccupancy(), and reestGammaDistDurModels() or reestDiscreteDurModels().
See also:
modelOccupancy(), reestTransProbs(), reestTrjModels(), durModelOccupancy(), reestGammaDistDurModels() and reestDiscreteDurModels()


Generated on Sun Aug 5 02:40:37 2007 for SEGRec Version 1.0 by  doxygen 1.5.1