param

package
v0.0.0-...-6d3268d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CParam

type CParam struct {
	// contains filtered or unexported fields
}

func NewCParam

func NewCParam() *CParam

func (*CParam) DPSCC

func (cp *CParam) DPSCC(pointNB int)

------------- Differential Power Spectrum -------------------------------------

func (*CParam) FeatureNorm

func (cp *CParam) FeatureNorm(fParam [][]float32, iVecSize, iVecNum int) error

------------- Cepstral Mean Substraction & Variance Normalisation ------------ This function normalizes the mfcc feature parameters into a Guassian distribute,which can reduce the influence of channel.

   fParam   : buffer which stored feature parameters
	iVecsize   : size of a feature vector which stored parameter
 iVecNum    : number of feature vectors

func (*CParam) FeatureNorm2

func (cp *CParam) FeatureNorm2(fParam []float32, iVecSize, iVecNum int) error

func (*CParam) GetMfcc

func (cp *CParam) GetMfcc() *Mfcc

func (*CParam) InitFBank

func (cp *CParam) InitFBank(sampleRate, frameRate int, filterBankSize int) error

Initialize the filter bank info struct. User should

call this function before calling wav2MFCC().
  • Arguments - sampleRate : Sample rate (samples per second) frameRate : Frame length in ms filterBankSize : Number of filter banks lowCutFreq : Low cut-off frequency (in Hz) default = -2 highCutFreq : High cut-off frequency (in Hz)default = -1

func (*CParam) InitFBank2

func (cp *CParam) InitFBank2(sampleRate, frameRate int, filterBankSize, lowCutFreq, highCutFreq int) error

func (*CParam) InitMfcc

func (cp *CParam) InitMfcc(iOrder int, fFrmRate float32) error

func (*CParam) IsZeroGlobalMean

func (cp *CParam) IsZeroGlobalMean(data []float32, sampleCount int64)

------------- IsZeroGlobalMean --------------------------------------------------

func (*CParam) PDASCC

func (cp *CParam) PDASCC(pointNB int)

------------- Predictive Differential Amplitude Spectrum ----------------------

func (*CParam) Wav2Mfcc

func (cp *CParam) Wav2Mfcc(data []float32, wavinfo waveIO.WavInfo, fParam *[]float32, col, row *int) error

type FilterBank

type FilterBank struct {
	// contains filtered or unexported fields
}

type Mfcc

type Mfcc struct {
	IsStatic             bool    // static coefficients or not
	IsDynamic            bool    // dynamic coefficients or not
	IsAcce               bool    // acceleration coefficients or not
	IsLiftCepstral       bool    // lift the cepstral or not
	FrameRate            float32 // frame rate in ms
	CepstralLifter       float32 // cepstral lifter. It's invalid when bFBank is set to true
	IsPolishDiff         bool    // polish differential formula
	IsDBNorm             bool    // decibel normalization
	IsDiffPowerSpectrum  bool    // Differential Power Spectrum
	IsPredDiffAmpSpetrum bool    // Predictive Differential Amplitude Spetrum
	IsZeroGlobalMean     bool
	IsEnergyNorm         bool
	SilFloor             int16
	EnergyScale          int16
	IsFeatWarping        bool
	FeatWarpWinSize      int16
	IsRasta              bool
	RastaCoff            float64
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL