Class for computing mel-filterbank features.
More...
#include <feature-fbank.h>
|
| | FbankComputer (const FbankOptions &opts) |
| | Construct from the given options.
|
| | ~FbankComputer () |
| | Destructor; frees the cached MelBanks.
|
| int32_t | Dim () const |
| | Return the dimension of the output features: num_bins, plus 1 if use_energy is true.
|
| bool | NeedRawLogEnergy () const |
| | If true, compute log_energy_pre_window but after dithering and dc removal.
|
| const FrameExtractionOptions & | GetFrameOptions () const |
| | Return the frame-extraction options.
|
| const FbankOptions & | GetOptions () const |
| | Return the options this computer was constructed with.
|
| void | Compute (float signal_raw_log_energy, float vtln_warp, std::vector< float > *signal_frame, float *feature) |
| | Function that computes one frame of features from one frame of signal.
|
Class for computing mel-filterbank features.
It computes one frame of features at a time from one frame of signal; see OnlineFbank in online-feature.h for the streaming interface that feeds it. For more information, see src/feat/feature-fbank.h.
- Used by:
- OnlineFbank = OnlineGenericBaseFeature<FbankComputer> (see online-feature.h) wraps this class for streaming use.
- See also
- FbankOptions, MelBanks, OnlineFbank, ExtractWindow
◆ Options
Option type accepted by this computer.
◆ FbankComputer()
| knf::FbankComputer::FbankComputer |
( |
const FbankOptions & | opts | ) |
|
|
explicit |
Construct from the given options.
◆ ~FbankComputer()
| knf::FbankComputer::~FbankComputer |
( |
| ) |
|
◆ Compute()
| void knf::FbankComputer::Compute |
( |
float | signal_raw_log_energy, |
|
|
float | vtln_warp, |
|
|
std::vector< float > * | signal_frame, |
|
|
float * | feature ) |
Function that computes one frame of features from one frame of signal.
- Parameters
-
| [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->NeedsRawLogEnergy(). |
| [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. It should be pre-allocated. |
◆ Dim()
| int32_t knf::FbankComputer::Dim |
( |
| ) |
const |
|
inline |
Return the dimension of the output features: num_bins, plus 1 if use_energy is true.
◆ GetFrameOptions()
Return the frame-extraction options.
◆ GetOptions()
| const FbankOptions & knf::FbankComputer::GetOptions |
( |
| ) |
const |
|
inline |
Return the options this computer was constructed with.
◆ NeedRawLogEnergy()
| bool knf::FbankComputer::NeedRawLogEnergy |
( |
| ) |
const |
|
inline |
If true, compute log_energy_pre_window but after dithering and dc removal.
The documentation for this class was generated from the following file:
- /home/runner/work/kaldi-native-fbank/kaldi-native-fbank/kaldi-native-fbank/csrc/feature-fbank.h