21 #include "fst/fstlib.h" 25 int main(
int argc,
char *argv[]) {
27 using namespace kaldi;
29 using fst::SymbolTable;
34 "Copies a transition model (this can be used to separate transition \n" 35 " models from the acoustic models they are written with.\n" 36 "Usage: copy-transition-model [options] <transition-model or model file> <transition-model-out>\n" 38 " copy-transition-model --binary=false 1.mdl 1.txt\n";
44 po.
Register(
"binary", &binary,
"Write output in binary mode.");
53 std::string transition_model_rxfilename = po.
GetArg(1),
54 transition_model_wxfilename = po.
GetArg(2);
63 }
catch(
const std::exception &e) {
64 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].
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.
int main(int argc, char *argv[])
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)