APNet<T>
Models & Types · AiDotNet.TextToSpeech.Vocoders
APNet: an all-frame-level neural vocoder that predicts the log amplitude spectrum (ASP) and the phase spectrum (PSP) directly from the mel spectrogram with residual convolution networks and reconstructs the waveform by an inverse STFT.
Inheritance: NeuralNetworkBase<T> → TtsModelBase<T> → VocoderBase<T> → GanVocoderBase<T> → AmplitudePhaseVocoderBase<T> → APNet<T>
For Beginners
Rather than drawing the waveform sample by sample, APNet predicts how loud each frequency is (amplitude) and where each wave is in its cycle (phase) for every frame, and an inverse Fourier transform turns that into audio, which is very fast.
How It Works
References: “APNet: An All-Frame-Level Neural Vocoder Incorporating Direct Prediction of Amplitude and Phase Spectra” (Ai and Ling, IEEE/ACM TASLP 2023) and yangai520/APNet for what the paper leaves unstated.
The ASP and PSP are residual convolution networks (§III-A/B, Fig. 3); the phase losses use the negative cosine as the anti-wrapping function (Eq. 11, 17, 22); L_W is HiFi-GAN’s least-squares GAN loss against the MPD and MSD, twice the feature-matching loss and λ_Mel times the mel loss (§III-C4).
Constructors
| Constructor | Summary |
|---|---|
APNet(NeuralNetworkArchitecture<T> architecture, APNetOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
Creates a trainable APNet. |
APNet(NeuralNetworkArchitecture<T> architecture, string modelPath, APNetOptions options) |
Creates a trainable APNet. |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |