This is the new-style interface to the PLP computation. More...
#include <feature-plp.h>
Public Types | |
typedef PlpOptions | Options |
Public Member Functions | |
PlpComputer (const PlpOptions &opts) | |
PlpComputer (const PlpComputer &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... | |
~PlpComputer () | |
Private Member Functions | |
const MelBanks * | GetMelBanks (BaseFloat vtln_warp) |
const Vector< BaseFloat > * | GetEqualLoudness (BaseFloat vtln_warp) |
PlpComputer & | operator= (const PlpComputer &other) |
Private Attributes | |
PlpOptions | opts_ |
Vector< BaseFloat > | lifter_coeffs_ |
Matrix< BaseFloat > | idft_bases_ |
BaseFloat | log_energy_floor_ |
std::map< BaseFloat, MelBanks * > | mel_banks_ |
std::map< BaseFloat, Vector< BaseFloat > *> | equal_loudness_ |
SplitRadixRealFft< BaseFloat > * | srfft_ |
Vector< BaseFloat > | mel_energies_duplicated_ |
Vector< BaseFloat > | autocorr_coeffs_ |
Vector< BaseFloat > | lpc_coeffs_ |
Vector< BaseFloat > | raw_cepstrum_ |
This is the new-style interface to the PLP computation.
Definition at line 101 of file feature-plp.h.
typedef PlpOptions Options |
Definition at line 103 of file feature-plp.h.
|
explicit |
Definition at line 26 of file feature-plp.cc.
References PlpOptions::cepstral_lifter, kaldi::ComputeLifterCoeffs(), PlpOptions::energy_floor, PlpOptions::frame_opts, PlpComputer::GetMelBanks(), PlpComputer::idft_bases_, kaldi::InitIdftBases(), PlpComputer::lifter_coeffs_, kaldi::Log(), PlpComputer::log_energy_floor_, PlpOptions::lpc_order, PlpOptions::mel_opts, MelBanksOptions::num_bins, PlpOptions::num_ceps, PlpComputer::opts_, FrameExtractionOptions::PaddedWindowSize(), and PlpComputer::srfft_.
PlpComputer | ( | const PlpComputer & | other | ) |
Definition at line 52 of file feature-plp.cc.
References PlpComputer::equal_loudness_, PlpComputer::mel_banks_, and PlpComputer::srfft_.
~PlpComputer | ( | ) |
Definition at line 72 of file feature-plp.cc.
References PlpComputer::equal_loudness_, PlpComputer::mel_banks_, and PlpComputer::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 112 of file feature-plp.cc.
References VectorBase< Real >::ApplyPow(), PlpComputer::autocorr_coeffs_, PlpOptions::cepstral_lifter, PlpOptions::cepstral_scale, PlpOptions::compress_factor, kaldi::ComputeLpc(), kaldi::ComputePowerSpectrum(), VectorBase< Real >::Data(), VectorBase< Real >::Dim(), PlpComputer::Dim(), PlpOptions::energy_floor, PlpOptions::frame_opts, PlpComputer::GetEqualLoudness(), PlpComputer::GetMelBanks(), PlpOptions::htk_compat, rnnlm::i, PlpComputer::idft_bases_, KALDI_ASSERT, kaldi::kNoTrans, PlpComputer::lifter_coeffs_, kaldi::Log(), PlpComputer::log_energy_floor_, kaldi::Lpc2Cepstrum(), PlpComputer::lpc_coeffs_, PlpOptions::lpc_order, PlpComputer::mel_energies_duplicated_, PlpOptions::mel_opts, VectorBase< Real >::MulElements(), MelBanksOptions::num_bins, PlpOptions::num_ceps, PlpComputer::opts_, FrameExtractionOptions::PaddedWindowSize(), VectorBase< Real >::Range(), PlpComputer::raw_cepstrum_, PlpOptions::raw_energy, kaldi::RealFft(), VectorBase< Real >::Scale(), PlpComputer::srfft_, PlpOptions::use_energy, and kaldi::VecVec().
|
inline |
Definition at line 97 of file feature-plp.cc.
References PlpComputer::equal_loudness_, kaldi::GetEqualLoudnessVector(), and PlpComputer::GetMelBanks().
Referenced by PlpComputer::Compute().
|
inline |
Definition at line 107 of file feature-plp.h.
Definition at line 83 of file feature-plp.cc.
References PlpOptions::frame_opts, PlpComputer::mel_banks_, PlpOptions::mel_opts, and PlpComputer::opts_.
Referenced by PlpComputer::Compute(), PlpComputer::GetEqualLoudness(), and PlpComputer::PlpComputer().
|
inline |
Definition at line 113 of file feature-plp.h.
|
private |
Definition at line 159 of file feature-plp.h.
Referenced by PlpComputer::Compute().
Definition at line 153 of file feature-plp.h.
Referenced by PlpComputer::GetEqualLoudness(), PlpComputer::PlpComputer(), and PlpComputer::~PlpComputer().
Definition at line 150 of file feature-plp.h.
Referenced by PlpComputer::Compute(), and PlpComputer::PlpComputer().
Definition at line 149 of file feature-plp.h.
Referenced by PlpComputer::Compute(), and PlpComputer::PlpComputer().
|
private |
Definition at line 151 of file feature-plp.h.
Referenced by PlpComputer::Compute(), and PlpComputer::PlpComputer().
Definition at line 161 of file feature-plp.h.
Referenced by PlpComputer::Compute().
Definition at line 152 of file feature-plp.h.
Referenced by PlpComputer::GetMelBanks(), PlpComputer::PlpComputer(), and PlpComputer::~PlpComputer().
Definition at line 157 of file feature-plp.h.
Referenced by PlpComputer::Compute().
|
private |
Definition at line 148 of file feature-plp.h.
Referenced by PlpComputer::Compute(), PlpComputer::GetMelBanks(), and PlpComputer::PlpComputer().
Definition at line 163 of file feature-plp.h.
Referenced by PlpComputer::Compute().
|
private |
Definition at line 154 of file feature-plp.h.
Referenced by PlpComputer::Compute(), PlpComputer::PlpComputer(), and PlpComputer::~PlpComputer().