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

Class for computing Whisper mel features. More...

#include <whisper-feature.h>

Public Types

using Options = WhisperFeatureOptions
 Option type accepted by this computer.

Public Member Functions

 WhisperFeatureComputer (const WhisperFeatureOptions &opts=WhisperFeatureOptions())
 Construct from the given options.
int32_t Dim () const
 Return the number of mel bins.
const FrameExtractionOptions & GetFrameOptions () const
 Return the (reset) frame-extraction options.
void Compute (float, float, std::vector< float > *signal_frame, float *feature)
 Compute one frame of features from one frame of windowed signal; see FbankComputer::Compute() for the argument meanings.
bool NeedRawLogEnergy () const
 Always false: raw log energy is not used by this feature type.

Detailed Description

Class for computing Whisper mel features.

For each frame it computes the power spectrum and projects it onto librosa-style mel filter banks, producing mel power energies (not log).

Used by:
OnlineWhisperFbank = OnlineGenericBaseFeature<WhisperFeatureComputer> (see online-feature.h).
See also
WhisperFeatureOptions, MelBanks, OnlineWhisperFbank

Member Typedef Documentation

◆ Options

Option type accepted by this computer.

Constructor & Destructor Documentation

◆ WhisperFeatureComputer()

knf::WhisperFeatureComputer::WhisperFeatureComputer ( const WhisperFeatureOptions & opts = WhisperFeatureOptions())
explicit

Construct from the given options.

note: opts.frame_opts is ignored and we reset it inside.

Member Function Documentation

◆ Compute()

void knf::WhisperFeatureComputer::Compute ( float ,
float ,
std::vector< float > * signal_frame,
float * feature )

Compute one frame of features from one frame of windowed signal; see FbankComputer::Compute() for the argument meanings.

◆ Dim()

int32_t knf::WhisperFeatureComputer::Dim ( ) const
inline

Return the number of mel bins.

◆ GetFrameOptions()

const FrameExtractionOptions & knf::WhisperFeatureComputer::GetFrameOptions ( ) const
inline

Return the (reset) frame-extraction options.

◆ NeedRawLogEnergy()

bool knf::WhisperFeatureComputer::NeedRawLogEnergy ( ) const
inline

Always false: raw log energy is not used by this feature type.


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