|
kaldi-native-fbank C++ API
Kaldi-compatible feature extraction C++ API
|
Options for computing filter-bank features. More...
#include <feature-fbank.h>

Public Member Functions | |
| FbankOptions () | |
| Construct with the default options: 23 mel bins. | |
| std::string | ToString () const |
| Return the options as a string. | |
Public Attributes | |
| FrameExtractionOptions | frame_opts |
| Options for frame extraction; see FrameExtractionOptions. | |
| MelBanksOptions | mel_opts |
| Options for the mel filter banks; see MelBanksOptions. | |
| bool | use_energy = false |
| If true, append an extra dimension with energy to the filter banks. | |
| float | energy_floor = 0.0f |
| Floor on energy (absolute, not relative) in fbank computation. | |
| bool | raw_energy = true |
| If true, compute log energy before preemphasis and windowing; if false, compute it after preemphasis and windowing. | |
| bool | htk_compat = false |
| If true, put energy last (if using energy); if false, put energy first. | |
| bool | use_log_fbank = true |
| If true (default), produce log-filterbank; else linear. | |
| bool | use_log_floor = true |
| If true (default), use Kaldi's hard floor before the log, i.e. | |
| float | eps = std::numeric_limits<float>::epsilon() |
| Value used by the log-zero guard selected by use_log_floor. | |
| bool | use_power = true |
| If true (default), use power in filterbank analysis; else magnitude. | |
Options for computing filter-bank features.
This is kaldi's FbankOptions (src/feat/feature-fbank.h). It only includes things that can be done in a "stateless" way, i.e. it does not include energy max-normalization and it does not include delta computation.
|
inline |
Construct with the default options: 23 mel bins.
|
inline |
Return the options as a string.
| float knf::FbankOptions::energy_floor = 0.0f |
Floor on energy (absolute, not relative) in fbank computation.
Only makes a difference if use_energy is true; only necessary if frame_opts.dither is 0.0. Suggested values: 0.1 or 1.0.
| float knf::FbankOptions::eps = std::numeric_limits<float>::epsilon() |
Value used by the log-zero guard selected by use_log_floor.
It defaults to FLT_EPSILON; NeMo models use FLT_EPSILON / 2 (2^-24, 5.9604644775390625e-08).
| FrameExtractionOptions knf::FbankOptions::frame_opts |
Options for frame extraction; see FrameExtractionOptions.
| bool knf::FbankOptions::htk_compat = false |
If true, put energy last (if using energy); if false, put energy first.
Warning: not sufficient to get HTK compatible features (need to change other parameters).
| MelBanksOptions knf::FbankOptions::mel_opts |
Options for the mel filter banks; see MelBanksOptions.
| bool knf::FbankOptions::raw_energy = true |
If true, compute log energy before preemphasis and windowing; if false, compute it after preemphasis and windowing.
| bool knf::FbankOptions::use_energy = false |
If true, append an extra dimension with energy to the filter banks.
| bool knf::FbankOptions::use_log_fbank = true |
If true (default), produce log-filterbank; else linear.
| bool knf::FbankOptions::use_log_floor = true |
If true (default), use Kaldi's hard floor before the log, i.e.
\( \log(\max(e, \epsilon)) \). If false, use the additive guard \( \log(e + \epsilon) \), where \( e \) is the mel energy. NeMo models use the additive guard with eps = FLT_EPSILON / 2 (2^-24).
| bool knf::FbankOptions::use_power = true |
If true (default), use power in filterbank analysis; else magnitude.