CMGANOptions
Options & Configuration · AiDotNet.Audio.Enhancement
Configuration options for the CMGAN (Conformer-based Metric GAN) speech enhancement model.
Inheritance: ModelOptions → CMGANOptions
For Beginners
CMGAN uses a “competition” strategy to enhance speech:
- A “generator” network tries to clean up noisy audio
- A “discriminator” network judges how realistic the cleaned audio sounds
- They train together: the generator gets better at fooling the discriminator
- The result is very natural-sounding enhanced speech
The “Conformer” part means it uses a mix of attention (looking at the whole signal) and convolution (looking at local patterns), getting the best of both approaches.
How It Works
CMGAN (Cao et al., INTERSPEECH 2022) combines a conformer-based generator with a metric discriminator for high-quality speech enhancement. It achieves PESQ 3.41 and STOI 0.97 on the VoiceBank-DEMAND dataset, outperforming previous GAN-based methods.
References:
- Paper: “CMGAN: Conformer-based Metric GAN for Speech Enhancement” (Cao et al., INTERSPEECH 2022)
- Repository:
https://github.com/ruizhecao96/CMGAN
Constructors
| Constructor | Summary |
|---|---|
CMGANOptions() |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
Gets or sets ONNX runtime options. |
bool EnhancePhase { get; set; } |
Gets or sets whether to enhance both magnitude and phase. |
bool UseDiscriminator { get; set; } |
Gets or sets whether to use the metric discriminator during training. |
double DiscriminatorLearningRate { get; set; } |
Gets or sets the discriminator learning rate. |
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 generator learning rate. |
double PowerLawCompressionExponent { get; set; } |
Gets or sets the power-law compression exponent applied to the input spectrogram. |
double WeightDecay { get; set; } |
Gets or sets the weight decay for regularization. |
int ConformerDim { get; set; } |
Gets or sets the Conformer hidden dimension. |
int ConformerKernelSize { get; set; } |
Gets or sets the convolution kernel size in Conformer layers. |
int DecoderKernelSize { get; set; } |
Gets or sets the decoder kernel size. |
int FftSize { get; set; } |
Gets or sets the FFT window size. |
int HopLength { get; set; } |
Gets or sets the hop length between frames. |
int NumAttentionHeads { get; set; } |
Gets or sets the number of attention heads in Conformer layers. |
int NumConformerLayers { get; set; } |
Gets or sets the number of Conformer encoder layers. |
int NumFreqBins { get; set; } |
Gets or sets the number of frequency bins. |
int SampleRate { get; set; } |
Gets or sets the audio sample rate in Hz. |
int[] EncoderChannels { get; set; } |
Gets or sets the number of U-Net encoder channels. |
string ModelPath { get; set; } |
Gets or sets the path to a pre-trained ONNX model file. |