21 #ifndef KALDI_DECODER_DECODABLE_SUM_H_ 22 #define KALDI_DECODER_DECODABLE_SUM_H_ 49 const std::vector<std::pair<DecodableInterface*, BaseFloat> > &decodables) :
66 for (std::vector<std::pair<DecodableInterface*, BaseFloat> >::iterator iter =
decodables_.begin();
69 sum += iter->first->LogLikelihood(frame, state_index) * iter->second;
82 std::vector<std::pair<DecodableInterface*, BaseFloat> >
decodables_;
108 #endif // KALDI_DECODER_DECODABLE_SUM_H_ This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
DecodableInterface provides a link between the (acoustic-modeling and feature-processing) code and th...
KALDI_DISALLOW_COPY_AND_ASSIGN(DecodableSum)
DecodableSum(DecodableInterface *d1, BaseFloat w1, DecodableInterface *d2, BaseFloat w2)
virtual BaseFloat LogLikelihood(int32 frame, int32 state_index)
Returns the log likelihood, which will be negated in the decoder.
virtual BaseFloat LogLikelihood(int32 frame, int32 state_index)
Returns the log likelihood, which will be negated in the decoder.
virtual int32 NumIndices() const
Returns the number of states in the acoustic model (they will be indexed one-based, i.e.
DecodableSumScaled(DecodableInterface *d1, BaseFloat w1, DecodableInterface *d2, BaseFloat w2, BaseFloat scale)
virtual bool IsLastFrame(int32 frame) const
Returns true if this is the last frame.
#define KALDI_ASSERT(cond)
std::vector< std::pair< DecodableInterface *, BaseFloat > > decodables_
DecodableSumScaled(const std::vector< std::pair< DecodableInterface *, BaseFloat > > &decodables, BaseFloat scale)
DecodableSum(const std::vector< std::pair< DecodableInterface *, BaseFloat > > &decodables)