Audio Foundation Models

Audio Foundation Models

Very large models trained in a self-supervised way on unlabeled audio, whose representations are used for multiple tasks through fine-tuning or zero-shot or few-shot learning.

Educational content in the form of a scientific draft that needs expert review before being adopted as an academic reference. No experimental result that was not actually run is shown here.

Overview

Understand the principle of self-supervised learning and the role of embeddings and transformers in audio foundation models, the methods for adapting them to tasks, and their limits and cost.

Learning Objectives

  • Explain the principle of self-supervised learning for audio
  • Distinguish between an audio embedding and a foundation model
  • Understand audio-language and multimodal models
  • Choose between fine-tuning and zero-shot or few-shot learning
  • Estimate the cost and risks of using a pretrained model

Scientific and Ethical Notes

  • What the model saw during its training often cannot be verified, so the test set may leak into the training data.
  • Large models are computationally expensive and need hardware not available in the browser; the platform works with external models.
  • Zero-shot and few-shot performance is variable and sensitive to the wording of the description and the support samples.
  • Models carry the biases of their training data, and the license must be reviewed before use.

Topics

Self-Supervised Audio Learning Self-Supervised Audio Learning

The model learns from unlabeled audio through a pretext task, such as predicting masked segments (wav2vec 2.0 and HuBERT) or distinguishing between close and distant samples (CPC). This produces general representations that are later fine-tuned with a small amount of labeled data, which reduces dependence on manual labeling. This is the basis of most modern audio foundation models.

Audio Embeddings Audio Embeddings

An embedding is a dense vector that represents an audio segment or frame such that semantically similar segments lie close together. It is extracted from intermediate layers of a trained model and is used for search, clustering, and classification with a simple classifier on top. The quality of the model's layers varies by task. It is recommended to try several layers and choose the most suitable by validating on independent data.

Foundation Models Foundation Models

A foundation model is trained on broad data and suits many tasks after light adaptation. In audio, this includes wav2vec 2.0, WavLM, and Whisper. Operating them requires heavy computation, they carry the biases of the training data, and it is hard to know what the model has seen, which complicates separating test data from training data. The model's license and terms of use should be reviewed before any adoption.

Audio Transformers Audio Transformers

Transformers are applied to audio by splitting the spectrogram into patches, as in AST, or by processing feature frames directly. Self-attention provides long-range dependency, and its cost grows with input length, so windows and chunking are used for long audio. Chunking choices vary with the duration of the clips and the available computational budget.

Audio-Language Models Audio-Language Models

Audio-language models link audio and text in a shared space, such as CLAP, trained with contrastive learning on audio-caption pairs. They enable searching for audio by text and zero-shot classification. They are affected by the quality of the text descriptions and their coverage in the training data. Performance is measured by trying multiple descriptions for the same class to reveal sensitivity to wording.

Multimodal Audio Models Multimodal Audio Models

They combine audio with text and images or video in a single model, enabling, for example, answering questions about an audio clip or linking audio to an image. They require modality alignment and large paired datasets, and they increase the risk of hallucination, that is, generating conclusions not grounded in the input. Therefore, answers are verified against an independent source before being relied on.

Fine-Tuning Fine-Tuning

Fine-tuning continues training a pretrained model on task data. All the weights or only some of them can be tuned, or parameter-efficient methods can be used (LoRA, small adapters). Risks: catastrophic forgetting of prior knowledge and overfitting to a small set. The fine-tuned model is evaluated on a separate validation set to avoid overfitting.

Zero-Shot Learning Zero-Shot Learning

The model performs a task or recognizes a class it was not explicitly trained on, usually through a text description such as the class label in an audio-language model. Performance varies with the wording of the description and the coverage of the class in the training data, and it needs verification on an independent test set. One should not assume that the result generalizes to other classes without testing.

Few-Shot Learning Few-Shot Learning

The model adapts to a new class or task with a small number of labeled examples, by training a lightweight classifier on top of the embeddings or by learning proximity metrics. Reliable evaluation is difficult because few samples give high variance, so experiments are repeated with different samples. The number of examples used per class is stated when presenting any result.

Experiments

Model Comparison

Model Benchmark

A table in which you enter the results of your actual experiments (WER, CER, Accuracy, F1, Latency, model size, and memory) for different models and compare them. They a…

Runs in the Browser

Model-Based Audio Classification

Audio Classification (model)

An interface for classifying audio with a real model through a hosted inference endpoint configured by the administrators. Without a configured endpoint, the tool shows…

Requires an External Model

Speech to Text

Speech-to-Text

A unified interface with a swappable Adapter: (1) the Web Speech API in the browser, if available, (2) a hosted inference endpoint configured by the administrators; both…

Runs via Browser / Optional Provider

Local User Classifier

Local Sound Classifier

Train a real classifier on your own recordings: you add samples for classes you define, statistical MFCCs are extracted for each sample, and kNN is applied with Leave-On…

Runs in the Browser

Exploring an Audio Model Architecture

Explore an Audio Model Architecture

The model and algorithm pages show architecture diagrams (Wav2Vec 2.0, HuBERT, AST…) with references.

Educational Reference Only

Audio Embeddings Comparison

Audio Embeddings Comparison

Extract embeddings from models such as WavLM and CLAP and compare them by similarity and clustering; requires running the models.

Requires an External Model

Zero-Shot Classification

Zero-Shot Audio Classification

Uses audio-text models such as CLAP to compare a recording with textual descriptions; requires the model.

Requires an External Model

The Relationship Between Audio and Text

Audio-Text Relationship

Measure the proximity between the audio and text representations in a shared space; requires an audio-language model.

Requires an External Model

Exploring Audio-Language Models

Audio-Language Models

A reference section that explains architectures, training, and evaluation without running models.

Educational Reference Only

Algorithms

wav2vec 2.0

wav2vec 2.0

A self-supervised model on the raw waveform: a convolutional encoder produces latent representations, parts of them are masked, and then the Transformer learns to predic…

AdvancedAcoustic Models

HuBERT

HuBERT

A self-supervised model that predicts hidden unit labels generated by unsupervised clustering (k-means) for masked segments, turning the representation problem into clas…

AdvancedAcoustic Models

WavLM

WavLM

A self-supervised speech model that predicts hidden units in the style of HuBERT, and adds prediction under noise or overlapping speech and a gated relative position bia…

AdvancedAcoustic Models

CLAP

CLAP

A contrastive model trained on audio-text pairs to place both in a shared embedding space, enabling zero-shot classification and audio retrieval with a text description.

AdvancedAcoustic Models

Audio Spectrogram Transformer

Audio Spectrogram Transformer

An audio classifier without convolution that splits the spectrogram into patches, treats them as tokens in a vision transformer (ViT), and then outputs a classification…

AdvancedAcoustic Models

PANNs

PANNs

A family of convolutional networks pre-trained on AudioSet for audio pattern recognition, used directly or fine-tuned for audio classification and detection tasks.

IntermediateAcoustic Models

Transformer

Transformer

An architecture based on self-attention instead of recurrence, so it processes all positions of the sequence in parallel and links any two positions directly. It has bec…

AdvancedDeep Learning

Contrastive Learning

Contrastive Learning

A training method that brings the representations of similar (positive) pairs closer and pushes apart the representations of dissimilar (negative) ones in the embedding…

AdvancedDeep Learning

Attention

Attention

A mechanism that computes, for each output, a weighted average of a set of values, where the weights are computed from the degree of match between a query and the keys.…

IntermediateDeep Learning

Lessons

Datasets

LibriSpeech

LibriSpeech

An English read-speech corpus from public-domain audiobooks, used as a common ASR benchmark.

Open

AudioSet

AudioSet

An ontology and a collection of YouTube clips labeled with audio events; the clips themselves are not included, and the license covers the labels.

Open

Mozilla Common Voice

Mozilla Common Voice

A multilingual crowd-sourced speech corpus contributed by volunteers reading written sentences; distributed in numbered releases.

Unverified

FLEURS

FLEURS

A parallel speech corpus in 102 languages built on FLoRes-101 for evaluating speech recognition and language identification.

Open

Models

Whisper

Whisper

An encoder-decoder Transformer model trained with weak supervision on a large amount of multilingual audio.

Educational Reference Only

Wav2Vec 2.0

Wav2Vec 2.0

Self-supervised learning: a CNN encoder then a Transformer with a contrastive objective over discrete units.

Educational Reference Only

HuBERT

HuBERT

Self-supervised learning by predicting k-means cluster labels for masked segments.

Educational Reference Only

WavLM

WavLM

Self-supervised model for full speech tasks, trained with noise and overlapped speech.

Educational Reference Only

XLS-R

XLS-R

wav2vec 2.0 model trained on multilingual data at several model sizes.

Educational Reference Only

CLAP

CLAP

Contrastive training on audio and text-caption pairs for a joint representation (zero-shot).

Educational Reference Only

PANNs

PANNs

CNNs pre-trained on AudioSet for recognizing audio patterns.

Educational Reference Only

Evaluation Metrics

AccuracyThe proportion of correct predictions in a classification task on a test set independent of the training data.
F1-scoreThe harmonic mean of precision and recall per class; useful for imbalanced classes.
WERWord error rate when evaluating a fine-tuned model for a transcription task.
mAPMean average precision for multi-label tasks or retrieval across classes.

References

  1. Baevski et al.. wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations. arXiv (2020). DOI
  2. Hsu et al.. HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units. arXiv (2021). DOI
  3. Chen et al.. WavLM: Large-Scale Self-Supervised Pre-Training for Full Stack Speech Processing. arXiv (2021). DOI
  4. Radford et al.. Robust Speech Recognition via Large-Scale Weak Supervision. arXiv (2022). DOI
  5. Elizalde et al.. CLAP: Learning Audio Concepts From Natural Language Supervision. arXiv (2022). DOI
  6. Gong et al.. AST: Audio Spectrogram Transformer. arXiv (2021). DOI
  7. van den Oord, Li, Vinyals. Representation Learning with Contrastive Predictive Coding. arXiv preprint (2018). DOI

Audio processing in the experiments takes place inside your browser. Audio, texts, and conversations are not saved on the server. Privacy Policy