Shout_MakeTrainSet Class Reference

This class is the base class for the shout_maketrainset application. It creates a new AM trainset given a Master Label File and an output directory. More...

Inheritance diagram for Shout_MakeTrainSet:

List of all members.


Public Member Functions

 Shout_MakeTrainSet (char *task, char *phoneSetFileName, char *trainDirName)
 Shout_MakeTrainSet (char *task, char *phoneSetFile, char *datFile, char *rawName, char *rttmFileName, char *trainDirName, char *decisionTree, char *method, char *trainList, char *speakerFilter, float useP)
 ~Shout_MakeTrainSet ()
void closePhoneFiles (bool printOutput)
void setFeaturePool (FeaturePool *fp)
void storePhone (int cdmID, int contextLeft, int phoneID, int contextRight, int b1, int b2, int b3, int numberOfObservations)

Protected Member Functions

void openPhoneFiles ()
void checkDataDir (bool allowCDM)

Protected Attributes

bool performCluster
TASK_TYPE performWhat
FILE ** phoneFile
DataStatsdata
int nrOfModels
int nrOfDecisionRules
int nrOfDecisionRuleSamples [MAX_NUMBER_OF_DECISION_RULES][MAX_CLUSTERS]
int nrOfSil
char * trainDirName
FeaturePoolfeaturePool
int totalPhonesStored
int vectorSize
int skippedLines
float useProbability

Detailed Description

This class is the base class for the shout_maketrainset application. It creates a new AM trainset given a Master Label File and an output directory.

Constructor & Destructor Documentation

Shout_MakeTrainSet::Shout_MakeTrainSet ( char *  task,
char *  phoneSetFileName,
char *  trainDirName 
)

Shout_MakeTrainSet::Shout_MakeTrainSet ( char *  task,
char *  phoneSetFileName,
char *  datFile,
char *  rawName,
char *  rttmFileName,
char *  tD,
char *  decisionTree,
char *  method,
char *  trainList,
char *  speakerFilter,
float  useP 
)

This constructor will read a phone definition file and a hypothesis file. If both are consistent, it will write the features of the phones from the MLF to the output training directory. ShoutTrainMaster reads the data from this file during training.

Todo:
I'm in a hurry because our harddrive is full with accumulator data! Make sure to clean up this bit of code later!

References Vector::addElements(), checkDataDir(), FeaturePool::claimSegmentationID(), FeaturePool::createNewPool(), data, featurePool, 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, WriteFileLittleBigEndian::freadEndianSafe(), FeaturePool::getVectorSize(), nrOfDecisionRules, nrOfDecisionRuleSamples, nrOfModels, nrOfSil, openPhoneFiles(), performCluster, performWhat, FeaturePool::readRTTM(), Vector::setAllValues(), skippedLines, Vector::storeData(), storePhone(), TASK_TYPE_ARTICULATORY, TASK_TYPE_DIAR, TASK_TYPE_HIST_NORM, TASK_TYPE_PHONE, TASK_TYPE_SAD, TASK_TYPE_UNDEF, TASK_TYPE_VTLN, totalPhonesStored, trainDirName, useProbability, and vectorSize.

Here is the call graph for this function:

Shout_MakeTrainSet::~Shout_MakeTrainSet (  ) 

The destructor gets rid of some administration...

References closePhoneFiles(), skippedLines, and trainDirName.

Here is the call graph for this function:


Member Function Documentation

void Shout_MakeTrainSet::checkDataDir ( bool  allowCDM  )  [protected]

Checks if the acoustic data in the training directory is valid. If allowCDM is false, a warning is printed when the data contains Cluster Dependent Model information.

References data, WriteFileLittleBigEndian::freadEndianSafe(), DataStats::name, nrOfDecisionRules, nrOfDecisionRuleSamples, nrOfModels, DataStats::nrOfSamples, nrOfSil, performWhat, TASK_TYPE_ARTICULATORY, TASK_TYPE_DIAR, TASK_TYPE_HIST_NORM, TASK_TYPE_PHONE, trainDirName, and vectorSize.

Referenced by Shout_MakeTrainSet().

Here is the call graph for this function:

void Shout_MakeTrainSet::closePhoneFiles ( bool  printOutput  ) 

Writes final statistics are written to disc and if printOutput is true, some statistics are written to standard output.

References data, nrOfDecisionRules, nrOfDecisionRuleSamples, nrOfModels, DataStats::nrOfSamples, nrOfSil, performWhat, phoneFile, TASK_TYPE_ARTICULATORY, TASK_TYPE_HIST_NORM, TASK_TYPE_SAD, TASK_TYPE_VTLN, totalPhonesStored, trainDirName, and vectorSize.

Referenced by ~Shout_MakeTrainSet().

void Shout_MakeTrainSet::openPhoneFiles (  )  [protected]

void Shout_MakeTrainSet::setFeaturePool ( FeaturePool fp  ) 

Sets a new feature pool for storing phones..

References featurePool.

void Shout_MakeTrainSet::storePhone ( int  cdmID,
int  contextLeft,
int  phoneID,
int  contextRight,
int  b1,
int  b2,
int  b3,
int  numberOfObservations 
)

Stores a phone to the data directory.

  • cdmID determines for which speaker cluster this data is used.
  • contextLeft and contextRight determine which phones are at the left- and right of this phone. (not always used)
  • phoneID is the ID of the phone itself.
  • bl, b2, b3 and e3 provide state alignment information.

References data, featurePool, Vector::getValue(), FeaturePool::getVector(), DataStats::nrOfSamples, nrOfSil, performWhat, phoneFile, Vector::storeData(), TASK_TYPE_ARTICULATORY, totalPhonesStored, and useProbability.

Referenced by Shout_MakeTrainSet().

Here is the call graph for this function:


Member Data Documentation

int Shout_MakeTrainSet::nrOfDecisionRuleSamples[MAX_NUMBER_OF_DECISION_RULES][MAX_CLUSTERS] [protected]