SpectrogramTransform<T>

Models & Types · AiDotNet.Data.Transforms

Transforms raw audio waveform tensors into Mel spectrogram representations.

Implements: ITransform<Tensor<T>, Tensor<T>>

For Beginners

A spectrogram is a visual representation of audio frequencies over time. Converting raw audio to a spectrogram is a common preprocessing step for audio ML models.

How It Works

Wraps the existing MelSpectrogram to implement ITransform, enabling composable use in data pipelines.

Constructors

Constructor Summary
SpectrogramTransform(int sampleRate, int nMels, int nFft, int hopLength, bool logMel) Creates a new spectrogram transform.

Methods

Method Summary
Tensor<T> Apply(Tensor<T> input) Applies the Mel spectrogram transform to a raw audio waveform tensor.