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...

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 |
DataStats * | data |
int | nrOfModels |
int | nrOfDecisionRules |
int | nrOfDecisionRuleSamples [MAX_NUMBER_OF_DECISION_RULES][MAX_CLUSTERS] |
int | nrOfSil |
char * | trainDirName |
FeaturePool * | featurePool |
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 | |||
) |
References checkDataDir(), data, nrOfModels, DataStats::nrOfSamples, nrOfSil, openPhoneFiles(), performCluster, performWhat, skippedLines, TASK_TYPE_DIAR, TASK_TYPE_HIST_NORM, TASK_TYPE_PHONE, totalPhonesStored, trainDirName, and vectorSize.

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.

Shout_MakeTrainSet::~Shout_MakeTrainSet | ( | ) |
The destructor gets rid of some administration...
References closePhoneFiles(), skippedLines, and trainDirName.

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().

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] |
Creates a file handle to each phone data file.
References data, nrOfDecisionRules, nrOfModels, performWhat, phoneFile, TASK_TYPE_ARTICULATORY, TASK_TYPE_HIST_NORM, TASK_TYPE_SAD, TASK_TYPE_VTLN, and trainDirName.
Referenced by Shout_MakeTrainSet().
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().

Member Data Documentation
DataStats* Shout_MakeTrainSet::data [protected] |
Referenced by checkDataDir(), closePhoneFiles(), MergeTrainSet::MergeTrainSet(), openPhoneFiles(), Shout_MakeTrainSet(), and storePhone().
FeaturePool* Shout_MakeTrainSet::featurePool [protected] |
Referenced by setFeaturePool(), Shout_MakeTrainSet(), and storePhone().
int Shout_MakeTrainSet::nrOfDecisionRules [protected] |
Referenced by checkDataDir(), closePhoneFiles(), openPhoneFiles(), and Shout_MakeTrainSet().
int Shout_MakeTrainSet::nrOfDecisionRuleSamples[MAX_NUMBER_OF_DECISION_RULES][MAX_CLUSTERS] [protected] |
Referenced by checkDataDir(), closePhoneFiles(), and Shout_MakeTrainSet().
int Shout_MakeTrainSet::nrOfModels [protected] |
Referenced by checkDataDir(), closePhoneFiles(), MergeTrainSet::MergeTrainSet(), openPhoneFiles(), and Shout_MakeTrainSet().
int Shout_MakeTrainSet::nrOfSil [protected] |
Referenced by checkDataDir(), closePhoneFiles(), MergeTrainSet::MergeTrainSet(), Shout_MakeTrainSet(), and storePhone().
bool Shout_MakeTrainSet::performCluster [protected] |
Referenced by Shout_MakeTrainSet().
TASK_TYPE Shout_MakeTrainSet::performWhat [protected] |
Referenced by checkDataDir(), closePhoneFiles(), MergeTrainSet::MergeTrainSet(), openPhoneFiles(), Shout_MakeTrainSet(), and storePhone().
FILE** Shout_MakeTrainSet::phoneFile [protected] |
Referenced by closePhoneFiles(), MergeTrainSet::MergeTrainSet(), openPhoneFiles(), and storePhone().
int Shout_MakeTrainSet::skippedLines [protected] |
Referenced by Shout_MakeTrainSet(), and ~Shout_MakeTrainSet().
int Shout_MakeTrainSet::totalPhonesStored [protected] |
Referenced by closePhoneFiles(), MergeTrainSet::MergeTrainSet(), Shout_MakeTrainSet(), and storePhone().
char* Shout_MakeTrainSet::trainDirName [protected] |
Referenced by checkDataDir(), closePhoneFiles(), openPhoneFiles(), Shout_MakeTrainSet(), and ~Shout_MakeTrainSet().
float Shout_MakeTrainSet::useProbability [protected] |
Referenced by Shout_MakeTrainSet(), and storePhone().
int Shout_MakeTrainSet::vectorSize [protected] |
Referenced by checkDataDir(), closePhoneFiles(), MergeTrainSet::MergeTrainSet(), and Shout_MakeTrainSet().