#include "hmm/transition-model.h"
#include "hmm/hmm-utils.h"
#include "util/common-utils.h"
#include "fst/fstlib.h"
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 25 of file make-pdf-to-tid-transducer.cc.
References ParseOptions::GetArg(), ParseOptions::GetOptArg(), kaldi::GetPdfToTransitionIdTransducer(), KALDI_ERR, ParseOptions::NumArgs(), ParseOptions::PrintUsage(), ParseOptions::Read(), and kaldi::ReadKaldiObject().
27 using namespace kaldi;
29 using fst::SymbolTable;
34 "Make transducer from pdfs to transition-ids\n" 35 "Usage: make-pdf-to-tid-transducer model-filename [fst-out]\n" 37 " make-pdf-to-tid-transducer 1.mdl > pdf2tid.fst\n";
42 if (po.NumArgs() <1 || po.NumArgs() > 2) {
47 std::string trans_model_filename = po.GetArg(1);
48 std::string fst_out_filename = po.GetOptArg(2);
56 if (fst_out_filename ==
"")
57 _setmode(_fileno(stdout), _O_BINARY);
60 if (!fst->Write(fst_out_filename))
62 << (fst_out_filename ==
"" ?
"standard output" : fst_out_filename);
64 }
catch(
const std::exception &e) {
65 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...
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...
fst::VectorFst< fst::StdArc > * GetPdfToTransitionIdTransducer(const TransitionModel &trans_model)
Returns a transducer from pdfs plus one (input) to transition-ids (output).