30 using namespace kaldi;
34 "Transform GMM means with linear or affine transform\n" 35 "This version for a single GMM, e.g. a UBM.\n" 36 "Useful when estimating MLLT/STC\n" 37 "Usage: gmm-transform-means-global <transform-matrix> <gmm-in> <gmm-out>\n" 38 "e.g.: gmm-transform-means-global 2.mat 2.dubm 3.dubm\n";
43 po.Register(
"binary", &binary,
"Write output in binary mode");
47 if (po.NumArgs() != 3) {
52 std::string mat_rxfilename = po.GetArg(1),
53 gmm_in_rxfilename = po.GetArg(2),
54 gmm_out_wxfilename = po.GetArg(3);
62 int32 dim = gmm.
Dim();
65 "model has dimension " << gmm.
Dim();
69 "model has dimension " << gmm.
Dim() <<
" (neither a linear nor an " 91 KALDI_LOG <<
"Written model to " << gmm_out_wxfilename;
93 }
catch(
const std::exception &e) {
94 std::cerr << e.what() <<
'\n';
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
int32 Dim() const
Returns the dimensionality of the Gaussian mean vectors.
MatrixIndexT NumCols() const
Returns number of columns (or zero for empty matrix).
int32 ComputeGconsts()
Sets the gconsts.
void SetMeans(const MatrixBase< Real > &m)
Use SetMeans to update only the Gaussian means (and not variances)
void CopyFromMat(const MatrixBase< OtherReal > &M, MatrixTransposeType trans=kNoTrans)
Copy given matrix. (no resize is done).
void ReadKaldiObject(const std::string &filename, Matrix< float > *m)
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
void GetMeans(Matrix< Real > *m) const
Accessor for means.
void AddMatMat(const Real alpha, const MatrixBase< Real > &A, MatrixTransposeType transA, const MatrixBase< Real > &B, MatrixTransposeType transB, const Real beta)
MatrixIndexT NumRows() const
Returns number of rows (or zero for empty matrix).
Definition for Gaussian Mixture Model with diagonal covariances.
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)
Sub-matrix representation.
void Set(Real)
Sets all elements to a specific value.