VocoderBase<T>
Base Classes · AiDotNet.TextToSpeech
Base class for neural vocoder models that convert mel-spectrograms to audio waveforms.
Inheritance: NeuralNetworkBase<T> → TtsModelBase<T> → VocoderBase<T>
Implements: IVocoder<T>
Known derived types: GanVocoderBase<T>, SegmentVocoderBase<T>
How It Works
Vocoders form the second stage of a two-stage TTS pipeline: Text -> [Acoustic Model] -> Mel-Spectrogram -> [Vocoder] -> Waveform.
Subclasses include HiFi-GAN, WaveNet, WaveRNN, BigVGAN, DiffWave, Vocos, and other models that synthesize raw audio from mel-spectrogram representations.
Properties
| Property | Summary |
|---|---|
int UpsampleFactor { get; } |
Gets the upsampling factor (hop size). |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) |
The vocoder family’s output law: [Batch, Frames * UpsampleFactor]. |
Tensor<T> MelToWaveform(Tensor<T> melSpectrogram) |
|
Tensor<T> Predict(Tensor<T> input) |
Accepts the public unbatched mel layout for models that declare a whole-waveform contract, while retaining the native batched output layout. |