21 #ifndef KALDI_KWS_KWS_FUNCTIONS_H_ 22 #define KALDI_KWS_KWS_FUNCTIONS_H_ 41 return std::max<int32>(0, std::min(
end_, interval.
end_) -
67 const std::vector<int32> &state_times);
75 const std::vector<int32> &state_times,
86 const std::vector<int32> &state_times,
127 return ToArc(arc.ilabel,
129 (arc.weight == FromWeight::Zero() ?
131 ToWeight(arc.weight.Value1().Value(),
133 arc.weight.Value2().Value2().Value()))),
137 fst::MapFinalAction
FinalAction()
const {
return fst::MAP_NO_SUPERFINAL; }
151 #endif // KALDI_KWS_KWS_FUNCTIONS_H_ This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
fst::VectorFst< KwsProductArc > KwsProductFst
fst::MapSymbolsAction OutputSymbolsAction() const
bool CompareInterval(const Interval &i1, const Interval &i2)
bool ClusterLattice(CompactLattice *clat, const std::vector< int32 > &state_times)
Interval(int32 start, int32 end)
LogXStdXStdprimeWeight KwsProductWeight
Interval(const Interval &interval)
fst::LexicographicWeight< TropicalWeight, TropicalWeight > StdLStdWeight
KwsProductWeight FromWeight
ToArc operator()(const FromArc &arc) const
int32 Overlap(Interval interval)
StdLStdLStdArc KwsLexicographicArc
fst::VectorFst< KwsLexicographicArc > KwsLexicographicFst
uint64 Properties(uint64 props) const
fst::MapFinalAction FinalAction() const
void DoFactorMerging(KwsProductFst *factor_transducer, KwsLexicographicFst *index_transducer)
bool CreateFactorTransducer(const CompactLattice &clat, const std::vector< int32 > &state_times, int32 utterance_id, KwsProductFst *factor_transducer)
KwsProductFstToKwsLexicographicFstMapper()
fst::MapSymbolsAction InputSymbolsAction() const
KwsLexicographicArc ToArc
fst::VectorFst< CompactLatticeArc > CompactLattice
void MaybeDoSanityCheck(const KwsLexicographicFst &index_transducer)
void RemoveLongSilences(int32 max_silence_frames, const std::vector< int32 > &state_times, KwsProductFst *factor_transducer)
KwsLexicographicWeight ToWeight
StdLStdLStdWeight KwsLexicographicWeight
LogXStdXStdprimeArc KwsProductArc
void DoFactorDisambiguation(KwsLexicographicFst *index_transducer)
void OptimizeFactorTransducer(KwsLexicographicFst *index_transducer, int32 max_states, bool allow_partial)