TFGridNetOptions

Options & Configuration · AiDotNet.Audio.Enhancement

Configuration options for the TF-GridNet (Time-Frequency GridNet) speech enhancement model.

Inheritance: ModelOptions → TFGridNetOptions

For Beginners

TF-GridNet processes audio like reading a grid:

  • Audio is represented as a time-frequency grid (spectrogram)
  • The network looks across time (left-right) to track how sounds change
  • Then it looks across frequency (up-down) to understand the harmonic structure
  • By alternating these views, it builds a complete understanding of the audio

Imagine cleaning a dirty photo by first cleaning each row, then each column, and repeating - that is how TF-GridNet cleans audio.

How It Works

TF-GridNet (Wang et al., ICASSP 2023) applies alternating attention along the time and frequency axes in a grid pattern, achieving state-of-the-art performance. On the WSJ0-2mix benchmark it reaches 23.4 dB SI-SNRi, and on DNS Challenge 2020 it achieves PESQ 3.41.

References:

  • Paper: “TF-GridNet: Making Time-Frequency Domain Models Great Again” (Wang et al., ICASSP 2023)
  • Repository: https://github.com/espnet/espnet

Constructors

Constructor Summary
TFGridNetOptions()

Properties

Property Summary
OnnxModelOptions OnnxOptions { get; set; } Gets or sets ONNX runtime options.
double DropoutRate { get; set; } Gets or sets the dropout rate.
double EnhancementStrength { get; set; } Gets or sets the enhancement strength (0.0 = no enhancement, 1.0 = maximum).
double LearningRate { get; set; } Gets or sets the initial learning rate.
double WeightDecay { get; set; } Gets or sets the weight decay for regularization.
int EmbeddingDim { get; set; } Gets or sets the embedding dimension for each T-F bin.
int FftSize { get; set; } Gets or sets the FFT window size.
int HiddenDim { get; set; } Gets or sets the hidden dimension for the grid network.
int HopLength { get; set; } Gets or sets the hop length between frames.
int InterFrameHiddenSize { get; set; } Gets or sets the LSTM hidden size for inter-frame (time) processing.
int IntraFrameHiddenSize { get; set; } Gets or sets the LSTM hidden size for intra-frame (frequency) processing.
int NumAttentionHeads { get; set; } Gets or sets the number of attention heads.
int NumBlocks { get; set; } Gets or sets the number of grid blocks (each contains time + frequency attention).
int NumFreqBins { get; set; } Gets or sets the number of frequency bins.
int NumSources { get; set; } Gets or sets the number of sources (1 for enhancement, 2+ for separation).
int SampleRate { get; set; } Gets or sets the audio sample rate in Hz.
string ModelPath { get; set; } Gets or sets the path to a pre-trained ONNX model file.