Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/gmm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,11 @@ int main(int argc, char* argv[]) {
&covariance_matrices, &log_likelihood)) {
std::ostringstream error_message;
error_message << "Failed to train Gaussian mixture models. "
<< "Please consider the following attemps: "
<< "Please consider the following attempts: "
<< "a) increase training data; "
<< "b) decrease number of mixtures; "
<< "c) use (block) diagonal covariance";
<< "c) use (block) diagonal covariance; "
<< "d) use UBM with MAP adaptation";
sptk::PrintErrorMessage("gmm", error_message);
return 1;
}
Expand Down
9 changes: 6 additions & 3 deletions src/math/gaussian_mixture_modeling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,12 @@ bool GaussianMixtureModeling::Run(
if (0.0 != mask_[l][m]) {
const double mu_l(buffer1[k][l] / buffer0[k]);
const double mu_m(buffer1[k][m] / buffer0[k]);
const double a(buffer2[k][l][m] -
buffer0[k] *
(mu_l * mu[m] + mu[l] * mu_m - mu[l] * mu[m]));
const double a(
0.0 == buffer0[k]
? 0.0
: buffer2[k][l][m] -
buffer0[k] *
(mu_l * mu[m] + mu[l] * mu_m - mu[l] * mu[m]));
const double b(xi_[k] * ubm_covariance_matrices_[k][l][m]);
const double c(xi_[k] * (ubm_mean_vectors_[k][l] - mu[l]) *
(ubm_mean_vectors_[k][m] - mu[m]));
Expand Down