This class is only added for documentation, it is not intended to ever be used. More...
#include <feature-common.h>
Public Types | |
typedef ExampleFeatureComputerOptions | Options |
Public Member Functions | |
const FrameExtractionOptions & | GetFrameOptions () const |
Returns a reference to the frame-extraction options class, which will be part of our own options class. More... | |
int32 | Dim () const |
Returns the feature dimension. More... | |
bool | NeedRawLogEnergy () const |
Returns true if this function may inspect the raw log-energy of the signal (before windowing and pre-emphasis); it's safe to always return true, but setting it to false enables an optimization. More... | |
ExampleFeatureComputer (const ExampleFeatureComputerOptions &opts) | |
constructor from options class; it should not store a reference or pointer to the options class but should copy it. More... | |
ExampleFeatureComputer (const ExampleFeatureComputer &other) | |
Copy constructor; all of these classes must have one. More... | |
void | Compute (BaseFloat signal_raw_log_energy, BaseFloat vtln_warp, VectorBase< BaseFloat > *signal_frame, VectorBase< BaseFloat > *feature) |
Function that computes one frame of features from one frame of signal. More... | |
Private Member Functions | |
ExampleFeatureComputer & | operator= (const ExampleFeatureComputer &in) |
Private Attributes | |
Options | opts_ |
This class is only added for documentation, it is not intended to ever be used.
It documents the interface of the *Computer classes which wrap the low-level feature extraction. The template argument F of OfflineFeatureTpl must follow this interface. This interface is intended for features such as MFCCs and PLPs which can be computed frame by frame.
Definition at line 45 of file feature-common.h.
typedef ExampleFeatureComputerOptions Options |
Definition at line 47 of file feature-common.h.
|
inlineexplicit |
constructor from options class; it should not store a reference or pointer to the options class but should copy it.
Definition at line 65 of file feature-common.h.
ExampleFeatureComputer | ( | const ExampleFeatureComputer & | other | ) |
Copy constructor; all of these classes must have one.
void Compute | ( | BaseFloat | signal_raw_log_energy, |
BaseFloat | vtln_warp, | ||
VectorBase< BaseFloat > * | signal_frame, | ||
VectorBase< BaseFloat > * | feature | ||
) |
Function that computes one frame of features from one frame of signal.
[in] | signal_raw_log_energy | The log-energy of the frame of the signal prior to windowing and pre-emphasis, or log(numeric_limits<float>::min()), whichever is greater. Must be ignored by this function if this class returns false from this->NeedRawLogEnergy(). |
[in] | vtln_warp | The VTLN warping factor that the user wants to be applied when computing features for this utterance. Will normally be 1.0, meaning no warping is to be done. The value will be ignored for feature types that don't support VLTN, such as spectrogram features. |
[in] | signal_frame | One frame of the signal, as extracted using the function ExtractWindow() using the options returned by this->GetFrameOptions(). The function will use the vector as a workspace, which is why it's a non-const pointer. |
[out] | feature | Pointer to a vector of size this->Dim(), to which the computed feature will be written. |
int32 Dim | ( | ) | const |
Returns the feature dimension.
|
inline |
Returns a reference to the frame-extraction options class, which will be part of our own options class.
Definition at line 51 of file feature-common.h.
|
inline |
Returns true if this function may inspect the raw log-energy of the signal (before windowing and pre-emphasis); it's safe to always return true, but setting it to false enables an optimization.
Definition at line 61 of file feature-common.h.
|
private |
|
private |
Definition at line 100 of file feature-common.h.