#include <feature-mfcc.h>
Public Types | |
typedef MfccOptions | Options |
Public Member Functions | |
MfccComputer (const MfccOptions &opts) | |
MfccComputer (const MfccComputer &other) | |
const FrameExtractionOptions & | GetFrameOptions () const |
int32 | Dim () const |
bool | NeedRawLogEnergy () 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... | |
~MfccComputer () | |
Protected Member Functions | |
const MelBanks * | GetMelBanks (BaseFloat vtln_warp) |
Protected Attributes | |
MfccOptions | opts_ |
Vector< BaseFloat > | lifter_coeffs_ |
Matrix< BaseFloat > | dct_matrix_ |
BaseFloat | log_energy_floor_ |
std::map< BaseFloat, MelBanks * > | mel_banks_ |
SplitRadixRealFft< BaseFloat > * | srfft_ |
Vector< BaseFloat > | mel_energies_ |
Private Member Functions | |
MfccComputer & | operator= (const MfccComputer &in) |
Definition at line 87 of file feature-mfcc.h.
typedef MfccOptions Options |
Definition at line 89 of file feature-mfcc.h.
|
explicit |
Definition at line 82 of file feature-mfcc.cc.
References MfccOptions::cepstral_lifter, kaldi::ComputeDctMatrix(), kaldi::ComputeLifterCoeffs(), MatrixBase< Real >::CopyFromMat(), MfccComputer::dct_matrix_, MfccOptions::energy_floor, MfccOptions::frame_opts, MfccComputer::GetMelBanks(), KALDI_ERR, MfccComputer::lifter_coeffs_, kaldi::Log(), MfccComputer::log_energy_floor_, MfccOptions::mel_opts, MelBanksOptions::num_bins, MfccOptions::num_ceps, FrameExtractionOptions::PaddedWindowSize(), Matrix< Real >::Resize(), and MfccComputer::srfft_.
MfccComputer | ( | const MfccComputer & | other | ) |
Definition at line 117 of file feature-mfcc.cc.
References MfccComputer::mel_banks_, and MfccComputer::srfft_.
~MfccComputer | ( | ) |
Definition at line 133 of file feature-mfcc.cc.
References MfccComputer::mel_banks_, and MfccComputer::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 28 of file feature-mfcc.cc.
References VectorBase< Real >::AddMatVec(), MfccOptions::cepstral_lifter, kaldi::ComputePowerSpectrum(), VectorBase< Real >::Data(), MfccComputer::dct_matrix_, VectorBase< Real >::Dim(), MfccComputer::Dim(), MfccOptions::energy_floor, MfccOptions::frame_opts, MfccComputer::GetMelBanks(), MfccOptions::htk_compat, rnnlm::i, KALDI_ASSERT, kaldi::kNoTrans, MfccComputer::lifter_coeffs_, kaldi::Log(), MfccComputer::log_energy_floor_, M_SQRT2, MfccComputer::mel_energies_, VectorBase< Real >::MulElements(), MfccOptions::num_ceps, MfccComputer::opts_, FrameExtractionOptions::PaddedWindowSize(), MfccOptions::raw_energy, kaldi::RealFft(), VectorBase< Real >::SetZero(), MfccComputer::srfft_, MfccOptions::use_energy, and kaldi::VecVec().
|
inline |
|
inline |
Definition at line 93 of file feature-mfcc.h.
Definition at line 141 of file feature-mfcc.cc.
References MfccOptions::frame_opts, MfccComputer::mel_banks_, MfccOptions::mel_opts, and MfccComputer::opts_.
Referenced by MfccComputer::Compute(), and MfccComputer::MfccComputer().
|
inline |
Definition at line 99 of file feature-mfcc.h.
|
private |
Definition at line 137 of file feature-mfcc.h.
Referenced by MfccComputer::Compute(), and MfccComputer::MfccComputer().
Definition at line 136 of file feature-mfcc.h.
Referenced by MfccComputer::Compute(), and MfccComputer::MfccComputer().
|
protected |
Definition at line 138 of file feature-mfcc.h.
Referenced by MfccComputer::Compute(), and MfccComputer::MfccComputer().
Definition at line 139 of file feature-mfcc.h.
Referenced by MfccComputer::GetMelBanks(), MfccComputer::MfccComputer(), and MfccComputer::~MfccComputer().
Definition at line 144 of file feature-mfcc.h.
Referenced by MfccComputer::Compute().
|
protected |
Definition at line 135 of file feature-mfcc.h.
Referenced by MfccComputer::Compute(), and MfccComputer::GetMelBanks().
|
protected |
Definition at line 140 of file feature-mfcc.h.
Referenced by MfccComputer::Compute(), MfccComputer::MfccComputer(), and MfccComputer::~MfccComputer().