28 using namespace kaldi;
32 "Do update for MLLT (also known as STC)\n" 33 "Usage: est-mllt [options] <mllt-mat-out> <stats-in1> <stats-in2> ... \n" 34 "e.g.: est-mllt 2.mat 1a.macc 1b.macc ... \n" 35 "where the stats are obtained from gmm-acc-mllt\n" 36 "Note: use compose-transforms <mllt-mat-out> <prev-mllt-mat> to combine with previous\n" 37 " MLLT or LDA transform, if any, and\n" 38 " gmm-transform-means to apply <mllt-mat-out> to GMM means.\n";
43 po.Register(
"binary", &binary,
"Write output in binary mode");
47 if (po.NumArgs() < 2) {
52 std::string mllt_out_filename = po.GetArg(1);
55 for (int32
i = 2;
i <= po.NumArgs();
i++) {
56 std::string acc_filename = po.GetArg(
i);
57 bool binary_in, add =
true;
58 Input ki(acc_filename, &binary_in);
59 mllt_accs.
Read(ki.Stream(), binary_in, add);
65 mllt_accs.
Update(&mat, &objf_impr, &count);
67 KALDI_LOG <<
"Overall objective function improvement for MLLT is " 68 << (objf_impr/
count) <<
" over " << count <<
" frames, logdet is " 71 Output ko(mllt_out_filename, binary);
72 mat.Write(ko.Stream(), binary);
75 }
catch(
const std::exception &e) {
76 std::cerr << e.what() <<
'\n';
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
void Read(std::istream &is, bool binary, bool add=false)
void SetUnit()
Sets to zero, except ones along diagonal [for non-square matrices too].
void Update(MatrixBase< BaseFloat > *M, BaseFloat *objf_impr_out, BaseFloat *count_out) const
The Update function does the ML update; it requires that M has the right size.
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
A class for estimating Maximum Likelihood Linear Transform, also known as global Semi-tied Covariance...