VGGishMelSpectrogramDefaults

Layers · AiDotNet.NeuralNetworks.Layers

The log-mel front-end settings the VGGish embedding was trained against.

How It Works

Pass these to MelSpectrogram so the patch fed to VGGishAudioEmbedding matches the published pipeline. Values are from the reference vggish_params.py: 16 kHz audio, a 25 ms window and 10 ms hop (400 and 160 samples at that rate), 64 mel bins spanning 125–7500 Hz, and log(mel + 0.01) compression. The offset form matters — the layer’s alternative dB compression is a different scale, and feeding it changes the input distribution the convolutional stack expects.

Fields

Field Summary
double LogOffset Additive floor for the stabilised log compression, log(mel + offset).
double MaxFrequencyHz Highest mel band edge, in Hz.
double MinFrequencyHz Lowest mel band edge, in Hz.
int HopLengthSamples STFT hop length in samples — 10 ms at SampleRate.
int MelBins Number of mel bins.
int SampleRate Sample rate the published front-end assumes, in Hz.
int WindowLengthSamples STFT window length in samples — 25 ms at SampleRate.