25 int main(
int argc,
char *argv[]) {
27 using namespace kaldi;
31 "Convert single full-covariance GMM to single diagonal-covariance GMM.\n" 32 "Usage: fgmm-global-to-gmm [options] 1.fgmm 1.gmm\n";
36 po.
Register(
"binary", &binary,
"Write output in binary mode");
44 std::string fgmm_rxfilename = po.
GetArg(1),
45 gmm_wxfilename = po.
GetArg(2);
51 Input ki(fgmm_rxfilename, &binary_read);
58 KALDI_LOG <<
"Written diagonal GMM to " << gmm_wxfilename;
59 }
catch(
const std::exception &e) {
60 std::cerr << e.what() <<
'\n';
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
int main(int argc, char *argv[])
Definition for Gaussian Mixture Model with full covariances.
void PrintUsage(bool print_command_line=false)
Prints the usage documentation [provided in the constructor].
void Register(const std::string &name, bool *ptr, const std::string &doc)
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
int Read(int argc, const char *const *argv)
Parses the command line options and fills the ParseOptions-registered variables.
std::string GetArg(int param) const
Returns one of the positional parameters; 1-based indexing for argc/argv compatibility.
void Read(std::istream &is, bool binary)
void CopyFromFullGmm(const FullGmm &fullgmm)
Copies from given FullGmm.
int NumArgs() const
Number of positional parameters (c.f. argc-1).
Definition for Gaussian Mixture Model with diagonal covariances.
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)