SGMMBasedEstimatorI Class Reference

GMM based estimator (for fast VTLN, GID, etc.). More...

#include <bsapi.h>

Inheritance diagram for SGMMBasedEstimatorI:

SUnknownI SWaveformSourceCallbackI SFeatureExtractionCallbackI STransCallbackI List of all members.

Public Member Functions

virtual bool BSAPI_METHOD Init (char *pConfigFile)=0
 Initialization of the GMM based estimator according to a configuration file.
virtual void BSAPI_METHOD SetTarget (SGMMBasedEstimatorCallbackI *pTarget)=0
 Set target object for receiving updated factor and scores.
virtual void BSAPI_METHOD SetSpeechLabel (const char *pSpeechLabel="voice")=0
 Set speech label to be used with segmentation.
virtual void BSAPI_METHOD SetFrameShiftMs (int frameShiftMs)=0
 Set frame shift.
virtual void BSAPI_METHOD SetUseSegmentation (bool useSegmentation=true)=0
 Set whether the segmentation will be applied after the OnFeatureMatrix has been called.
virtual bool BSAPI_METHOD AddWaveform (float *pWaveform, int length, int sampleFreq, segm_pos_type *pSegments=0, int nSegments=0, unsigned int flags=PF_LASTFRAME|PF_OFFLINEPROC)=0
 Add waveform for estimation.
virtual bool BSAPI_METHOD AddFeatures (SFloatMatrixI *pFeatures, int nFrames, segm_pos_type *pSegments=0, int nSegments=0, unsigned int flags=PF_LASTFRAME|PF_OFFLINEPROC)=0
 Add features for estimation.
virtual int BSAPI_METHOD GetNUsedFrames ()=0
 Get number of frames used for estimation.
virtual float BSAPI_METHOD GetFactor ()=0
 Get actual estimate of the factor.
virtual float *BSAPI_METHOD GetClassScores (int *pNumValues=0)=0
 Get scores of all classes.
virtual char **BSAPI_METHOD GetClassNames (int *pNumValues=0)=0
 Get names of all classes.
virtual char *BSAPI_METHOD GetBestClass (float *pScore=0)=0
 Get the name of the winning class.
virtual bool BSAPI_METHOD Restart ()=0
 Restart estimation.

Detailed Description

GMM based estimator (for fast VTLN, GID, etc.).


Member Function Documentation

virtual bool BSAPI_METHOD SGMMBasedEstimatorI::AddFeatures ( SFloatMatrixI pFeatures,
int  nFrames,
segm_pos_type *  pSegments = 0,
int  nSegments = 0,
unsigned int  flags = PF_LASTFRAME|PF_OFFLINEPROC 
) [pure virtual]

Add features for estimation.

Adds features to compute new scores and factor estimation. Segmentation can be optionally given too to tell which segments (feature vectors) should be used in estimation. Those segments must be labeled SE_VOICE and their boundaries must be in HTK format (1 unit is equal to 100 nanoseconds). Note that if internal segmentation is enabled (specified in configuration file) it is used no matter what segmentation was passed to this method.

Parameters:
pFeatures feature vectors to be add for estimation
nFrames number of feature vectors
pSegments pointer to array with segmentation or 0 to use all feature vectors
nSegments length of the segmentation array
flags processing flags
See also:
AddWaveform

SFeatureExtractionCallbackI

STransCallbackI

virtual bool BSAPI_METHOD SGMMBasedEstimatorI::AddWaveform ( float *  pWaveform,
int  length,
int  sampleFreq,
segm_pos_type *  pSegments = 0,
int  nSegments = 0,
unsigned int  flags = PF_LASTFRAME|PF_OFFLINEPROC 
) [pure virtual]

Add waveform for estimation.

Adds waveform to compute new scores and factor estimation. Segmentation can be optionally given too to tell which segments (feature vectors) should be used in estimation. Those segments must be labeled SE_VOICE and their boundaries must be in HTK format (1 unit is equal to 100 nanoseconds). Note that if internal segmentation is enabled (specified in configuration file) it is used no matter what segmentation was passed to this method.

Parameters:
pWaveform waveform to be add for estimation
length length of the waveform
pSegments pointer to array with segmentation or 0 to use all feature vectors
nSegments length of the segmentation array
flags processing flags
See also:
AddFeatures

SFeatureExtractionCallbackI

STransCallbackI

virtual char* BSAPI_METHOD SGMMBasedEstimatorI::GetBestClass ( float *  pScore = 0  )  [pure virtual]

Get the name of the winning class.

Parameters:
pScore pointer where to store winning class score
Returns:
winning class name

virtual char** BSAPI_METHOD SGMMBasedEstimatorI::GetClassNames ( int *  pNumValues = 0  )  [pure virtual]

Get names of all classes.

Parameters:
pNumValues pointer where to store names array length
Returns:
class names array

virtual float* BSAPI_METHOD SGMMBasedEstimatorI::GetClassScores ( int *  pNumValues = 0  )  [pure virtual]

Get scores of all classes.

Parameters:
pNumValues pointer where to store scores array length
Returns:
class scores array

virtual float BSAPI_METHOD SGMMBasedEstimatorI::GetFactor (  )  [pure virtual]

Get actual estimate of the factor.

Returns:
factor

virtual int BSAPI_METHOD SGMMBasedEstimatorI::GetNUsedFrames (  )  [pure virtual]

Get number of frames used for estimation.

Returns:
number of frames

virtual bool BSAPI_METHOD SGMMBasedEstimatorI::Init ( char *  pConfigFile  )  [pure virtual]

Initialization of the GMM based estimator according to a configuration file.

Parameters:
pConfigFile configuration file
Returns:
true initialization finished correctly

virtual bool BSAPI_METHOD SGMMBasedEstimatorI::Restart (  )  [pure virtual]

Restart estimation.

Flushes all internal buffers and resets object to its initial state (factor would be set to a default value).

Returns:
true restart finished correctly

virtual void BSAPI_METHOD SGMMBasedEstimatorI::SetFrameShiftMs ( int  frameShiftMs  )  [pure virtual]

Set frame shift.

Sets the frame shift in milliseconds. Frame shift is used only with AddFeatures and OnFeatureMatrix. Otherwise it is obtained automatically from parameterization configuration. Correct frame shift is necessary for use with segmentation however it is also needed for correct values of time parameter passed to OnEstimationDone callback.

Parameters:
frameShiftMs frame shift in milliseconds

virtual void BSAPI_METHOD SGMMBasedEstimatorI::SetSpeechLabel ( const char *  pSpeechLabel = "voice"  )  [pure virtual]

Set speech label to be used with segmentation.

Sets the label value so the segments with this label coming to the OnTranscription callback will be considered as speech and will be processed

Parameters:
pSpeechLabel label of (speech) segments to be processed
See also:
SGMMBasedEstimatorCallbackI

virtual void BSAPI_METHOD SGMMBasedEstimatorI::SetTarget ( SGMMBasedEstimatorCallbackI pTarget  )  [pure virtual]

Set target object for receiving updated factor and scores.

Parameters:
pTarget pointer to target object

virtual void BSAPI_METHOD SGMMBasedEstimatorI::SetUseSegmentation ( bool  useSegmentation = true  )  [pure virtual]

Set whether the segmentation will be applied after the OnFeatureMatrix has been called.

Tells whether after OnFeatureMatrix callback also OnTranscription will be called to pass segmentation or not. Using this method has no effect to the way how AddFeatures or AddWaveform work.

Parameters:
useSegmentation 
  • true await segmentation will be passed after OnFeatureMatrix by OnTranscription
  • false segmentation is not used, OnTranscription is not expected to be called
See also:
SFeatureExtractionCallbackI

STransCallbackI


The documentation for this class was generated from the following file:
Generated on Wed Jul 15 10:10:10 2009 for BSAPI by  doxygen 1.4.7