FeaturePool Class Reference

FeaturePool objects contain a feature vector file in memory. More...

List of all members.


Public Member Functions

 FeaturePool (int nrStreams, FeaturePool_Multistream_file *files, double *iw, bool onlyPrepare)
 FeaturePool (char *featureFileName, FILE_TYPE fileType=FILE_TYPE_SHOUT, bool noBuffering=false, double vtln=1.0, bool doOffset=false, bool onlyPrepare=false)
 FeaturePool (int poolS, int vectorS)
 ~FeaturePool ()
void setStreamWeights (double *w, bool forEver)
void resetStreamWeights ()
void storeFeatureVectors (FILE *file)
void setOnlyMEL ()
void createNewMultiStreamPool (FeaturePool_Multistream_file *files, int segID)
int mergeSegmentations (int *seg, int nrSeg, int outSeg)
void retrieveEnergy (char *featureFileName, int channelNr)
void removeLowEnergy (int segID, int channelNr, bool doShort=false)
double getAverageEnergy (int segID, int channelNr, double varianceFactor)
double getCurSegmentEnergy (SegmentationAdmin *admin, int t)
void splitOnEnergy (int segNr, int sourceLabel, int silLabel, int soundLabel, int nrSamplesSil, int nrSamplesSound, int comp)
void createNewPool (char *featureFileName, char *histNormName, char *histNormSpkName, bool noBuffering=false, bool onlyPrepare=false, int vtlnSegID=-1, double globalVtln=-1.0)
void addFeatureFile (char *featureFileName, FILE_TYPE fileType, int ignoreFrames, int trainFrames, double vtln=1.0)
void setFilter (char *featureFileName, int dimension, double threshold)
void enableFilter (bool enable)
void filterToSegmentation (int segNr, FeaturePool *feaPool=NULL)
void setFeatureNormalization (FEATURENORM_TYPE m)
int getNumberOfSpeakers (int segNr)
int getNumberOfSegments (int segNr, int spkrNr)
int getSpeakerID (int segNr, int spkrNr)
bool createUEMSegmentation (int segID, int channelNumber, char *label, char *UEM)
int claimSegmentationID ()
void freeSegmentationID (int segNr)
void resetSegmentation (int segNr)
void addSegment (int segNr, int firstFrame, int lastFrame, int ID, int cKey=0, int cLeft=0, int cRight=0)
void addSegmentToFront (int segNr, int firstFrame, int lastFrame, int ID, int cKey=0, int cLeft=0, int cRight=0)
void setCurSegmentVectors (int segNr, FILE *inFile, bool inputIsFloat=false)
void setCurSegmentVector (int segNr, int offset, Vector *vector)
int getPoolLength ()
int getClusterLength (int segNr, int label)
bool doSegmentsExist (int segNr, int ID)
Vector ** getVectorList (SegmentationAdmin *admin, int time)
Vector ** getFirstVectorFirstSegmentList (SegmentationAdmin *admin, int segNr, int ID, bool dontCareID=false, bool *isLastFromSegment=NULL, bool *inFilter=NULL)
Vector ** getFirstVectorNextSegmentList (SegmentationAdmin *admin, bool dontCareID=false, bool *isLastFromSegment=NULL, bool *inFilter=NULL)
Vector ** getCurSegmentVectorList (SegmentationAdmin *admin, int offset)
Vector ** getNextVectorList (SegmentationAdmin *admin, bool *isLastFromSegment=NULL, bool *inFilter=NULL)
void segmentationCreateOverlap (int segNr, int label)
void segmentationAddLabel (int sourceSegNr, int destSegNr, int sourceLabel, int destLabel)
void segmentationSubset (int sourceSegNr, int destSegNr, int label, PhoneModel *model, int nrSamples)
void segmentationCopy (int sourceSegNr, int destSegNr)
void segmentationIntersection (int sourceSegNr, int filterSegNr, int filterLabel, int destSegNr)
void segmentationFillGaps (int segNr, int fillLabel)
void segmentationSubstract (int sourceSegNr, int filterSegNr, int destSegNr, int filterLabel=-1)
void segmentationSplit (int sourceSegNr, int destSegNr1, int destSegNr2)
void segmentationWiden (int segNr, int soundNr, int maxNrFrames, int onlyWidenLabel=-1)
int filterLongSegments (int segID, int labelNr, int newLabel, int minLength)
void filterShortSegments (int segID, int labelNr, int labelSelf, int minNeighbours)
void maxSegmentLength (int segNr, int labelNr, int size, int minRemainder)
void concatSegmentation (int destSeg, int copySeg)
void restrictPool (int start, int end)
void mergeLabels (int segNr, int label1, int label2)
void readRTTM (int segNr, char *mapCluster, int mapNr, int strLen, int prefixLength, FILE *inFile, int fillerID=-1, int ignoreFrames=0, int trainFrames=0, char *labelName=NULL)
void writeRTTM (int segNr, const char *label, const char *prefix, FILE *outFile=NULL, int nrPr=0, int overwriteVTLN=-1)
VectorgetFirstVectorFirstSegment (SegmentationAdmin *admin, int segNr, int ID, bool dontCareID=false, bool *isLastFromSegment=NULL, bool *inFilter=NULL)
VectorgetVector (SegmentationAdmin *admin, int time)
VectorgetFirstVectorNextSegment (SegmentationAdmin *admin, bool dontCareID=false, bool *isLastFromSegment=NULL, bool *inFilter=NULL)
VectorgetCurSegmentVector (SegmentationAdmin *admin, int offset)
VectorgetNextVector (SegmentationAdmin *admin, bool *isLastFromSegment=NULL, bool *inFilter=NULL)
double getStreamWeight (int i) const
int getVectorSize () const
int getSegmentID (int idNr, SegmentationAdmin *admin) const
void setSegmentID (int idNr, int val, SegmentationAdmin *admin) const
int startTimeStamp () const
int getCurSegmentLen (SegmentationAdmin *admin) const
int getCurSegmentStart (SegmentationAdmin *admin) const
char * getCurInfoString (SegmentationAdmin *admin) const
FeaturePoolInfogetStreamInfo ()

Protected Member Functions

void createNewFeatureExtraction (char *featureFileName, double vtln, bool doOffset, bool onlyPrepare)
int readHeader_ShoutFormat ()
void fillBuffer_ShoutFormat (int length, int ignoreFrames=0)
int readHeader_TextFormat ()
void fillBuffer_TextFormat (int length, int ignoreFrames=0)
void fillBuffer_fromFeatureExtraction (int length, int ignoreFrames=0)

Protected Attributes

bool onlyMEL
FILE * featureFile
FeatureExtractionfeaExtract
FeatureEnergy feaEnergy [2]
FILE_TYPE fileType
Vector ** buffer
int poolLength
int fileOffset
int poolFilled
bool * filter
bool filterEnabled
int restrictStart
int restrictEnd
int vectorSize
int numberOfSpkIDs [MAX_NR_SEGMENTATIONS]
int spkID [MAX_NR_SEGMENTATIONS][MAX_NR_SPKIDS]
bool freeID [MAX_NR_SEGMENTATIONS]
FEATURENORM_TYPE featureNorm
SegmentationListsegList [MAX_NR_SEGMENTATIONS]
SegmentationListfillPool_curSeg [MAX_NR_SEGMENTATIONS]
FeaturePoolInfo infoBlock
GaussiantextFeatureDistribution
FeaturePool_Multistream_filemultiStream

Detailed Description

FeaturePool objects contain a feature vector file in memory.

It is also possible to read out one vector at a time so that it is not needed to keep the file in memory (for decoding large files). If you want this, set 'noBuffering' in the constructor to true.

For phone training or adaptation, it is often not known how big the entire pool with phone data is going to be. For this case it is possible to initialise the pool with a maximum length and add phone data while making the segmentation.


Constructor & Destructor Documentation

FeaturePool::FeaturePool ( char *  featureFileName,
FILE_TYPE  fType = FILE_TYPE_SHOUT,
bool  noBuffering = false,
double  vtln = 1.0,
bool  doOffset = false,
bool  onlyPrepare = false 
)

FeaturePool::FeaturePool ( int  poolS,
int  vectorS 
)

This constructor initializes the pool, but it does not fill it with data. This can be done later with the addFeatures() method. This way of populating the pool is typically done when the size of the pool is not known beforhand (for example when collecting adaptation data).

References FeatureEnergy::buffer, buffer, FeaturePoolInfo::distrG, feaEnergy, FeatureEnergy::feaExtract, feaExtract, featureFile, fileOffset, fillPool_curSeg, filter, filterEnabled, freeID, infoBlock, FeaturePoolInfo::lastComponent, multiStream, FeaturePoolInfo::numberOfChannels, onlyMEL, poolFilled, poolLength, restrictEnd, restrictStart, segList, textFeatureDistribution, vectorSize, FeaturePoolInfo::weight, and FeaturePoolInfo::weightBackup.


Member Function Documentation

void FeaturePool::addFeatureFile ( char *  featureFileName,
FILE_TYPE  fType,
int  ignoreFrames,
int  trainFrames,
double  vtln = 1.0 
)

void FeaturePool::addSegmentToFront ( int  segNr,
int  firstFrame,
int  lastFrame,
int  ID,
int  cKey = 0,
int  cLeft = 0,
int  cRight = 0 
)

Adds a segment in the current segmentation linked-list at the very first slot.

References SegmentationList::firstFrame, SegmentationList::ID, SegmentationList::infoString, SegmentationList::lastFrame, SegmentationList::next, poolLength, and segList.

Referenced by Segmenter::createSegments().

void FeaturePool::concatSegmentation ( int  destSeg,
int  copySeg 
)

void FeaturePool::createNewFeatureExtraction ( char *  featureFileName,
double  vtln,
bool  doOffset,
bool  onlyPrepare 
) [protected]

void FeaturePool::createNewMultiStreamPool ( FeaturePool_Multistream_file files,
int  segID 
)

Todo:
Docs

Todo:
generalize this code to N channels!

References buffer, createNewPool(), FeaturePool_Multistream_file::featurePool, getVector(), infoBlock, FeaturePoolInfo::numberOfChannels, and poolLength.

Referenced by FeaturePool(), and Shout_Cluster::Shout_Cluster().

Here is the call graph for this function:

void FeaturePool::createNewPool ( char *  featureFileName,
char *  histNormName,
char *  histNormSpkName,
bool  noBuffering = false,
bool  onlyPrepare = false,
int  vtlnSegID = -1,
double  globalVtln = -1.0 
)

/

Todo:
Docs

References buffer, FeatureExtraction::createFeaturesUntilFrame(), SegmentationAdmin::curSeg, FeatureExtraction::doFeatureExtraction(), feaExtract, featureFile, featureNorm, FEATURENORM_CLUSTER, FILE_TYPE_RAW_DECODING, FILE_TYPE_RAW_DIARIZATION, FILE_TYPE_RAW_HISTOGRAM_NORM, FILE_TYPE_RAW_SAD, FILE_TYPE_RAW_SPKREC, FILE_TYPE_RAW_VTLN, FILE_TYPE_SHOUT, FILE_TYPE_TEXT, fileOffset, fileType, fillBuffer_ShoutFormat(), fillBuffer_TextFormat(), FeatureExtraction::finishClusterCMVN(), FeatureExtraction::finishExtraction(), SegmentationList::firstFrame, WriteFileLittleBigEndian::freadEndianSafe(), FeatureExtraction::getPool(), FeatureExtraction::getPoolSize(), getSegmentID(), PhoneModel::getSilSumHist(), Vector::getValue(), Gaussian::getVariance(), FeatureExtraction::getVectorSize(), infoBlock, FeaturePoolInfo::lastComponent, SegmentationList::lastFrame, SegmentationList::next, FeaturePoolInfo::numberOfChannels, numberOfSpkIDs, onlyMEL, FeatureExtraction::performClusterCMVNUntilFrame(), FeatureExtraction::performPCA(), poolFilled, poolLength, Vector::printVector(), readHeader_ShoutFormat(), readHeader_TextFormat(), restrictEnd, restrictStart, segList, FeatureExtraction::setNormalization(), FeatureExtraction::setVTLN(), spkID, Vector::sqrtElements(), textFeatureDistribution, SegmentationAdmin::timeStamp, Gaussian::train(), Gaussian::trainFinish(), vectorSize, and FeaturePoolInfo::weight.

Referenced by createNewMultiStreamPool(), FeaturePool(), NormalizeAM::NormalizeAM(), SpeakerRecognition::runTrials(), Shout_Cluster::Shout_Cluster(), Shout_MakeTrainSet::Shout_MakeTrainSet(), Shout_Preprocess::Shout_Preprocess(), Shout_VTLN::Shout_VTLN(), SpkrecStats::SpkrecStats(), and Whisper::Whisper().

Here is the call graph for this function:

bool FeaturePool::createUEMSegmentation ( int  segID,
int  channelNumber,
char *  label,
char *  UEM 
)

Todo:
Docs

References addSegment(), filter, and resetSegmentation().

Referenced by ShoutSegment::ShoutSegment().

Here is the call graph for this function:

bool FeaturePool::doSegmentsExist ( int  segmentationNr,
int  ID 
)

Checks if there are any segments with ID in segmentation segNr

References SegmentationList::ID, SegmentationList::next, poolLength, and segList.

Referenced by Train_Segmenter::trainModel().

void FeaturePool::enableFilter ( bool  enable  ) 

Enables or disables the filter

References filterEnabled.

Referenced by Shout_Cluster::Shout_Cluster().

void FeaturePool::fillBuffer_fromFeatureExtraction ( int  length,
int  ignoreFrames = 0 
) [protected]

Todo:
Docs

References buffer, Vector::copyVector(), feaExtract, FeatureExtraction::getPool(), and poolFilled.

Referenced by addFeatureFile().

Here is the call graph for this function:

void FeaturePool::fillBuffer_ShoutFormat ( int  length,
int  ignoreFrames = 0 
) [protected]

Creates a vector buffer and fills it with the vectors of the shout-formatted file.

References buffer, featureFile, poolFilled, and vectorSize.

Referenced by addFeatureFile(), and createNewPool().

void FeaturePool::fillBuffer_TextFormat ( int  length,
int  ignoreFrames = 0 
) [protected]

Creates a vector buffer and fills it with the vectors of the text-formatted file.

todo BUGFIX THIS!!!!

References buffer, Vector::divideElements(), featureFile, Gaussian::getMean(), Gaussian::getVariance(), poolFilled, Vector::setValue(), StringFunctions::splitList(), Vector::substractElements(), textFeatureDistribution, and vectorSize.

Referenced by addFeatureFile(), and createNewPool().

Here is the call graph for this function:

int FeaturePool::filterLongSegments ( int  segID,
int  labelNr,
int  newLabel,
int  minLength 
)

void FeaturePool::filterShortSegments ( int  segID,
int  labelNr,
int  labelSelf,
int  minNeighbours 
)

Filter a label-seq in a segmentation so that short segments of maximum duration maxSelf neighbouring (identical) long segments of minimum duration minNeighbours are merged into the neighbouring label.

References SegmentationList::firstFrame, SegmentationList::ID, SegmentationList::lastFrame, SegmentationList::next, and segList.

Referenced by ShoutSegment::ShoutSegment().

void FeaturePool::filterToSegmentation ( int  segNr,
FeaturePool feaPool = NULL 
)

All filtered frames are SPK01, the remaining frames SPK02..

References addSegment(), filter, poolLength, and resetSegmentation().

Here is the call graph for this function:

void FeaturePool::freeSegmentationID ( int  segNr  ) 

double FeaturePool::getAverageEnergy ( int  segNr,
int  channelNr,
double  varianceFactor 
)

char* FeaturePool::getCurInfoString ( SegmentationAdmin admin  )  const [inline]

double FeaturePool::getCurSegmentEnergy ( SegmentationAdmin admin,
int  offset 
)

Vector* FeaturePool::getCurSegmentVector ( SegmentationAdmin admin,
int  offset 
) [inline]

References getCurSegmentVectorList().

Referenced by TrainPhoneModel::baumWelch(), and TrainPhoneModel::viterbi().

Here is the call graph for this function:

Vector ** FeaturePool::getCurSegmentVectorList ( SegmentationAdmin admin,
int  offset 
)

Within the current active segment, it returns the vector with offset 'offset'.

References buffer, SegmentationAdmin::curSeg, SegmentationList::firstFrame, SegmentationList::lastFrame, and SegmentationAdmin::timeStamp.

Referenced by getCurSegmentVector().

Vector ** FeaturePool::getFirstVectorFirstSegmentList ( SegmentationAdmin admin,
int  segmentationNr,
int  ID,
bool  dontCareID = false,
bool *  isLastFromSegment = NULL,
bool *  inFilter = NULL 
)

Searches for the first segment with ID[0] = ID and if it finds it, it will return the first Vector of that segment. If no Vector is found, NULL is returned.

References SegmentationAdmin::curSeg, filter, filterEnabled, SegmentationList::firstFrame, getVectorList(), SegmentationList::ID, SegmentationList::lastFrame, SegmentationList::next, poolLength, SegmentationAdmin::prevSeg, restrictEnd, restrictStart, and segList.

Referenced by getFirstVectorFirstSegment(), and Segmenter::segmentFeaturePool().

Here is the call graph for this function:

Vector ** FeaturePool::getFirstVectorNextSegmentList ( SegmentationAdmin admin,
bool  dontCareID = false,
bool *  isLastFromSegment = NULL,
bool *  inFilter = NULL 
)

The next segment with the same ID[0] as the current segment will be set active and the first Vector of this segment will be returned. If no Vector is found, NULL is returned.

References SegmentationAdmin::curSeg, filter, filterEnabled, SegmentationList::firstFrame, getVectorList(), SegmentationList::ID, SegmentationList::lastFrame, SegmentationList::next, poolLength, SegmentationAdmin::prevSeg, and restrictEnd.

Referenced by getFirstVectorNextSegment(), and Segmenter::segmentFeaturePool().

Here is the call graph for this function:

Vector* FeaturePool::getNextVector ( SegmentationAdmin admin,
bool *  isLastFromSegment = NULL,
bool *  inFilter = NULL 
) [inline]

Vector ** FeaturePool::getNextVectorList ( SegmentationAdmin admin,
bool *  isLastFromSegment = NULL,
bool *  inFilter = NULL 
)

Returns a pointer to the vector that follows the last queried vector. If no one follows, it returns NULL.

References buffer, SegmentationAdmin::curSeg, featureFile, filter, filterEnabled, SegmentationList::lastFrame, poolLength, restrictEnd, SegmentationAdmin::timeStamp, and vectorSize.

Referenced by getNextVector(), and Segmenter::segmentFeaturePool().

int FeaturePool::getNumberOfSegments ( int  segNr,
int  ID 
)

Todo:
Docs

References getFirstVectorFirstSegment(), and getFirstVectorNextSegment().

Here is the call graph for this function:

int FeaturePool::getNumberOfSpeakers ( int  segNr  ) 

int FeaturePool::getPoolLength (  ) 

int FeaturePool::getSpeakerID ( int  segNr,
int  spkrNr 
)

double FeaturePool::getStreamWeight ( int  i  )  const [inline]

Vector ** FeaturePool::getVectorList ( SegmentationAdmin admin,
int  time 
)

Returns a pointer to the vector stored at timestamp 'time'.It will assert when time is bigger than the poolLength. If 'noBuffering' was true the poolLength is one. getVector(0) will then return the pointer to the last queried vector.

References buffer, poolLength, and SegmentationAdmin::timeStamp.

Referenced by getFirstVectorFirstSegmentList(), getFirstVectorNextSegmentList(), getVector(), SpeakerRecognition::runTrials(), Segmenter::segmentFeaturePool(), and Whisper::Whisper().

void FeaturePool::maxSegmentLength ( int  segNr,
int  labelNr,
int  size,
int  minRemainder 
)

void FeaturePool::mergeLabels ( int  segNr,
int  label1,
int  label2 
)

Merge the labels label1 and label2 in the segmentation segNr (to label1).

References SegmentationList::ID, SegmentationList::next, and segList.

Referenced by Train_Segmenter::mergeModels(), and ShoutSegment::ShoutSegment().

int FeaturePool::mergeSegmentations ( int *  seg,
int  nrSeg,
int  outSeg 
)

Todo:
Docs

References addSegment(), SegmentationList::ID, SegmentationList::next, poolLength, resetSegmentation(), and segList.

Here is the call graph for this function:

int FeaturePool::readHeader_ShoutFormat (  )  [protected]

Reads the header information of a shout feature vector file. Actually, this file type doesn't have the length of the file in its header, so the length is calculated by just reading trough the file...

References featureFile, WriteFileLittleBigEndian::freadEndianSafe(), Vector::readFloatData(), and vectorSize.

Referenced by addFeatureFile(), and createNewPool().

Here is the call graph for this function:

int FeaturePool::readHeader_TextFormat (  )  [protected]

Todo:
docs

todo BUGFIX THIS!!!!

References featureFile, StringFunctions::splitList(), and vectorSize.

Referenced by addFeatureFile(), and createNewPool().

Here is the call graph for this function:

void FeaturePool::readRTTM ( int  segmentationNr,
char *  mapCluster,
int  mapNr,
int  strLen,
int  prefixLength,
FILE *  inSegFile,
int  fillerID = -1,
int  ignoreFrames = 0,
int  trainFrames = 0,
char *  labelName = NULL 
)

Reads a segmentation from file (RTTM format) and stores the segmentation in segment number segmentationNr. ID[0] will be determined using the mapCluster. This variable contains an array of strings. When one of the strings matches, the ID will be the index of the string + 1. If no string matches, the ID will be zero. (the number of strings is mapNr, the length of each string is strLen). When prefixLength > 0, the first prefixLength characters of the RTTM 'speaker ID' will not be used in the match. When mapNr < 0, instead of matching strings, the remaining string will be converted to a number. If fillerID > 0, all gaps in the segmentation are filled with segments of fillerID ID.

Todo:
add checking file format...

Todo:
This last -1 is a bug-fix: segments should not overlap...

Todo:
This is a bug-fix so we're able to use ICSI's feature files in combination with SRI's SAD input file...

References FeaturePool_Multistream_file::featurePool, fileOffset, SegmentationList::firstFrame, SegmentationList::ID, infoBlock, SegmentationList::infoString, SegmentationList::lastFrame, multiStream, SegmentationList::next, FeaturePoolInfo::numberOfChannels, numberOfSpkIDs, poolLength, readRTTM(), resetSegmentation(), segList, spkID, and StringFunctions::splitList().

Referenced by AvgEnergy::AvgEnergy(), NormalizeAM::NormalizeAM(), readRTTM(), SpeakerRecognition::runTrials(), Shout_Cluster::Shout_Cluster(), Shout_MakeTrainSet::Shout_MakeTrainSet(), Shout_Preprocess::Shout_Preprocess(), Shout_VTLN::Shout_VTLN(), SpkrecStats::SpkrecStats(), Train_Segmenter::storeClusters(), and Whisper::Whisper().

Here is the call graph for this function:

void FeaturePool::removeLowEnergy ( int  segID,
int  channelNr,
bool  doShort = false 
)

void FeaturePool::resetStreamWeights (  ) 

void FeaturePool::restrictPool ( int  start,
int  end 
)

Todo:
Docs

References poolLength, restrictEnd, and restrictStart.

void FeaturePool::retrieveEnergy ( char *  featureFileName,
int  channelNr 
)

void FeaturePool::segmentationAddLabel ( int  sourceSegNr,
int  destSegNr,
int  sourceLabel,
int  destLabel 
)

void FeaturePool::segmentationCopy ( int  sourceSegNr,
int  destSegNr 
)

void FeaturePool::segmentationCreateOverlap ( int  segNr,
int  label 
)

void FeaturePool::segmentationFillGaps ( int  segNr,
int  labelNr 
)

Fill gaps in a segmentation with labels labelNr.

References SegmentationList::firstFrame, SegmentationList::infoString, SegmentationList::lastFrame, SegmentationList::next, and segList.

void FeaturePool::segmentationIntersection ( int  sourceSegNr,
int  filterSegNr,
int  filterLabel,
int  destSegNr 
)

It will copy the source segmentation into the destination segmentation, but only the parts that are also in the filter segmentation with the filter labelNr (-1 means all labels). This algorithm only works when the segments are added sequencially!

References addSegment(), filter, SegmentationList::firstFrame, SegmentationList::ID, SegmentationList::lastFrame, SegmentationList::next, resetSegmentation(), and segList.

Referenced by Train_Segmenter::loadClusters(), Train_Segmenter::mergeModels(), Segmenter::segmentFeaturePool(), ShoutSegment::ShoutSegment(), and Train_Segmenter::trainIteration().

Here is the call graph for this function:

void FeaturePool::segmentationSplit ( int  sourceSegNr,
int  destSegNr1,
int  destSegNr2 
)

All labels in the sourceSegNr are split in two. The first half is assigned to destSegNr1 and the second to destSegNr2..

References addSegment(), SegmentationList::firstFrame, SegmentationList::ID, SegmentationList::lastFrame, SegmentationList::next, resetSegmentation(), and segList.

Here is the call graph for this function:

void FeaturePool::segmentationSubset ( int  sourceSegNr,
int  destSegNr,
int  useLabel,
PhoneModel model,
int  nrSamples 
)

void FeaturePool::segmentationSubstract ( int  sourceSegNr,
int  filterSegNr,
int  destSegNr,
int  filterLabel = -1 
)

void FeaturePool::segmentationWiden ( int  segNr,
int  soundNr,
int  maxNrFrames,
int  onlyWidenLabel = -1 
)

Makes all labels this segmentation a bit wider (nrFrames) except for soundNr.

References SegmentationList::firstFrame, SegmentationList::ID, SegmentationList::lastFrame, SegmentationList::next, and segList.

Referenced by Train_Segmenter::train().

void FeaturePool::setCurSegmentVector ( int  segNr,
int  offset,
Vector vector 
)

Some users might want to fill the pool one Vector at a time. That's possible in combination with the FeaturePool(int poolS, int vectorS) constructor. Segments can be added with addSegment. Once a segment is added, this method can fill this segment with Vector objects.

The offset is the number of frames from the start of the segment.

This method will COPY the vector. The user still needs to delete its own Vector object.

References buffer, fillPool_curSeg, SegmentationList::firstFrame, Vector::setAllValues(), and vectorSize.

Here is the call graph for this function:

void FeaturePool::setCurSegmentVectors ( int  segNr,
FILE *  inFile,
bool  inputIsFloat = false 
)

Once a segment is initialized, it can be filled from file using this method.

References buffer, fillPool_curSeg, SegmentationList::lastFrame, and vectorSize.

Referenced by Adapt_AM::Adapt_AM(), and ShoutTrainModel::ShoutTrainModel().

void FeaturePool::setFeatureNormalization ( FEATURENORM_TYPE  m  ) 

/

Todo:
Docs

References featureNorm.

void FeaturePool::setFilter ( char *  featureFileName,
int  dimension,
double  threshold 
)

Add a filter to the pool. All frames that are filtered out are never offered to the user. with enableFilter() it is possible to enable or disable the filter. Only shout-format feature files are processed. If no file is available (NULL), the pool itself is used.

References buffer, filter, filterEnabled, WriteFileLittleBigEndian::freadEndianSafe(), Gaussian::getMean(), Vector::getValue(), Gaussian::getVariance(), poolLength, Gaussian::train(), Gaussian::trainFinish(), and vectorSize.

Here is the call graph for this function:

void FeaturePool::setOnlyMEL (  ) 

/

Todo:
Docs

References feaExtract, onlyMEL, and FeatureExtraction::setOnlyMEL().

Referenced by Shout_Preprocess::Shout_Preprocess().

Here is the call graph for this function:

void FeaturePool::setSegmentID ( int  idNr,
int  val,
SegmentationAdmin admin 
) const [inline]

void FeaturePool::setStreamWeights ( double *  w,
bool  forEver 
)

void FeaturePool::splitOnEnergy ( int  segNr,
int  sourceLabel,
int  silLabel,
int  soundLabel,
int  nrSamplesSil,
int  nrSamplesSound,
int  comp 
)

int FeaturePool::startTimeStamp (  )  const [inline]

References restrictStart.

Referenced by Segmenter::segmentFeaturePool().

void FeaturePool::storeFeatureVectors ( FILE *  file  ) 

/

Todo:
Docs

References feaExtract, and FeatureExtraction::storeFeatureVectors().

Referenced by Shout_Preprocess::Shout_Preprocess(), and SpkrecStats::SpkrecStats().

Here is the call graph for this function:

void FeaturePool::writeRTTM ( int  segmentationNr,
const char *  label,
const char *  prefix,
FILE *  outFile = NULL,
int  nrPr = 0,
int  overwriteVTLN = -1 
)

Prints the current segmentation in RTTM format to the screen (outFile = NULL), or to a file. The label is placed as label in each line, the prefix is added to the segment ID. If nrPr is > 0, the prefix string contains all speaker labels, it is supposed to be nrSpeakers*nrPr long..

References SegmentationList::firstFrame, UniqueIDList::ID, SegmentationList::ID, SegmentationList::infoString, SegmentationList::lastFrame, SegmentationList::next, UniqueIDList::next, and segList.

Referenced by Train_Segmenter::getOverlap(), Shout_VTLN::Shout_VTLN(), ShoutSegment::ShoutSegment(), and Train_Segmenter::train().


Member Data Documentation

bool FeaturePool::freeID[MAX_NR_SEGMENTATIONS] [protected]

int FeaturePool::numberOfSpkIDs[MAX_NR_SEGMENTATIONS] [protected]

bool FeaturePool::onlyMEL [protected]

int FeaturePool::spkID[MAX_NR_SEGMENTATIONS][MAX_NR_SPKIDS] [protected]