Skip to content

Commit

Permalink
[src] Add const overload OnlineNnet2FeaturePipeline::IvectorFeature (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kkm000 authored and danpovey committed Mar 6, 2019
1 parent 197214d commit 991a75c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/online2/online-nnet2-feature-pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,18 +228,25 @@ class OnlineNnet2FeaturePipeline: public OnlineFeatureInterface {
/// rescoring the lattices, this may not be much of an issue.
void InputFinished();

// This function returns the ivector-extracting part of the feature pipeline
// (or NULL if iVectors are not being used); the pointer is owned here and not
// given to the caller. This function is used in nnet3, and also in the
// silence-weighting code used to exclude silence from the iVector estimation.
// This function returns the iVector-extracting part of the feature pipeline
// (or NULL if iVectors are not being used); the pointer ownership is retained
// by this object and not transferred to the caller. This function is used in
// nnet3, and also in the silence-weighting code used to exclude silence from
// the iVector estimation.
OnlineIvectorFeature *IvectorFeature() {
return ivector_feature_;
}

// A const accessor for the iVector extractor. Returns NULL if iVectors are
// not being used.
const OnlineIvectorFeature *IvectorFeature() const {
return ivector_feature_;
}

// This function returns the part of the feature pipeline that would be given
// as the primary (non-iVector) input to the neural network in nnet3
// applications.
OnlineFeatureInterface *InputFeature() {
OnlineFeatureInterface *InputFeature() {
return feature_plus_optional_pitch_;
}

Expand Down

0 comments on commit 991a75c

Please sign in to comment.