29 features_(input_feats), ac_model_(am),
30 ac_scale_(scale), trans_model_(trans_model),
31 feat_dim_(input_feats->Dim()), cur_feats_(feat_dim_),
34 cache_.resize(num_pdfs, std::pair<int32,BaseFloat>(-1, 0.0f));
49 if (
cache_[pdf_id].first == frame)
50 return cache_[pdf_id].second;
52 cache_[pdf_id].first = frame;
53 cache_[pdf_id].second = ans;
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
DecodableDiagGmmScaledOnline(const AmDiagGmm &am, const TransitionModel &trans_model, const BaseFloat scale, OnlineFeatureInterface *input_feats)
void CacheFrame(int32 frame)
OnlineFeatureInterface * features_
virtual void GetFrame(int32 frame, VectorBase< BaseFloat > *feat)=0
Gets the feature vector for this frame.
const TransitionModel & trans_model_
virtual int32 NumFramesReady() const
The call NumFramesReady() will return the number of frames currently available for this decodable obj...
int32 TransitionIdToPdf(int32 trans_id) const
BaseFloat LogLikelihood(const int32 pdf_index, const VectorBase< BaseFloat > &data) const
virtual BaseFloat LogLikelihood(int32 frame, int32 index)
Returns the scaled log likelihood.
const AmDiagGmm & ac_model_
virtual bool IsLastFrame(int32 frame) const =0
Returns true if this is the last frame.
virtual bool IsLastFrame(int32 frame) const
Returns true if this is the last frame.
std::vector< std::pair< int32, BaseFloat > > cache_
OnlineFeatureInterface is an interface for online feature processing (it is also usable in the offlin...
Vector< BaseFloat > cur_feats_
virtual int32 NumFramesReady() const =0
returns the feature dimension.