AudioNeuralNetworkBase<T>

Base Classes ยท AiDotNet.Audio

Base class for audio-focused neural networks that can operate in both ONNX inference and native training modes.

Inheritance: NeuralNetworkBase<T> โ†’ AudioNeuralNetworkBase<T>

Implements: IShapeContract

Known derived types: ACEStep<T>, ASTModel<T>, AVHuBERT<T>, AWSTranscribe<T>, AssemblyAIUniversal2<T>, AudioClassifierBase<T>, AudioFlamingo2<T>, AudioGenModel<T>, AudioLM<T>, AudioPaLM<T>, AudioSuperResolution<T>, AzureSpeechSTT<T>, BESTRQ<T>, BSRoFormer<T>, BandSplitRNNEnhancer<T>, BandSplitRNN<T>, BasicPitch<T>, Branchformer<T>, CIFDecoder<T>, CIFEncoder<T>, CLAPModel<T>, CMGAN<T>, CREPE<T>, CTCDecoder<T>, CTCSegmentation<T>, CanaryFlash<T>, CanaryQwen<T>, Canary<T>, Chirp2<T>, Chirp3<T>, Chirp<T>, CodeSwitchingASR<T>, ConformerCTC<T>, ConformerFP<T>, ConformerTransducer<T>, Conformer<T>, ContextNet<T>, ConvTasNet<T>, ConvTransformer<T>, DCCRN<T>, DannaSep<T>, Data2Vec2<T>, Data2VecASR<T>, DeepFilterNet<T>, DeepgramNova2<T>, DemucsNoise<T>, DistilWhisper<T>, EBranchformer<T>, ECAPATDNNLanguageIdentifier<T>, ESPnetASR<T>, EfficientConformer<T>, EmformerRNNT<T>, FRCRN<T>, FastConformer<T>, FastEmit<T>, FasterWhisper<T>, FireRedASRLLM<T>, FireRedASR<T>, FullSubNetPlus<T>, FunASRNano<T> (+103 more)

For Beginners

Audio neural networks process sound data (like speech or music). This base class provides:

  • Support for pre-trained ONNX models (fast inference with existing models)
  • Full training capability from scratch (like other neural networks)
  • Audio preprocessing utilities (mel spectrograms, etc.)
  • Sample rate handling

You can use this class in two ways:

  1. Load a pre-trained ONNX model for quick inference
  2. Build and train a new model from scratch

How It Works

This class extends NeuralNetworkBase to provide audio-specific functionality while maintaining full integration with the AiDotNet neural network infrastructure.

Properties

Property Summary
ILossFunction<T> DefaultLossFunction { get; } Gets the default loss function for this model.
bool IsOnnxMode { get; } Gets whether this model is running in ONNX inference mode.
bool SupportsTraining { get; } Gets whether this network supports training.
int NumMels { get; set; } Gets the number of mel spectrogram channels used by this model.
int SampleRate { get; set; } Gets the sample rate expected by this model.

Methods

Method Summary
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) The output axes for an audio model: [Batch, Features].