OnlineBaseFeature Class Referenceabstract

Add a virtual class for "source" features such as MFCC or PLP or pitch features. More...

#include <online-feature-itf.h>

Inheritance diagram for OnlineBaseFeature:
Collaboration diagram for OnlineBaseFeature:

Public Member Functions

virtual void AcceptWaveform (BaseFloat sampling_rate, const VectorBase< BaseFloat > &waveform)=0
 This would be called from the application, when you get more wave data. More...
 
virtual void InputFinished ()=0
 InputFinished() tells the class you won't be providing any more waveform. More...
 
- Public Member Functions inherited from OnlineFeatureInterface
virtual int32 Dim () const =0
 
virtual int32 NumFramesReady () const =0
 returns the feature dimension. More...
 
virtual bool IsLastFrame (int32 frame) const =0
 Returns true if this is the last frame. More...
 
virtual void GetFrame (int32 frame, VectorBase< BaseFloat > *feat)=0
 Gets the feature vector for this frame. More...
 
virtual void GetFrames (const std::vector< int32 > &frames, MatrixBase< BaseFloat > *feats)
 This is like GetFrame() but for a collection of frames. More...
 
virtual BaseFloat FrameShiftInSeconds () const =0
 
virtual ~OnlineFeatureInterface ()
 Virtual destructor. More...
 

Detailed Description

Add a virtual class for "source" features such as MFCC or PLP or pitch features.

Definition at line 106 of file online-feature-itf.h.

Member Function Documentation

◆ AcceptWaveform()

virtual void AcceptWaveform ( BaseFloat  sampling_rate,
const VectorBase< BaseFloat > &  waveform 
)
pure virtual

This would be called from the application, when you get more wave data.

Note: the sampling_rate is typically only provided so the code can assert that it matches the sampling rate expected in the options.

Implemented in OnlinePitchFeature, and OnlineGenericBaseFeature< C >.

Referenced by OnlineFeaturePipeline::AcceptWaveform(), and OnlineNnet2FeaturePipeline::AcceptWaveform().

◆ InputFinished()

virtual void InputFinished ( )
pure virtual

InputFinished() tells the class you won't be providing any more waveform.

This will help flush out the last few frames of delta or LDA features (it will typically affect the return value of IsLastFrame.

Implemented in OnlinePitchFeature, and OnlineGenericBaseFeature< C >.

Referenced by OnlineFeaturePipeline::InputFinished(), and OnlineNnet2FeaturePipeline::InputFinished().


The documentation for this class was generated from the following file: