23 #ifndef KALDI_ONLINE_ONLINE_FASTER_DECODER_H_ 24 #define KALDI_ONLINE_ONLINE_FASTER_DECODER_H_ 46 rt_min(.7), rt_max(.75), batch_size(27),
47 inter_utt_sil(50), max_utt_len_(1500),
48 update_interval(3), beam_update(.01),
49 max_beam_update(0.05) {}
54 "Approximate minimum decoding run time factor");
56 "Approximate maximum decoding run time factor");
57 opts->
Register(
"update-interval", &update_interval,
58 "Beam update interval in frames");
59 opts->
Register(
"beam-update", &beam_update,
"Beam update rate");
60 opts->
Register(
"max-beam-update", &max_beam_update,
"Max beam update rate");
61 opts->
Register(
"inter-utt-sil", &inter_utt_sil,
62 "Maximum # of silence frames to trigger new utterance");
63 opts->
Register(
"max-utt-length", &max_utt_len_,
64 "If the utterance becomes longer than this number of frames, " 65 "shorter silence is acceptable as an utterance separator");
81 const std::vector<int32> &sil_phones,
84 silence_set_(sil_phones), trans_model_(trans_model),
86 state_(kEndFeats), frame_(0), utt_frames_(0) {}
92 bool PartialTraceback(fst::MutableFst<LatticeArc> *out_fst);
97 void FinishTraceBack(fst::MutableFst<LatticeArc> *fst_out);
100 bool EndOfUtterance();
105 void ResetDecoder(
bool full);
109 void TracebackNFrames(
int32 nframes, fst::MutableFst<LatticeArc> *out_fst);
112 void MakeLattice(
const Token *start,
114 fst::MutableFst<LatticeArc> *out_fst)
const;
117 void UpdateImmortalToken();
133 #endif // KALDI_ONLINE_ONLINE_FASTER_DECODER_H_
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
BaseFloat max_beam_update
DecodableInterface provides a link between the (acoustic-modeling and feature-processing) code and th...
void Register(OptionsItf *opts, bool full)
For an extended explanation of the framework of which grammar-fsts are a part, please see Support for...
OnlineFasterDecoderOpts()
BaseFloat & effective_beam_
#define KALDI_DISALLOW_COPY_AND_ASSIGN(type)
const BaseFloat max_beam_
virtual void Register(const std::string &name, bool *ptr, const std::string &doc)=0
Token * prev_immortal_tok_
OnlineFasterDecoder(const fst::Fst< fst::StdArc > &fst, const OnlineFasterDecoderOpts &opts, const std::vector< int32 > &sil_phones, const TransitionModel &trans_model)
void Register(OptionsItf *opts, bool full)
const ConstIntegerSet< int32 > silence_set_
const TransitionModel & trans_model_
const OnlineFasterDecoderOpts opts_