This is a templated class for online feature extraction; it's templated on a class like MfccComputer or FbankComputer that does the basic feature extraction.
More...
#include <online-feature.h>
|
| | OnlineGenericBaseFeature (const typename C::Options &opts) |
| | Construct from the options class of the wrapped computer C.
|
| int32_t | Dim () const |
| | Return the dimension of the output features.
|
| float | FrameShiftInSeconds () const |
| | Return the frame shift in seconds.
|
| int32_t | NumFramesReady () const |
| | Return the number of frames that are already computed.
|
| bool | IsLastFrame (int32_t frame) const |
| | Return true if frame is the last frame.
|
| const float * | GetFrame (int32_t frame) const |
| | Return a pointer to the frame-th feature vector.
|
| void | AcceptWaveform (float sampling_rate, const float *waveform, int32_t n) |
| | This would be called from the application, when you get more wave data.
|
| void | InputFinished () |
| | InputFinished() tells the class you won't be providing any more waveform.
|
| void | Pop (int32_t n) |
| | Discard the first n frames.
|
template<class C>
class knf::OnlineGenericBaseFeature< C >
This is a templated class for online feature extraction; it's templated on a class like MfccComputer or FbankComputer that does the basic feature extraction.
- Used by:
- The aliases OnlineFbank, OnlineMfcc, OnlineWhisperFbank, and OnlineRawAudioSamples at the bottom of this file.
- See also
- FbankComputer, MfccComputer, WhisperFeatureComputer, RawAudioSamplesComputer, RecyclingVector
◆ OnlineGenericBaseFeature()
Construct from the options class of the wrapped computer C.
◆ AcceptWaveform()
This would be called from the application, when you get more wave data.
Note: the sampling_rate is only provided so the code can assert that it matches the sampling rate expected in the options.
- Parameters
-
| sampling_rate | The sampling_rate of the input waveform |
| waveform | Pointer to a 1-D array of size n |
| n | Number of entries in waveform |
◆ Dim()
Return the dimension of the output features.
◆ FrameShiftInSeconds()
Return the frame shift in seconds.
◆ GetFrame()
Return a pointer to the frame-th feature vector.
The pointer is owned by this object; users should not free it.
◆ InputFinished()
InputFinished() tells the class you won't be providing any more waveform.
This will help flush out the last frame or two of features, in the case where snip-edges == false; it also affects the return value of IsLastFrame().
◆ IsLastFrame()
Return true if frame is the last frame.
Note: IsLastFrame() will only ever return true if you have called InputFinished() (and this frame is the last frame).
◆ NumFramesReady()
Return the number of frames that are already computed.
◆ Pop()
Discard the first n frames.
The documentation for this class was generated from the following file:
- /home/runner/work/kaldi-native-fbank/kaldi-native-fbank/kaldi-native-fbank/csrc/online-feature.h