28 for (
const char *c = str.c_str(); *c !=
'\0'; c++) {
34 case 'a': flags |=
kGmmAll;
break;
36 <<
" of GmmFlagsType option string " 57 KALDI_WARN <<
"Adding in kGmmWeights (\"w\") to empty flags.";
66 for (
const char *c = str.c_str(); *c !=
'\0'; c++) {
78 <<
" of SgmmUpdateFlagsType option string " 88 for (
const char *c = str.c_str(); *c !=
'\0'; c++) {
96 <<
" of SgmmWriteFlagsType option string " 110 return occupancy/(num_components+1.0e-10) <
117 int32 target_components,
120 std::vector<int32> *targets) {
121 std::priority_queue<CountStats> split_queue;
131 for (
int32 num_gauss = num_pdfs; num_gauss < target_components;) {
132 CountStats state_to_split = split_queue.top();
134 KALDI_WARN <<
"Could not split up to " << target_components
135 <<
" due to min-count = " << min_count
136 <<
" (or no counts at all)\n";
148 split_queue.push(state_to_split);
150 targets->resize(num_pdfs);
151 while (!split_queue.empty()) {
153 int32 pdf_tgt_comp = split_queue.top().num_components;
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
uint16 SgmmWriteFlagsType
Bitwise OR of the above flags.
GmmFlagsType AugmentGmmFlags(GmmFlagsType f)
Returns "augmented" version of flags: e.g.
GmmFlagsType StringToGmmFlags(std::string str)
Convert string which is some subset of "mSwa" to flags.
CountStats(int32 p, int32 n, BaseFloat occ)
bool operator<(const CountStats &other) const
SgmmUpdateFlagsType StringToSgmmUpdateFlags(std::string str)
uint16 GmmFlagsType
Bitwise OR of the above flags.
void GetSplitTargets(const Vector< BaseFloat > &state_occs, int32 target_components, BaseFloat power, BaseFloat min_count, std::vector< int32 > *targets)
Get Gaussian-mixture or substate-mixture splitting targets, according to a power rule (e...
t .. not really part of SGMM.
uint16 SgmmUpdateFlagsType
Bitwise OR of the above flags.
The letters correspond to the variable names.
MatrixIndexT Dim() const
Returns the dimension of the vector.
std::string CharToString(const char &c)
A class representing a vector.
#define KALDI_ASSERT(cond)
std::string GmmFlagsToString(GmmFlagsType flags)
Convert GMM flags to string.
SgmmUpdateFlagsType StringToSgmmWriteFlags(std::string str)