27 int main(
int argc,
char *argv[]) {
29 using namespace kaldi;
33 "Initialize lvtln transforms\n" 34 "Usage: gmm-init-lvtln [options] <lvtln-out>\n" 36 " gmm-init-lvtln --dim=13 --num-classes=21 --default-class=10 1.lvtln\n";
40 int32 default_class = 10;
41 int32 num_classes = 21;
44 po.
Register(
"binary", &binary,
"Write output in binary mode");
45 po.
Register(
"dim", &dim,
"feature dimension");
46 po.
Register(
"num-classes", &num_classes,
"Number of transforms to be trained");
47 po.
Register(
"default-class", &default_class,
"Index of default transform, " 48 "to be used if no data is available for training");
57 std::string lvtln_wxfilename = po.
GetArg(1);
60 LinearVtln lvtln(dim, num_classes, default_class);
63 KALDI_LOG <<
"Initialized LVTLN object and wrote it to " 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...
void PrintUsage(bool print_command_line=false)
Prints the usage documentation [provided in the constructor].
int main(int argc, char *argv[])
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 WriteKaldiObject(const C &c, const std::string &filename, bool binary)
std::string PrintableWxfilename(const std::string &wxfilename)
PrintableWxfilename turns the wxfilename into a more human-readable form for error reporting...