Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 30 of file fstpushspecial.cc.
References ParseOptions::GetOptArg(), ParseOptions::NumArgs(), ParseOptions::PrintUsage(), fst::PushSpecial(), ParseOptions::Read(), fst::ReadFstKaldi(), ParseOptions::Register(), and fst::WriteFstKaldi().
32 using namespace kaldi;
37 "Pushes weights in an FST such that all the states\n" 38 "in the FST have arcs and final-probs with weights that\n" 39 "sum to the same amount (viewed as being in the log semiring).\n" 40 "Thus, the \"extra weight\" is distributed throughout the FST.\n" 41 "Tolerance parameter --delta controls how exact this is, and the\n" 44 "Usage: fstpushspecial [options] [in.fst [out.fst] ]\n";
48 po.Register(
"delta", &delta,
"Delta cost: after pushing, all states will " 49 "have a total weight that differs from the average by no more " 53 if (po.NumArgs() > 2) {
58 std::string fst_in_filename = po.GetOptArg(1),
59 fst_out_filename = po.GetOptArg(2);
68 }
catch(
const std::exception &e) {
69 std::cerr << e.what();
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
For an extended explanation of the framework of which grammar-fsts are a part, please see Support for...
The class ParseOptions is for parsing command-line options; see Parsing command-line options for more...
void PushSpecial(VectorFst< StdArc > *fst, float delta)
void WriteFstKaldi(std::ostream &os, bool binary, const VectorFst< Arc > &t)
void ReadFstKaldi(std::istream &is, bool binary, VectorFst< Arc > *fst)