Documentation
¶
Index ¶
- func FreqToBin(freq, nFft, sampleRate float64) int
- func FreqToMel(freq float64) float64
- func MelToFreq(mel float64) float64
- type FilterBank
- type Params
- func (mel *Params) CepstrumDct(step int, fBankData *etensor.Float64, mfccSegment *etensor.Float64, ...)
- func (mel *Params) Defaults()
- func (mel *Params) FftReal(out []complex128, in *etensor.Float64)
- func (mel *Params) FilterDft(step int, dftPowerOut *etensor.Float64, segmentData *etensor.Float64, ...)
- func (mel *Params) InitFilters(dftSize int, sampleRate int, filters *etensor.Float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FilterBank ¶
type FilterBank struct {
NFilters int `view:"+" def:"32,26" desc:"number of Mel frequency filters to compute"`
LoHz float64 `view:"+" def:"120,300" step:"10.0" desc:"low frequency end of mel frequency spectrum"`
HiHz float64 `` /* 160-byte string literal not displayed */
LogOff float64 `` /* 206-byte string literal not displayed */
LogMin float64 `view:"+" def:"-10" desc:"minimum value a log can produce -- puts a lower limit on log output"`
Renorm bool `desc:" whether to perform renormalization of the mel values"`
RenormMin float64 `` /* 150-byte string literal not displayed */
RenormMax float64 `` /* 150-byte string literal not displayed */
RenormScale float64 `view:"-" desc:"1.0 / (ren_max - ren_min)"`
}
FilterBank contains mel frequency feature bank sampling parameters
func (*FilterBank) Defaults ¶
func (mfb *FilterBank) Defaults()
Defaults initializes FBank values - these are the ones you most likely need to adjust for your particular signals
type Params ¶
type Params struct {
FBank FilterBank `view:"inline"`
BinPts []int32 `view:"-" desc:" mel scale points in fft bins"`
HzPts []float64 `view:"-" desc:" mel scale points in hz"`
MFCC bool `view:"+" def:"false" desc:" compute cepstrum discrete cosine transform (dct) of the mel-frequency filter bank features"`
Deltas bool `view:"+" def:"false" desc:" compute the MFCC deltas and delta-deltas"`
NCoefs int `viewif:"MFCC" def:"13" desc:" number of mfcc coefficients to output -- typically 1/2 of the number of filterbank features"` // Todo: should be 12 total - 2 - 13, higher ones not useful
}
Params
func (*Params) CepstrumDct ¶
func (mel *Params) CepstrumDct(step int, fBankData *etensor.Float64, mfccSegment *etensor.Float64, mfccDct *etensor.Float64)
CepstrumDct applies a discrete cosine transform (DCT) to get the cepstrum coefficients on the mel filterbank values
Click to show internal directories.
Click to hide internal directories.