BSAPI
Public Member Functions
SGMMBasedEstimatorI Class Reference

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

#include <bsapi.h>

Inheritance diagram for SGMMBasedEstimatorI:
SUnknownI SFeatureExtractionCallbackI STransCallbackI

List of all members.

Public Member Functions

virtual void BSAPI_METHOD SetModelSuffix (const char *pModelSuffix="gmm")=0
 Set the model file suffix.
virtual bool BSAPI_METHOD LoadModels (const char *pModelDirectory)=0
 Load models files given by dictionary and file suffix.
virtual void BSAPI_METHOD SetTarget (SParametersCallbackI *pTarget)=0
 Set target object for receiving updated factor and scores.
virtual bool BSAPI_METHOD SetEstimationMode (const char *pEstimationMode="sum")=0
 Set the estimation mode.
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=10)=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 void BSAPI_METHOD SetBufferLength (int bufferLength=0)=0
virtual void BSAPI_METHOD SetFrameBunchLength (int frameBunchLength=50)=0
virtual void BSAPI_METHOD SetAdaptMinFrames (int adaptMinFrames=50)=0
virtual void BSAPI_METHOD SetAdaptTimeConst (float adaptTimeConst=0.02f)=0
virtual void BSAPI_METHOD SetOutputStep (int outputStep=0)=0
virtual void BSAPI_METHOD SetUseFactor (bool useFactor=false)=0
virtual void BSAPI_METHOD SetDefaultFactor (float defaultFactor=1.0f)=0
virtual bool BSAPI_METHOD SetFileNameFactorRange (const char *pRange="1:3")=0
virtual void BSAPI_METHOD SetFileNameFactorScale (float scale=0.01f)=0
virtual void BSAPI_METHOD SetFrameStride (int frameStride=1)=0
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:
pFeaturesfeature vectors to be add for estimation
nFramesnumber of feature vectors
pSegmentspointer to array with segmentation or 0 to use all feature vectors
nSegmentslength of the segmentation array
flagsprocessing flags
See also:
AddWaveform
SFeatureExtractionCallbackI
STransCallbackI
virtual char* BSAPI_METHOD SGMMBasedEstimatorI::GetBestClass ( float *  pScore = 0) [pure virtual]

Get the name of the winning class.

Parameters:
pScorepointer 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:
pNumValuespointer 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:
pNumValuespointer 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::LoadModels ( const char *  pModelDirectory) [pure virtual]

Load models files given by dictionary and file suffix.

Returns:
true it the models were loaded 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 bool BSAPI_METHOD SGMMBasedEstimatorI::SetEstimationMode ( const char *  pEstimationMode = "sum") [pure virtual]

Set the estimation mode.

Parameters:
pEstimationModeestimation mode - 'sum' for averiging, 'adapt' for online adaptation (resent values are more important).
Returns:
false if the mode string is unknown.
virtual void BSAPI_METHOD SGMMBasedEstimatorI::SetFrameShiftMs ( int  frameShiftMs = 10) [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 OnParameters callback.

Parameters:
frameShiftMsframe shift in milliseconds
virtual void BSAPI_METHOD SGMMBasedEstimatorI::SetModelSuffix ( const char *  pModelSuffix = "gmm") [pure virtual]

Set the model file suffix.

Parameters:
pModelSuffixmodel suffix. 'gmm' by default.
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:
pSpeechLabellabel of (speech) segments to be processed
See also:
SParametersCallbackI
virtual void BSAPI_METHOD SGMMBasedEstimatorI::SetTarget ( SParametersCallbackI pTarget) [pure virtual]

Set target object for receiving updated factor and scores.

Parameters:
pTargetpointer 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 works.

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: