21 #ifndef KALDI_SGMM2_DECODABLE_AM_SGMM2_H_ 22 #define KALDI_SGMM2_DECODABLE_AM_SGMM2_H_ 38 const std::vector<std::vector<int32> > &gselect,
53 const std::vector<std::vector<int32> > *gselect,
84 const std::vector<std::vector<int32> > *
gselect_;
104 const std::vector<std::vector<int32> > &gselect,
117 const std::vector<std::vector<int32> > *gselect,
138 #endif // KALDI_SGMM2_DECODABLE_AM_SGMM2_H_ This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Class for definition of the subspace Gmm acoustic model.
DecodableInterface provides a link between the (acoustic-modeling and feature-processing) code and th...
int32 NumFramesReady() const
The call NumFramesReady() will return the number of frames currently available for this decodable obj...
int32 TransitionIdToPdfFast(int32 trans_id) const
virtual int32 NumIndices() const
Returns the number of states in the acoustic model (they will be indexed one-based, i.e.
const std::vector< std::vector< int32 > > * gselect_
Sgmm2PerSpkDerivedVars * spk_
Sgmm2LikelihoodCache sgmm_cache_
const TransitionModel & trans_model_
for tid to pdf mapping
Sgmm2PerFrameDerivedVars per_frame_vars_
const Matrix< BaseFloat > * feature_matrix_
virtual BaseFloat LogLikelihoodForPdf(int32 frame, int32 pdf_id)
int32 NumTransitionIds() const
Returns the total number of transition-ids (note, these are one-based).
virtual bool IsLastFrame(int32 frame) const
Returns true if this is the last frame.
virtual BaseFloat LogLikelihood(int32 frame, int32 tid)
Returns the log likelihood, which will be negated in the decoder.
DecodableAmSgmm2(const AmSgmm2 &sgmm, const TransitionModel &tm, const Matrix< BaseFloat > *feats, const std::vector< std::vector< int32 > > *gselect, Sgmm2PerSpkDerivedVars *spk, BaseFloat log_prune)
This version of the constructor takes ownership of the pointers "feats", "gselect" and "spk"...
virtual BaseFloat LogLikelihood(int32 frame, int32 tid)
Returns the log likelihood, which will be negated in the decoder.
KALDI_DISALLOW_COPY_AND_ASSIGN(DecodableAmSgmm2)
#define KALDI_ASSERT(cond)
MatrixIndexT NumRows() const
Returns number of rows (or zero for empty matrix).
Sgmm2LikelihoodCache caches SGMM likelihoods at two levels: the final pdf likelihoods, and the sub-state level likelihoods, which means that with the SCTM system we can avoid redundant computation.
DecodableAmSgmm2(const AmSgmm2 &sgmm, const TransitionModel &tm, const Matrix< BaseFloat > &feats, const std::vector< std::vector< int32 > > &gselect, BaseFloat log_prune, Sgmm2PerSpkDerivedVars *spk)
virtual ~DecodableAmSgmm2()
DecodableAmSgmm2Scaled(const AmSgmm2 &sgmm, const TransitionModel &tm, const Matrix< BaseFloat > &feats, const std::vector< std::vector< int32 > > &gselect, BaseFloat log_prune, BaseFloat scale, Sgmm2PerSpkDerivedVars *spk)
Holds the per-frame precomputed quantities x(t), x_{i}(t), z_{i}(t), and n_{i}(t) (cf...
DecodableAmSgmm2Scaled(const AmSgmm2 &sgmm, const TransitionModel &tm, const Matrix< BaseFloat > *feats, const std::vector< std::vector< int32 > > *gselect, Sgmm2PerSpkDerivedVars *spk, BaseFloat log_prune, BaseFloat scale)
This version of the constructor takes ownership of the pointers "feats", "gselect" and "spk"...