VocosGeneratorLayer<T>

Layers · AiDotNet.NeuralNetworks.Layers

The native Vocos generator: an isotropic ConvNeXt backbone followed by a differentiable complex-STFT head and inverse STFT synthesis.

Inheritance: LayerBase<T> → VocosGeneratorLayer<T>

Implements: IShapeContract

How It Works

This implements the architecture from Siuzdak, “Vocos: Closing the Gap between Time-Domain and Fourier-Based Neural Vocoders for High-Quality Audio Synthesis” (ICLR 2024). Mel frames stay at their original temporal resolution throughout the ConvNeXt backbone. The final linear projection predicts log magnitude and phase in parallel; a Hann-window inverse STFT produces the waveform without transposed-convolution upsampling.

Input is [batch, mel, frames] or [mel, frames]. Output is [batch, frames * hopLength] or [frames * hopLength], respectively. All tensor transformations, including ISTFT, go through the engine so the gradient tape sees the complete mel-to-waveform graph.

Constructors

Constructor Summary
VocosGeneratorLayer(int numMels, int hiddenDim, int numBackboneBlocks, int intermediateDim, int nFft, int hopLength) Creates a native Vocos generator.

Properties

Property Summary
bool SupportsTraining { get; }

Methods

Method Summary
IReadOnlyList<ILayer<T>> GetSubLayers()
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank)
IReadOnlyList<Tensor<T>> GetTrainableParameters()
void ClearGradients()
void ResetState()
void SetTrainableParameters(IReadOnlyList<Tensor<T>> parameters)
void UpdateParameters(T learningRate)