39 using namespace kaldi;
44 "Minimizes FST after encoding [this algorithm applicable to all FSTs in tropical semiring]\n" 46 "Usage: fstaddsubsequentialloop subseq_sym [in.fst [out.fst] ]\n" 47 "E.g.: fstaddsubsequentialloop 52 < LG.fst > LG_sub.fst\n";
51 po.Register(
"delta", &delta,
52 "Delta likelihood used for quantization of weights");
55 if (po.NumArgs() < 1 || po.NumArgs() > 3) {
62 KALDI_ERR <<
"Invalid subsequential symbol "<<po.GetArg(1);
64 std::string fst_in_filename = po.GetOptArg(2);
66 std::string fst_out_filename = po.GetOptArg(3);
71 if (subseq_sym <= h) {
72 std::cerr <<
"fstaddsubsequentialloop.cc: subseq symbol does not seem right, "<<subseq_sym<<
" <= "<<h<<
'\n';
80 }
catch(
const std::exception &e) {
81 std::cerr << e.what();
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
bool ConvertStringToInteger(const std::string &str, Int *out)
Converts a string into an integer via strtoll and returns false if there was any kind of problem (i...
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 AddSubsequentialLoop(StdArc::Label subseq_symbol, MutableFst< StdArc > *fst)
Modifies an FST so that it transuces the same paths, but the input side of the paths can all have the...
Arc::Label HighestNumberedInputSymbol(const Fst< Arc > &fst)
Returns the highest numbered input symbol id of the FST (or zero for an empty FST.
void WriteFstKaldi(std::ostream &os, bool binary, const VectorFst< Arc > &t)
void ReadFstKaldi(std::istream &is, bool binary, VectorFst< Arc > *fst)