|
BSAPI
|
GMM based estimator (for fast VTLN, GID, etc.) More...
#include <bsapi.h>
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. | |
GMM based estimator (for fast VTLN, GID, etc.)
| 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.
| 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 |
| virtual char* BSAPI_METHOD SGMMBasedEstimatorI::GetBestClass | ( | float * | pScore = 0 | ) | [pure virtual] |
Get the name of the winning class.
| pScore | pointer where to store winning class score |
| virtual char** BSAPI_METHOD SGMMBasedEstimatorI::GetClassNames | ( | int * | pNumValues = 0 | ) | [pure virtual] |
Get names of all classes.
| pNumValues | pointer where to store names array length |
| virtual float* BSAPI_METHOD SGMMBasedEstimatorI::GetClassScores | ( | int * | pNumValues = 0 | ) | [pure virtual] |
Get scores of all classes.
| pNumValues | pointer where to store scores array length |
| virtual float BSAPI_METHOD SGMMBasedEstimatorI::GetFactor | ( | ) | [pure virtual] |
Get actual estimate of the factor.
| virtual int BSAPI_METHOD SGMMBasedEstimatorI::GetNUsedFrames | ( | ) | [pure virtual] |
Get number of frames used for estimation.
| virtual bool BSAPI_METHOD SGMMBasedEstimatorI::LoadModels | ( | const char * | pModelDirectory | ) | [pure virtual] |
Load models files given by dictionary and file suffix.
| 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).
| virtual bool BSAPI_METHOD SGMMBasedEstimatorI::SetEstimationMode | ( | const char * | pEstimationMode = "sum" | ) | [pure virtual] |
Set the estimation mode.
| pEstimationMode | estimation mode - 'sum' for averiging, 'adapt' for online adaptation (resent values are more important). |
| 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.
| frameShiftMs | frame shift in milliseconds |
| virtual void BSAPI_METHOD SGMMBasedEstimatorI::SetModelSuffix | ( | const char * | pModelSuffix = "gmm" | ) | [pure virtual] |
Set the model file suffix.
| pModelSuffix | model 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
| pSpeechLabel | label of (speech) segments to be processed |
| virtual void BSAPI_METHOD SGMMBasedEstimatorI::SetTarget | ( | SParametersCallbackI * | pTarget | ) | [pure virtual] |
Set target object for receiving updated factor and scores.
| 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 works.
| useSegmentation |
|
1.7.5.1