|
kaldi-native-fbank C++ API
Kaldi-compatible feature extraction C++ API
|
Options for constructing triangular mel-filterbank bins. More...
#include <mel-computations.h>
Public Member Functions | |
| std::string | ToString () const |
| Return the options as a string. | |
Public Attributes | |
| int32_t | num_bins = 25 |
| Number of triangular mel-frequency bins, e.g. 25. | |
| float | low_freq = 20 |
| Lower frequency cutoff, e.g. 20. | |
| float | high_freq = 0 |
| Upper frequency cutoff; 0 means no cutoff, negative values are added to the Nyquist frequency to get the cutoff. | |
| float | vtln_low = 100 |
| VTLN lower cutoff of the warping function. | |
| float | vtln_high = -500 |
| VTLN upper cutoff of the warping function: if negative, added to the Nyquist frequency to get the cutoff. | |
| bool | debug_mel = false |
| Print out debugging information for mel bin computation. | |
| bool | htk_mode = false |
| htk_mode is a "hidden" config. | |
| bool | is_librosa = false |
| If true, use librosa-style mel filters instead of kaldi-style ones. | |
| std::string | norm = "slaney" |
| Used only when is_librosa is true. | |
| bool | use_slaney_mel_scale = true |
| Used only when is_librosa is true: use the Slaney mel scale. | |
| bool | floor_to_int_bin = false |
| Used only when is_librosa is true: floor the bin edges to integers. | |
Options for constructing triangular mel-filterbank bins.
The kaldi-compatible fields correspond to kaldi's MelBanksOptions (src/feat/mel-computations.h); the is_librosa-related fields select librosa-compatible filters instead.
|
inline |
Return the options as a string.
| bool knf::MelBanksOptions::debug_mel = false |
Print out debugging information for mel bin computation.
| bool knf::MelBanksOptions::floor_to_int_bin = false |
Used only when is_librosa is true: floor the bin edges to integers.
| float knf::MelBanksOptions::high_freq = 0 |
Upper frequency cutoff; 0 means no cutoff, negative values are added to the Nyquist frequency to get the cutoff.
| bool knf::MelBanksOptions::htk_mode = false |
htk_mode is a "hidden" config.
It enables more exact compatibility with HTK, for testing purposes. Affects mel-energy flooring and reproduces a bug in HTK.
| bool knf::MelBanksOptions::is_librosa = false |
If true, use librosa-style mel filters instead of kaldi-style ones.
Note that if you set is_librosa, you probably need to set low_freq to 0. See https://librosa.org/doc/main/generated/librosa.filters.mel.html
| float knf::MelBanksOptions::low_freq = 20 |
Lower frequency cutoff, e.g. 20.
| std::string knf::MelBanksOptions::norm = "slaney" |
Used only when is_librosa is true.
Possible values: "", "slaney". We don't support a numeric value here, but it can be added on demand. See https://librosa.org/doc/main/generated/librosa.filters.mel.html
| int32_t knf::MelBanksOptions::num_bins = 25 |
Number of triangular mel-frequency bins, e.g. 25.
| bool knf::MelBanksOptions::use_slaney_mel_scale = true |
Used only when is_librosa is true: use the Slaney mel scale.
| float knf::MelBanksOptions::vtln_high = -500 |
VTLN upper cutoff of the warping function: if negative, added to the Nyquist frequency to get the cutoff.
| float knf::MelBanksOptions::vtln_low = 100 |
VTLN lower cutoff of the warping function.