24 int main(
int argc,
char *argv[]) {
26 using namespace kaldi;
30 "Copy a diagonal-covariance GMM\n" 31 "Usage: gmm-global-copy [options] <model-in> <model-out>\n" 32 "e.g.: gmm-global-copy --binary=false 1.model - | less";
34 bool binary_write =
true;
36 po.
Register(
"binary", &binary_write,
"Write output in binary mode");
45 std::string model_in_filename = po.
GetArg(1),
46 model_out_filename = po.
GetArg(2);
51 Input ki(model_in_filename, &binary_read);
56 KALDI_LOG <<
"Written model to " << model_out_filename;
57 }
catch(
const std::exception &e) {
58 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[])
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.
int NumArgs() const
Number of positional parameters (c.f. argc-1).
void Read(std::istream &in, bool binary)
Definition for Gaussian Mixture Model with diagonal covariances.
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)