Train_Segmenter Class Reference

This class can 'train' new speaker clusters. One could call determining the clusters training because the phone (SIL) training procedures are used. But in fact, training is done on the target data (not on a training set), so it is not really training but processing. See our Spring 2006 NIST Rich Transcription Speaker Diarization paper for more information. This is ment to be the most simple form of the HMM-based merging diarization method. Overloaded classes may be created for testing new algorithms. More...

Inheritance diagram for Train_Segmenter:

List of all members.


Public Member Functions

 Train_Segmenter (FeaturePool *fp, int sID_train, int sID_decode, const char *name, int nrMerges, int minClusters, int maxClusters, bool widen, const char *nonMergeableModels)
virtual ~Train_Segmenter ()
void train (int maxClusters, char *label, char *tempStr, char *feaPosteriors, int segID_cheat=-1)
int getSegmentation () const
void storeClusters (FILE *outFile, char *outputName)
void loadClusters (FILE *inFile)

Protected Member Functions

double trainIteration (int nrIterations)
double trainClusters (int nrG=-1)
bool mergeClusters (int maxClusters, bool smallestWins, bool actuallyMerge)
void createInitialModels (int segAmount, char *outputName=NULL)
void createOverlapTree (int min)
virtual void startMergeIteration ()
virtual void getMergeModelScore (int model1, int model2, double *mergeScore)
virtual bool proceedMerge (int model1, int model2, int method)
virtual void mergeModels (int model1, int model2)
virtual void trainModel (int model, int nrG, double *trainPRes)
void getOverlap (FILE *file)
void writePosteriors (char *fileName)

Protected Attributes

char outputFileName [2000]
char label [200]
int sadID_train
int sadID_decode
int segID
int segID_decode
int segID_cheat
TrainPhoneModel ** trainCluster
TrainPhoneModel ** scoreCluster
int nrScoreClusters
Vector ** distanceVect
bool * mergeable
int nrNonMergeModels
double * clusterScore
int * clusterSize
int cheatSpk1
int cheatSpk2
int numberOfMerges
int * compareClusters
PhoneModelvtlnModel
int fastMerge
bool prepareForASR
int maxDataPoints
bool detectOverlap
int nrMergeIterations
double bic_meanoffset [10]
TrainPhoneModeltrcl

Detailed Description

This class can 'train' new speaker clusters. One could call determining the clusters training because the phone (SIL) training procedures are used. But in fact, training is done on the target data (not on a training set), so it is not really training but processing. See our Spring 2006 NIST Rich Transcription Speaker Diarization paper for more information. This is ment to be the most simple form of the HMM-based merging diarization method. Overloaded classes may be created for testing new algorithms.

Constructor & Destructor Documentation

Train_Segmenter::~Train_Segmenter (  )  [virtual]

The destructor will delete all claimed memory (the clusters)

References clusterScore, compareClusters, Segmenter::featurePool, FeaturePool::freeSegmentationID(), LexicalTree::numberOfPhones, LexicalTree::phoneModels, segID, and trainCluster.

Here is the call graph for this function:


Member Function Documentation

void Train_Segmenter::createInitialModels ( int  segAmount,
char *  outputName = NULL 
) [protected]

We have done training, let's start merging!

References Segmenter::featurePool, FeaturePool::getClusterLength(), LexicalTree::numberOfWords, sadID_train, segID, trainClusters(), and trainIteration().

Referenced by train().

Here is the call graph for this function:

void Train_Segmenter::createOverlapTree ( int  min  )  [protected]

void Train_Segmenter::getMergeModelScore ( int  model1,
int  model2,
double *  mergeScore 
) [protected, virtual]

int Train_Segmenter::getSegmentation (  )  const [inline]

References segID_decode.

void Train_Segmenter::mergeModels ( int  model1,
int  model2 
) [protected, virtual]

bool Train_Segmenter::proceedMerge ( int  model1,
int  model2,
int  method 
) [protected, virtual]

We have decided on two merge candidates. Now determine if we should actually do it, or just stop.

Reimplemented in Adapt_Segmenter.

void Train_Segmenter::startMergeIteration (  )  [protected, virtual]

Before we check which model to merge, we do some preparations in this method.

Reimplemented in Adapt_Segmenter.

References compareClusters, and LexicalTree::numberOfWords.

Referenced by mergeClusters().

void Train_Segmenter::storeClusters ( FILE *  outFile,
char *  outputName 
)

double Train_Segmenter::trainClusters ( int  nrG = -1  )  [protected]

The training iterations are performed by this method.

References cluster_threadRunning, clusterScore, condition_cluster_mutexDone, condition_cluster_threadDone, TrainPhoneModel::maxNrOfGaussians(), mergeable, LexicalTree::numberOfWords, trainCluster, and trainModel().

Referenced by createInitialModels(), getOverlap(), and trainIteration().

Here is the call graph for this function:

void Train_Segmenter::writePosteriors ( char *  fileName  )  [protected]


Member Data Documentation

double Train_Segmenter::bic_meanoffset[10] [protected]

Referenced by mergeClusters(), and Train_Segmenter().

int Train_Segmenter::cheatSpk1 [protected]

Referenced by mergeClusters().

int Train_Segmenter::cheatSpk2 [protected]

Referenced by mergeClusters().

int* Train_Segmenter::clusterSize [protected]

Referenced by getOverlap(), and Train_Segmenter().

Referenced by train(), and Train_Segmenter().

int Train_Segmenter::fastMerge [protected]

Referenced by mergeClusters(), and Train_Segmenter().

char Train_Segmenter::label[200] [protected]

Reimplemented in Adapt_Segmenter.

Referenced by getOverlap(), mergeClusters(), mergeModels(), and train().

Referenced by Train_Segmenter().

Referenced by train(), and Train_Segmenter().

Referenced by train(), and Train_Segmenter().