27 template <
typename FST>
34 decoder_opts_(decoder_opts),
35 input_feature_frame_shift_in_seconds_(features->FrameShiftInSeconds()),
36 trans_model_(trans_model),
37 decodable_(trans_model_, info,
38 features->InputFeature(), features->IvectorFeature()),
39 decoder_(fst, trans_model, decoder_opts_) {
43 template <
typename FST>
49 template <
typename FST>
54 template <
typename FST>
57 decoder_.GetBestPath(best_path, end_of_utterance);
60 template <
typename FST>
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
int32 FrameSubsamplingFactor() const
SingleUtteranceNnet3IncrementalDecoderTpl(const LatticeIncrementalDecoderConfig &decoder_opts, const TransitionModel &trans_model, const nnet3::DecodableNnetSimpleLoopedInfo &info, const FST &fst, OnlineNnet2FeaturePipeline *features)
For an extended explanation of the framework of which grammar-fsts are a part, please see Support for...
bool EndpointDetected(const OnlineEndpointConfig &config, int32 num_frames_decoded, int32 trailing_silence_frames, BaseFloat frame_shift_in_seconds, BaseFloat final_relative_cost)
This function returns true if this set of endpointing rules thinks we should terminate decoding...
nnet3::DecodableAmNnetLoopedOnline decodable_
LatticeIncrementalOnlineDecoderTpl< FST > decoder_
void InitDecoding(int32 frame_offset=0)
Initializes the decoding and sets the frame offset of the underlying decodable object.
void AdvanceDecoding()
Advances the decoding as far as we can.
fst::VectorFst< LatticeArc > Lattice
BaseFloat input_feature_frame_shift_in_seconds_
The normal decoder, lattice-faster-decoder.h, sometimes has an issue when doing real-time application...
bool EndpointDetected(const OnlineEndpointConfig &config)
This function calls EndpointDetected from online-endpoint.h, with the required arguments.
You will instantiate this class when you want to decode a single utterance using the online-decoding ...
OnlineNnet2FeaturePipeline is a class that's responsible for putting together the various parts of th...
const TransitionModel & trans_model_
When you instantiate class DecodableNnetSimpleLooped, you should give it a const reference to this cl...
void GetBestPath(bool end_of_utterance, Lattice *best_path) const
Outputs an FST corresponding to the single best path through the current lattice. ...
void SetFrameOffset(int32 frame_offset)
Sets the frame offset value.