MusicTaggingTransformerOptions

Options & Configuration · AiDotNet.Audio.MusicAnalysis

Configuration options for the Music Tagging Transformer model.

Inheritance: ModelOptions → MusicTaggingTransformerOptions

For Beginners

This model listens to music and automatically tags it with descriptive labels—like “rock”, “upbeat”, “guitar”, “1980s”, or “relaxing”. It’s the technology behind automatic music categorization in streaming services like Spotify’s genre detection.

How It Works

The Music Tagging Transformer (Won et al., 2021) uses a Transformer encoder on mel spectrogram features to predict music tags (genre, mood, instrument, era). It achieves state-of-the-art results on the MagnaTagATune and Million Song Dataset benchmarks.

Constructors

Constructor Summary
MusicTaggingTransformerOptions()

Properties

Property Summary
OnnxModelOptions OnnxOptions { get; set; } Gets or sets the ONNX runtime options.
double DropoutRate { get; set; } Gets or sets the dropout rate.
double LearningRate { get; set; } Gets or sets the learning rate.
int FeedForwardDim { get; set; } Gets or sets the feed-forward dimension.
int FftSize { get; set; } Gets or sets the FFT window size.
int HiddenDim { get; set; } Gets or sets the Transformer hidden dimension.
int HopLength { get; set; } Gets or sets the hop length between frames.
int NumAttentionHeads { get; set; } Gets or sets the number of attention heads.
int NumLayers { get; set; } Gets or sets the number of Transformer layers.
int NumMels { get; set; } Gets or sets the number of mel filterbank channels.
int NumTags { get; set; } Gets or sets the number of output tags.
int SampleRate { get; set; } Gets or sets the expected audio sample rate in Hz.
string ModelPath { get; set; } Gets or sets the path to the ONNX model file.
string[] TagLabels { get; set; } Gets or sets the tag label names.