27 int main(
int argc,
char *argv[]) {
29 using namespace kaldi;
33 "Initialize ivector-extractor\n" 34 "Usage: ivector-extractor-init [options] <fgmm-in> <ivector-extractor-out>\n" 36 " ivector-extractor-init 4.fgmm 0.ie\n";
41 po.
Register(
"binary", &binary,
"Write output in binary mode");
52 std::string fgmm_rxfilename = po.
GetArg(1),
53 ivector_extractor_wxfilename = po.
GetArg(2);
62 KALDI_LOG <<
"Initialized iVector extractor with iVector dimension " 63 << extractor.
IvectorDim() <<
" and wrote it to " 64 << ivector_extractor_wxfilename;
66 }
catch(
const std::exception &e) {
67 std::cerr << e.what();
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
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)
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...
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 WriteKaldiObject(const C &c, const std::string &filename, bool binary)