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

Copyright 2009-2011 Karel Vesely; Petr Motlicek; Saarland University 2014-2016 Johns Hopkins University (author: Daniel Povey) Copyright 2024 Xiaomi Corporation (authors: Fangjun Kuang). More...

#include <cstdint>
#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-mfcc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  knf::MfccOptions
 Options for computing MFCC features. More...
class  knf::MfccComputer
 Class for computing MFCC features. More...

Namespaces

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

Functions

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

Detailed Description

Copyright 2009-2011 Karel Vesely; Petr Motlicek; Saarland University 2014-2016 Johns Hopkins University (author: Daniel Povey) Copyright 2024 Xiaomi Corporation (authors: Fangjun Kuang).

This file is copied/modified from kaldi/src/feat/feature-mfcc.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 MFCC features.

This file is copied/modified from src/feat/feature-mfcc.h. It computes Mel-frequency cepstral coefficients, equal to kaldi's compute-mfcc-feats value-by-value for identical parameters.

opts.frame_opts.samp_freq = 16000;
opts.num_ceps = 13;
knf::OnlineMfcc mfcc(opts); // see online-feature.h
OnlineGenericBaseFeature< MfccComputer > OnlineMfcc
Streaming MFCC features; see MfccComputer.
Definition online-feature.h:194
float samp_freq
Waveform data sample frequency (must match the waveform file, if specified there).
Definition feature-window.h:60
Options for computing MFCC features.
Definition feature-mfcc.h:60
int32_t num_ceps
Number of cepstra in MFCC computation (including C0), e.g. 13.
Definition feature-mfcc.h:68
FrameExtractionOptions frame_opts
Options for frame extraction; see FrameExtractionOptions.
Definition feature-mfcc.h:62