Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 24 of file fgmm-global-copy.cc.
References ParseOptions::GetArg(), KALDI_LOG, ParseOptions::NumArgs(), ParseOptions::PrintUsage(), ParseOptions::Read(), FullGmm::Read(), ParseOptions::Register(), Input::Stream(), and kaldi::WriteKaldiObject().
26 using namespace kaldi;
30 "Copy a full-covariance GMM\n" 31 "Usage: fgmm-global-copy [options] <model-in> <model-out>\n" 32 "e.g.: fgmm-global-copy --binary=false 1.model - | less";
34 bool binary_write =
true;
36 po.Register(
"binary", &binary_write,
"Write output in binary mode");
40 if (po.NumArgs() != 2) {
45 std::string model_in_filename = po.GetArg(1),
46 model_out_filename = po.GetArg(2);
51 Input ki(model_in_filename, &binary_read);
52 fgmm.
Read(ki.Stream(), 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...
Definition for Gaussian Mixture Model with full covariances.
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
void Read(std::istream &is, bool binary)
void WriteKaldiObject(const C &c, const std::string &filename, bool binary)