kaldi-native-fbank C++ API
Kaldi-compatible feature extraction C++ API
Loading...
Searching...
No Matches
knf::StftConfig Struct Reference

Configuration for Stft. More...

#include <stft.h>

Public Member Functions

std::string ToString () const
 Return the config as a string.

Public Attributes

int32_t n_fft = 0
 FFT size; should be a power of two.
int32_t hop_length = 0
 Number of samples between successive frames.
int32_t win_length = 0
 Window size in samples; must be <= n_fft.
std::string window_type
 Window type; see GetWindow() in feature-window.h for the supported types and their formulas.
bool center = true
 If true, the signal is padded by n_fft/2 on both sides (using pad_mode) and the frames are centered around time t.
std::string pad_mode = "reflect"
 Padding mode used when center is true; currently only "reflect".
bool normalized = false
 If true, scale the FFT by 1/sqrt(n_fft) instead of 1.
std::vector< float > window
 Explicit window coefficients; if specified, window_type is ignored.

Detailed Description

Configuration for Stft.

See also
Stft, IStft

Member Function Documentation

◆ ToString()

std::string knf::StftConfig::ToString ( ) const

Return the config as a string.

Member Data Documentation

◆ center

bool knf::StftConfig::center = true

If true, the signal is padded by n_fft/2 on both sides (using pad_mode) and the frames are centered around time t.

◆ hop_length

int32_t knf::StftConfig::hop_length = 0

Number of samples between successive frames.

◆ n_fft

int32_t knf::StftConfig::n_fft = 0

FFT size; should be a power of two.

◆ normalized

bool knf::StftConfig::normalized = false

If true, scale the FFT by 1/sqrt(n_fft) instead of 1.

◆ pad_mode

std::string knf::StftConfig::pad_mode = "reflect"

Padding mode used when center is true; currently only "reflect".

◆ win_length

int32_t knf::StftConfig::win_length = 0

Window size in samples; must be <= n_fft.

The window is zero-padded to n_fft.

◆ window

std::vector<float> knf::StftConfig::window

Explicit window coefficients; if specified, window_type is ignored.

◆ window_type

std::string knf::StftConfig::window_type

Window type; see GetWindow() in feature-window.h for the supported types and their formulas.


The documentation for this struct was generated from the following file:
  • /home/runner/work/kaldi-native-fbank/kaldi-native-fbank/kaldi-native-fbank/csrc/stft.h