Class for computing mel-filterbank features; see Computing MFCC features for more information. More...
#include <feature-fbank.h>
Public Types | |
typedef FbankOptions | Options |
Public Member Functions | |
FbankComputer (const FbankOptions &opts) | |
FbankComputer (const FbankComputer &other) | |
int32 | Dim () const |
bool | NeedRawLogEnergy () const |
const FrameExtractionOptions & | GetFrameOptions () const |
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... | |
~FbankComputer () | |
Private Member Functions | |
const MelBanks * | GetMelBanks (BaseFloat vtln_warp) |
FbankComputer & | operator= (const FbankComputer &other) |
Private Attributes | |
FbankOptions | opts_ |
BaseFloat | log_energy_floor_ |
std::map< BaseFloat, MelBanks * > | mel_banks_ |
SplitRadixRealFft< BaseFloat > * | srfft_ |
Class for computing mel-filterbank features; see Computing MFCC features for more information.
Definition at line 86 of file feature-fbank.h.
typedef FbankOptions Options |
Definition at line 88 of file feature-fbank.h.
|
explicit |
Definition at line 26 of file feature-fbank.cc.
References FbankOptions::energy_floor, FbankOptions::frame_opts, FbankComputer::GetMelBanks(), kaldi::Log(), FbankComputer::log_energy_floor_, FrameExtractionOptions::PaddedWindowSize(), and FbankComputer::srfft_.
FbankComputer | ( | const FbankComputer & | other | ) |
Definition at line 40 of file feature-fbank.cc.
References FbankComputer::mel_banks_, and FbankComputer::srfft_.
~FbankComputer | ( | ) |
Definition at line 51 of file feature-fbank.cc.
References FbankComputer::mel_banks_, and FbankComputer::srfft_.
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->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. |
Definition at line 72 of file feature-fbank.cc.
References VectorBase< Real >::ApplyFloor(), VectorBase< Real >::ApplyLog(), VectorBase< Real >::ApplyPow(), MelBanks::Compute(), kaldi::ComputePowerSpectrum(), VectorBase< Real >::Data(), VectorBase< Real >::Dim(), FbankComputer::Dim(), FbankOptions::energy_floor, FbankOptions::frame_opts, FbankComputer::GetMelBanks(), FbankOptions::htk_compat, KALDI_ASSERT, kaldi::Log(), FbankComputer::log_energy_floor_, FbankOptions::mel_opts, MelBanksOptions::num_bins, FbankComputer::opts_, FrameExtractionOptions::PaddedWindowSize(), FbankOptions::raw_energy, kaldi::RealFft(), FbankComputer::srfft_, FbankOptions::use_energy, FbankOptions::use_log_fbank, FbankOptions::use_power, and kaldi::VecVec().
|
inline |
|
inline |
Definition at line 99 of file feature-fbank.h.
Definition at line 58 of file feature-fbank.cc.
References FbankOptions::frame_opts, FbankComputer::mel_banks_, FbankOptions::mel_opts, and FbankComputer::opts_.
Referenced by FbankComputer::Compute(), and FbankComputer::FbankComputer().
|
inline |
Definition at line 97 of file feature-fbank.h.
|
private |
|
private |
Definition at line 136 of file feature-fbank.h.
Referenced by FbankComputer::Compute(), and FbankComputer::FbankComputer().
Definition at line 137 of file feature-fbank.h.
Referenced by FbankComputer::FbankComputer(), FbankComputer::GetMelBanks(), and FbankComputer::~FbankComputer().
|
private |
Definition at line 135 of file feature-fbank.h.
Referenced by FbankComputer::Compute(), and FbankComputer::GetMelBanks().
|
private |
Definition at line 138 of file feature-fbank.h.
Referenced by FbankComputer::Compute(), FbankComputer::FbankComputer(), and FbankComputer::~FbankComputer().