Go to the source code of this file.
 | 
| int  | main (int argc, char *argv[]) | 
|   | 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char *  | 
          argv[]  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 28 of file sgmm2-copy.cc.
References ParseOptions::GetArg(), KALDI_LOG, kaldi::kSgmmWriteAll, ParseOptions::NumArgs(), ParseOptions::PrintUsage(), ParseOptions::Read(), TransitionModel::Read(), AmSgmm2::Read(), ParseOptions::Register(), Output::Stream(), Input::Stream(), TransitionModel::Write(), and AmSgmm2::Write().
   30     using namespace kaldi;
    33         "Copy SGMM (possibly changing binary/text format)\n"    34         "Usage: sgmm2-copy [options] <model-in> <model-out>\n"    35         "e.g.: sgmm2-copy --binary=false 1.mdl 1_text.mdl\n";
    37     bool binary_write = 
true;
    40     po.Register(
"binary", &binary_write, 
"Write output in binary mode");
    43     if (po.NumArgs() != 2) {
    47     std::string model_in_filename = po.GetArg(1),
    48         model_out_filename = po.GetArg(2);
    54       Input ki(model_in_filename, &binary);
    55       trans_model.
Read(ki.Stream(), binary);
    56       am_sgmm.
Read(ki.Stream(), binary);
    60       Output ko(model_out_filename, binary_write);
    61       trans_model.
Write(ko.Stream(), binary_write);
    66     KALDI_LOG << 
"Written model to " << model_out_filename;
    68   } 
catch(
const std::exception &e) {
    69     std::cerr << e.what();
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
 
void Write(std::ostream &os, bool binary, SgmmWriteFlagsType write_params) const
 
Class for definition of the subspace Gmm acoustic model. 
 
void Read(std::istream &is, bool binary)
 
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
 
void Read(std::istream &is, bool binary)
 
void Write(std::ostream &os, bool binary) const