kaldi-native-fbank C++ API
Kaldi-compatible feature extraction C++ API
Loading...
Searching...
No Matches
feature-fbank.h File Reference

Copyright 2009-2012 Karel Vesely 2016 Johns Hopkins University (author: Daniel Povey) Copyright (c) 2022 Xiaomi Corporation (authors: Fangjun Kuang). More...

#include <cstdint>
#include <limits>
#include <map>
#include <sstream>
#include <string>
#include <vector>
#include "kaldi-native-fbank/csrc/feature-window.h"
#include "kaldi-native-fbank/csrc/mel-computations.h"
#include "kaldi-native-fbank/csrc/rfft.h"
Include dependency graph for feature-fbank.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  knf::FbankOptions
 Options for computing filter-bank features. More...
class  knf::FbankComputer
 Class for computing mel-filterbank features. More...

Namespaces

namespace  knf
 This file is part of kaldi-native-fbank.

Functions

std::ostream & knf::operator<< (std::ostream &os, const FbankOptions &opts)
 Write the options to the stream, one option per line.

Detailed Description

Copyright 2009-2012 Karel Vesely 2016 Johns Hopkins University (author: Daniel Povey) Copyright (c) 2022 Xiaomi Corporation (authors: Fangjun Kuang).

This file is copied/modified from kaldi/src/feat/feature-fbank.h

See LICENSE for clarification regarding multiple authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Kaldi-compatible filter-bank (fbank) features.

This file is copied/modified from src/feat/feature-fbank.h. It computes mel-filterbank features, equal to kaldi's compute-fbank-feats for identical parameters.

opts.frame_opts.samp_freq = 16000;
opts.mel_opts.num_bins = 23;
knf::OnlineFbank fbank(opts); // see online-feature.h
OnlineGenericBaseFeature< FbankComputer > OnlineFbank
Streaming filter-bank features; see FbankComputer.
Definition online-feature.h:191
Options for computing filter-bank features.
Definition feature-fbank.h:63
MelBanksOptions mel_opts
Options for the mel filter banks; see MelBanksOptions.
Definition feature-fbank.h:68
FrameExtractionOptions frame_opts
Options for frame extraction; see FrameExtractionOptions.
Definition feature-fbank.h:65
float samp_freq
Waveform data sample frequency (must match the waveform file, if specified there).
Definition feature-window.h:60
int32_t num_bins
Number of triangular mel-frequency bins, e.g. 25.
Definition mel-computations.h:60