This class basically does the same job as the function DecodeUtteranceLatticeFaster, but in a way that allows us to build a multi-threaded command line program more easily. More...
#include <decoder-wrappers.h>
Public Member Functions | |
DecodeUtteranceLatticeFasterClass (LatticeFasterDecoder *decoder, DecodableInterface *decodable, const TransitionModel &trans_model, const fst::SymbolTable *word_syms, const std::string &utt, BaseFloat acoustic_scale, bool determinize, bool allow_partial, Int32VectorWriter *alignments_writer, Int32VectorWriter *words_writer, CompactLatticeWriter *compact_lattice_writer, LatticeWriter *lattice_writer, double *like_sum, int64 *frame_sum, int32 *num_done, int32 *num_err, int32 *num_partial) | |
void | operator() () |
~DecodeUtteranceLatticeFasterClass () | |
Private Attributes | |
LatticeFasterDecoder * | decoder_ |
DecodableInterface * | decodable_ |
const TransitionModel * | trans_model_ |
const fst::SymbolTable * | word_syms_ |
std::string | utt_ |
BaseFloat | acoustic_scale_ |
bool | determinize_ |
bool | allow_partial_ |
Int32VectorWriter * | alignments_writer_ |
Int32VectorWriter * | words_writer_ |
CompactLatticeWriter * | compact_lattice_writer_ |
LatticeWriter * | lattice_writer_ |
double * | like_sum_ |
int64 * | frame_sum_ |
int32 * | num_done_ |
int32 * | num_err_ |
int32 * | num_partial_ |
bool | computed_ |
bool | success_ |
bool | partial_ |
CompactLattice * | clat_ |
Lattice * | lat_ |
This class basically does the same job as the function DecodeUtteranceLatticeFaster, but in a way that allows us to build a multi-threaded command line program more easily.
The main computation takes place in operator (), and the output happens in the destructor.
Definition at line 142 of file decoder-wrappers.h.
DecodeUtteranceLatticeFasterClass | ( | LatticeFasterDecoder * | decoder, |
DecodableInterface * | decodable, | ||
const TransitionModel & | trans_model, | ||
const fst::SymbolTable * | word_syms, | ||
const std::string & | utt, | ||
BaseFloat | acoustic_scale, | ||
bool | determinize, | ||
bool | allow_partial, | ||
Int32VectorWriter * | alignments_writer, | ||
Int32VectorWriter * | words_writer, | ||
CompactLatticeWriter * | compact_lattice_writer, | ||
LatticeWriter * | lattice_writer, | ||
double * | like_sum, | ||
int64 * | frame_sum, | ||
int32 * | num_done, | ||
int32 * | num_err, | ||
int32 * | num_partial | ||
) |
Definition at line 32 of file decoder-wrappers.cc.
Definition at line 116 of file decoder-wrappers.cc.
References DecodeUtteranceLatticeFasterClass::alignments_writer_, DecodeUtteranceLatticeFasterClass::clat_, DecodeUtteranceLatticeFasterClass::compact_lattice_writer_, DecodeUtteranceLatticeFasterClass::computed_, DecodeUtteranceLatticeFasterClass::decodable_, DecodeUtteranceLatticeFasterClass::decoder_, DecodeUtteranceLatticeFasterClass::determinize_, DecodeUtteranceLatticeFasterClass::frame_sum_, LatticeFasterDecoderTpl< FST, Token >::GetBestPath(), fst::GetLinearSymbolSequence(), rnnlm::i, TableWriter< Holder >::IsOpen(), KALDI_ASSERT, KALDI_ERR, KALDI_LOG, KALDI_VLOG, KALDI_WARN, DecodeUtteranceLatticeFasterClass::lat_, DecodeUtteranceLatticeFasterClass::lattice_writer_, DecodeUtteranceLatticeFasterClass::like_sum_, DecodeUtteranceLatticeFasterClass::num_done_, DecodeUtteranceLatticeFasterClass::num_err_, DecodeUtteranceLatticeFasterClass::num_partial_, DecodeUtteranceLatticeFasterClass::partial_, DecodeUtteranceLatticeFasterClass::success_, DecodeUtteranceLatticeFasterClass::utt_, LatticeWeightTpl< FloatType >::Value1(), LatticeWeightTpl< FloatType >::Value2(), DecodeUtteranceLatticeFasterClass::word_syms_, words, DecodeUtteranceLatticeFasterClass::words_writer_, and TableWriter< Holder >::Write().
void operator() | ( | ) |
Definition at line 64 of file decoder-wrappers.cc.
References DecodeUtteranceLatticeFasterClass::acoustic_scale_, fst::AcousticLatticeScale(), DecodeUtteranceLatticeFasterClass::allow_partial_, DecodeUtteranceLatticeFasterClass::clat_, DecodeUtteranceLatticeFasterClass::computed_, DecodeUtteranceLatticeFasterClass::decodable_, LatticeFasterDecoderTpl< FST, Token >::Decode(), DecodeUtteranceLatticeFasterClass::decoder_, LatticeFasterDecoderConfig::det_opts, DecodeUtteranceLatticeFasterClass::determinize_, fst::DeterminizeLatticePhonePrunedWrapper(), LatticeFasterDecoderTpl< FST, Token >::GetOptions(), LatticeFasterDecoderTpl< FST, Token >::GetRawLattice(), KALDI_ERR, KALDI_WARN, DecodeUtteranceLatticeFasterClass::lat_, LatticeFasterDecoderConfig::lattice_beam, DecodeUtteranceLatticeFasterClass::partial_, LatticeFasterDecoderTpl< FST, Token >::ReachedFinal(), fst::ScaleLattice(), DecodeUtteranceLatticeFasterClass::success_, DecodeUtteranceLatticeFasterClass::trans_model_, and DecodeUtteranceLatticeFasterClass::utt_.
|
private |
Definition at line 174 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()().
|
private |
Definition at line 177 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 176 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()().
|
private |
Definition at line 191 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()(), and DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 179 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 188 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()(), and DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 170 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()(), and DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 169 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()(), and DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 175 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()(), and DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 182 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 192 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()(), and DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 180 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 181 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 183 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 184 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 185 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 190 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()(), and DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 189 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()(), and DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 171 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()().
|
private |
Definition at line 173 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::operator()(), and DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 172 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().
|
private |
Definition at line 178 of file decoder-wrappers.h.
Referenced by DecodeUtteranceLatticeFasterClass::~DecodeUtteranceLatticeFasterClass().