Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 27 of file gmm-init-lvtln.cc.
References ParseOptions::GetArg(), KALDI_LOG, ParseOptions::NumArgs(), kaldi::PrintableWxfilename(), ParseOptions::PrintUsage(), ParseOptions::Read(), ParseOptions::Register(), and kaldi::WriteKaldiObject().
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");
52 if (po.NumArgs() != 1) {
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...
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
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...