feature-window.h File Reference
#include <map>
#include <string>
#include "matrix/matrix-lib.h"
#include "util/common-utils.h"
#include "base/kaldi-error.h"
Include dependency graph for feature-window.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  FrameExtractionOptions
struct  FeatureWindowFunction


 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference:


int32 NumFrames (int64 num_samples, const FrameExtractionOptions &opts, bool flush=true)
 This function returns the number of frames that we can extract from a wave file with the given number of samples in it (assumed to have the same sampling rate as specified in 'opts'). More...
int64 FirstSampleOfFrame (int32 frame, const FrameExtractionOptions &opts)
void Dither (VectorBase< BaseFloat > *waveform, BaseFloat dither_value)
void Preemphasize (VectorBase< BaseFloat > *waveform, BaseFloat preemph_coeff)
void ProcessWindow (const FrameExtractionOptions &opts, const FeatureWindowFunction &window_function, VectorBase< BaseFloat > *window, BaseFloat *log_energy_pre_window=NULL)
 This function does all the windowing steps after actually extracting the windowed signal: depending on the configuration, it does dithering, dc offset removal, preemphasis, and multiplication by the windowing function. More...
void ExtractWindow (int64 sample_offset, const VectorBase< BaseFloat > &wave, int32 f, const FrameExtractionOptions &opts, const FeatureWindowFunction &window_function, Vector< BaseFloat > *window, BaseFloat *log_energy_pre_window)