SSL for Audio: wav2vec and HuBERT
1. Core Principles of Self-Supervised Learning
1.1 Core Principles of Self-Supervised Learning
Self-supervised learning (SSL) leverages the inherent structure of unlabeled data to generate supervisory signals, eliminating the need for manual annotation. Unlike supervised learning, which relies on explicit labels, SSL formulates pretext tasks that force the model to learn meaningful representations by predicting masked or transformed parts of the input data. This paradigm is particularly effective in domains like audio, where labeled datasets are scarce but raw data is abundant.
Contrastive Learning and Predictive Coding
Two dominant SSL frameworks are contrastive learning and predictive coding. Contrastive learning, used in models like wav2vec 2.0, trains the model to distinguish between similar (positive) and dissimilar (negative) samples. Given an anchor audio segment x, the objective is to minimize the distance between x and its augmented variant while maximizing the distance to other segments in the batch. The loss function is often the InfoNCE loss:
where q is the query representation, k+ is the positive key, ki are negative keys, and τ is a temperature hyperparameter.
Predictive coding, central to HuBERT, masks portions of the input and trains the model to reconstruct the masked regions. The model learns to predict discrete targets (e.g., clustered MFCC features) from unmasked context, encouraging it to capture high-level acoustic and phonetic features.
Pretext Tasks in Audio SSL
Pretext tasks must be carefully designed to ensure the learned features transfer well to downstream tasks. Common approaches include:
- Masked Prediction: Randomly mask time steps or frequency bands and train the model to reconstruct them.
- Contrastive Temporal Classification: Align sequences of latent representations with raw audio frames.
- Next-Step Prediction: Predict future frames given past context, akin to language modeling.
Feature Hierarchies and Latent Spaces
SSL models like wav2vec and HuBERT employ multi-layer transformer architectures to build hierarchical representations. Lower layers capture low-level acoustic features (e.g., pitch, timbre), while higher layers encode phonemes or lexical information. The latent space is optimized such that distances between embeddings reflect semantic similarity, enabling fine-tuning with minimal labeled data.
where zl is the representation at layer l, and PE denotes positional encoding.

1.2 Challenges in Audio Representation Learning
Learning robust representations from raw audio waveforms presents unique difficulties compared to other modalities like images or text. The challenges stem from the temporal nature of audio signals, their high dimensionality, and the complex relationships between acoustic features and linguistic content.
High-Dimensional Temporal Structure
Raw audio waveforms are sampled at high frequencies (typically 16-48 kHz), resulting in long sequences where meaningful linguistic information is distributed across thousands of time steps. For a 1-second clip at 16kHz:
This creates computational challenges for self-supervised learning, as standard transformers would require quadratic attention over these long sequences. The temporal dependencies in speech also span multiple timescales - from phoneme-level (10-100ms) to utterance-level (seconds).
Disentangling Speaker and Content Factors
Speech signals confound multiple latent variables:
- Linguistic content (phonemes, words, syntax)
- Speaker characteristics (pitch, timbre, accent)
- Recording conditions (noise, microphone, room acoustics)
Self-supervised objectives must learn representations that are invariant to nuisance factors while preserving linguistic information. This is particularly challenging because speaker characteristics often dominate the raw signal's energy distribution.
Lack of Explicit Segmentation
Unlike text with word boundaries or images with spatial structure, speech lacks reliable segmentation cues. The continuous nature of articulation means phonemes blend together through coarticulation effects:
where \(a_k(t)\) are time-varying articulator positions and \(\phi_k(t)\) are vocal tract transfer functions. This results in non-stationary spectral properties that complicate frame-level feature extraction.
Variable Information Density
The information content in speech is non-uniformly distributed - some segments (e.g., vowels) are highly predictable while others (e.g., stop consonants) carry more discriminative information. Standard reconstruction losses may over-emphasize high-energy, low-information regions.
Multilingual and Cross-Domain Generalization
Models must handle:
- Phonemic inventory variations across 7,000+ languages
- Code-switching within utterances
- Domain shifts between read speech, conversations, and acoustic environments
This requires learning representations that capture universal speech attributes while remaining adaptable to specific languages and domains.
Evaluation Challenges
Unlike computer vision with clear benchmarks (ImageNet accuracy), evaluating audio representations requires multiple downstream tasks:
- Automatic speech recognition (WER)
- Speaker verification (EER)
- Phoneme classification (PER)
- Emotion recognition (F1-score)
The optimal representation may differ across tasks, making architectural choices non-trivial.
1.3 Key Architectures: From CNNs to Transformers
Convolutional Neural Networks in Audio Processing
The initial stages of wav2vec and HuBERT employ convolutional neural networks (CNNs) to process raw waveform inputs. A stack of 1D convolutional layers with increasing stride reduces the temporal resolution while expanding the receptive field. For an input waveform x ∈ ℝT, the encoder applies:
where W denotes the learnable filters, b the biases, and k the kernel radius. The architecture typically uses group normalization between layers to stabilize training. This local feature extraction proves critical for capturing phoneme-level patterns before transformer processing.
Transformer Encoder Architecture
The core innovation in wav2vec 2.0 and HuBERT lies in their transformer encoder design. Unlike CNNs, transformers model global dependencies through self-attention:
where Q, K, V are learned query, key, and value matrices. The models employ multi-head attention with residual connections and layer normalization. For audio, positional embeddings are crucial since transformers lack inherent sequence ordering awareness.
Comparative Architecture Analysis
Key differences emerge between wav2vec 2.0 and HuBERT:
- wav2vec 2.0 uses contrastive learning with quantized latent targets
- HuBERT employs iterative clustering to generate pseudo-labels
- Both architectures share similar transformer configurations (12 layers, 768 hidden dim, 3072 FFN dim)
The transformer layers process CNN outputs at ~25ms frame rate, enabling modeling of linguistic structures across multiple timescales. This hierarchical processing - local feature extraction followed by global relation modeling - forms the architectural foundation for modern SSL audio models.

2. wav2vec Framework: Feature Encoding and Contextualization
wav2vec Framework: Feature Encoding and Contextualization
Raw Audio Feature Encoding
The wav2vec architecture begins by processing raw audio waveforms through a feature encoder, which converts the input signal into a latent representation. Given an input waveform x sampled at 16 kHz, the encoder applies a series of temporal convolutions with ReLU activations:
where W denotes the convolutional filters, b the bias term, and k the kernel width. The encoder outputs feature vectors zt at a reduced frame rate (e.g., 100 Hz), capturing local acoustic patterns while discarding irrelevant signal variations.
Quantization and Discretization
wav2vec employs vector quantization (VQ) to discretize the continuous feature space into a finite set of codebook entries. For each time step t, the model selects the nearest codebook vector ei from a learned codebook E = {e1, ..., eV}:
This discretization forces the model to learn representations that cluster around semantically meaningful prototypes, mimicking the categorical nature of phonemes in speech.
Contextual Representation Learning
The quantized features are then processed by a Transformer-based context network that captures long-range dependencies. The network computes attention-weighted sums over the input sequence:
where attention weights αtj are computed via scaled dot-product attention. The contextualized outputs ht exhibit both local phonetic content and global linguistic structure.
Contrastive Learning Objective
wav2vec is trained using a contrastive loss that distinguishes true future timesteps from distractors. For each position t, the model must identify the correct quantized vector qt+k among K negative samples:
where ct is the context network's prediction, and τ is a temperature hyperparameter. This objective drives the model to learn temporally predictive representations without transcribed labels.
Architectural Innovations
Key design choices distinguish wav2vec from prior approaches:
- Gated Relative Position Bias: The Transformer layers incorporate learned position embeddings that decay exponentially with distance, allowing flexible modeling of varying-range dependencies.
- Layer-wise Gradient Scaling: Earlier layers receive larger gradient updates to prevent vanishing gradients in deep networks.
- Dynamic Codebook Entries: The quantization codebook evolves during training via exponential moving averages of cluster centers.

Contrastive Predictive Coding (CPC) in wav2vec
Contrastive Predictive Coding (CPC) forms the backbone of wav2vec's self-supervised learning framework. At its core, CPC learns representations by predicting future latent representations from past observations in a contrastive setting. The model is trained to distinguish between true future samples and distractors, forcing it to capture meaningful structure in the data.
Mathematical Formulation
The CPC objective maximizes the mutual information between the encoded context ct and future observations zt+k. For a given context ct, we predict k steps ahead using a linear transformation Wk:
The contrastive loss is computed using a noise-contrastive estimation (NCE) approach. For each positive pair (ct, zt+k), we sample N negative examples z' from the same sequence. The probability of the positive pair is:
where Z contains both the positive sample and N negative samples. The model is trained to maximize the log-likelihood of the positive pairs:
Architecture Implementation
wav2vec implements CPC through:
- A convolutional feature encoder that processes raw audio into latent representations zt
- A context network (typically a GRU) that aggregates past representations into context vectors ct
- Multiple prediction heads fk for different future steps
The convolutional encoder uses strided convolutions to downsample the audio, typically achieving a stride of 10ms per step. The context network operates at this reduced temporal resolution, allowing efficient processing of long sequences.
Key Design Choices
Several critical design decisions in wav2vec's CPC implementation affect performance:
- Negative Sampling Strategy: Negative examples are drawn from other positions in the same sequence, creating a challenging but tractable discrimination task
- Prediction Horizon: The model typically predicts 12 future steps (120ms ahead), balancing between capturing meaningful structure and maintaining prediction accuracy
- Layer Normalization: Applied before the prediction heads to stabilize training
- Gradient Stopping: The gradient is not propagated through the negative samples, preventing collapse
Practical Considerations
When implementing CPC in wav2vec:
- The batch size directly affects the number of available negative samples - larger batches generally yield better representations
- The temperature parameter in the softmax affects how sharply the model distinguishes between positive and negative samples
- The choice of context network architecture (GRU vs Transformer) impacts the model's ability to capture long-range dependencies
The CPC objective naturally learns representations that preserve phonetic information while being invariant to irrelevant acoustic variations, making it particularly suitable for downstream speech recognition tasks.

2.3 wav2vec 2.0: Quantization and Transformer Improvements
wav2vec 2.0 introduces two key architectural innovations over its predecessor: product quantization for discrete speech representations and a transformer-based context network for learning high-level features. These improvements enable the model to learn directly from raw audio without transcriptions, achieving state-of-the-art results in speech recognition with limited labeled data.
Product Quantization for Discrete Speech Representations
The quantization module in wav2vec 2.0 maps continuous latent speech representations z to discrete codebook entries q via a Gumbel-Softmax operation. Given latent features zt at time t, the model learns G codebooks with V entries each:
Here, ek are codebook embeddings, w are weight parameters, and ε are Gumbel noise samples that enable differentiable training. The Gumbel-Softmax approximation allows backpropagation through the discrete selection process:
where τ is a temperature parameter annealed during training. This multi-codebook approach captures richer speech characteristics than single-codebook quantization.
Transformer-Based Context Network
The context network replaces wav2vec 1.0's CNN with a transformer encoder that processes the quantized representations. For input sequence q1:T, the transformer computes:
where l indexes transformer layers. The model uses relative positional embeddings to capture temporal relationships:
with learned relative position vectors r. This architecture enables long-range dependency modeling critical for speech understanding.
Masked Contrastive Learning Objective
The model is trained by masking spans of latent features and requiring the transformer to identify the true quantized representation qt among distractors for masked positions:
where M is the set of masked positions, ct is the context vector, Qt contains the true quantized representation and K distractors, and κ is a temperature hyperparameter. This objective forces the model to learn discriminative speech representations.
The combination of these innovations allows wav2vec 2.0 to achieve phoneme error rates competitive with supervised models while using two orders of magnitude less labeled data. The discrete quantization provides a compressed intermediate representation that preserves phonetic content while the transformer learns robust contextual relationships.

3. HuBERT’s Masked Prediction Objective
HuBERT’s Masked Prediction Objective
HuBERT (Hidden-unit BERT) employs a masked prediction objective inspired by BERT’s success in natural language processing. The model learns representations by predicting discrete targets derived from an offline clustering step, applied to masked regions of the input audio. Unlike contrastive learning methods such as wav2vec 2.0, HuBERT relies on a cross-entropy loss over clustered representations, enabling it to capture high-level acoustic and phonetic features.
Mathematical Formulation
The masked prediction task involves two key steps:
- Masking: Given an input audio sequence X, random time steps are masked with probability p. The masked regions are replaced with a learned mask embedding or zeroed out.
- Target Prediction: The model must predict cluster assignments for the masked regions based on a pre-computed clustering (e.g., k-means over MFCCs or learned features).
The loss function is defined as:
where:
- ℳ is the set of masked time steps,
- ct is the cluster assignment for time step t,
- P(ct | X̃) is the model’s predicted probability for the correct cluster.
Clustering and Iterative Refinement
HuBERT’s performance hinges on the quality of its clustering targets. The initial clusters are derived from an unsupervised algorithm (e.g., k-means on MFCCs), but the model iteratively refines them by:
- Bootstrapping: Using intermediate model features as inputs for subsequent clustering passes.
- Multiple Clustering Passes: Recomputing clusters at different training stages to improve target discriminability.
This iterative process aligns the cluster assignments with higher-level acoustic units (e.g., phonemes), making the model’s predictions more linguistically meaningful.
Practical Implementation
In practice, HuBERT’s masking strategy differs from BERT’s in two ways:
- Span Masking: Contiguous time spans are masked instead of individual tokens, reflecting the continuous nature of speech.
- Dynamic Masking: Masks are regenerated for each training epoch, preventing overfitting to fixed patterns.
The model’s transformer architecture processes the unmasked regions to infer the masked ones, leveraging bidirectional context—a critical advantage over autoregressive approaches.
Comparison with wav2vec 2.0
While both models use masking, HuBERT’s reliance on cluster-based prediction contrasts with wav2vec 2.0’s contrastive loss. HuBERT avoids negative sampling, which can be computationally expensive, and instead treats the task as a classification problem over a fixed set of targets. This often leads to better performance on tasks requiring fine-grained phonetic discrimination.

3.2 Iterative Clustering for Label Generation
Iterative clustering is a core mechanism in self-supervised learning (SSL) frameworks like wav2vec 2.0 and HuBERT, where discrete latent targets are generated without human annotation. The process involves alternating between clustering audio representations and training the model to predict these cluster assignments, refining both the features and labels over time.
Clustering Mechanism
Given an input audio sequence X, the model first extracts contextualized features Z = fθ(X) using a convolutional feature encoder fθ. These features are then clustered into K discrete units using an algorithm like k-means or GMM. The clustering objective minimizes:
where C is the cluster assignment sequence, μk are cluster centroids, and zt is the feature vector at timestep t.
Iterative Refinement
HuBERT extends this by performing multiple clustering iterations. In each iteration:
- Feature Extraction: The current model generates improved representations.
- Clustering: Features are re-clustered to produce new pseudo-labels.
- Training: The model learns to predict the new cluster assignments via a masked prediction task.
The loss function for the masked prediction task is:
where M is the set of masked timesteps, ct is the cluster assignment, and p(ct | \tilde{X}) is the model's predicted probability over clusters given the corrupted input \tilde{X}.
Cluster Diversity and Stability
To prevent degenerate solutions (e.g., all features collapsing to a single cluster), HuBERT employs:
- Random Projection: Features are projected to a lower dimension before clustering to encourage diversity.
- Cluster Rebalancing: Rare clusters are upsampled during training to maintain uniform usage.
The cluster assignments stabilize after 2-3 iterations, with later iterations providing diminishing returns. This is empirically observed through metrics like cluster purity and normalized mutual information (NMI) between successive iterations.
Practical Considerations
Key hyperparameters include:
- Number of Clusters (K): Typically 100-500 for wav2vec 2.0 and 500-1000 for HuBERT.
- Masking Strategy: HuBERT uses span masking (contiguous blocks of 10 timesteps) rather than independent masking.
- Feature Normalization: L2 normalization of features before clustering improves stability.
This iterative process enables the model to discover phoneme-like units without transcribed data, forming the basis for downstream fine-tuning on tasks like ASR.

3.3 Architectural Differences from wav2vec
While wav2vec and HuBERT share foundational principles in self-supervised learning for audio, their architectural divergences significantly impact performance and training dynamics. HuBERT introduces several key modifications to the wav2vec framework, primarily focusing on the masking strategy, target generation, and transformer refinement.
Masking Strategy and Target Generation
wav2vec 2.0 employs a contrastive learning approach, where the model predicts quantized latent representations of masked audio regions from a set of distractors. The loss function is defined as:
where ct is the context vector, qt is the true quantized target, Q is the set of distractors, and κ is a temperature parameter. HuBERT replaces this with a clustering-based prediction task, using offline k-means to generate pseudo-labels from MFCC features or transformer features in iterative refinement stages. The loss becomes a cross-entropy over clustered targets:
where zt is the cluster assignment for timestep t, and Ct is the context.
Transformer Architecture Modifications
HuBERT's transformer backbone incorporates:
- Layer-wise gradient scaling: Earlier layers receive smaller gradient updates to stabilize training, implemented via learnable scalars αl for layer l:
- Convolutional feature encoder expansion: The initial CNN stack uses larger kernels (up to 10x wider than wav2vec's) to capture longer-range acoustic patterns before transformer processing.
Iterative Refinement Mechanism
HuBERT introduces a two-phase training process absent in wav2vec:
- First pass: Trains on MFCC-derived cluster targets to bootstrap acoustic unit discovery.
- Second pass: Uses the model's own intermediate features (e.g., 6th layer outputs) to recompute clusters, creating more linguistically meaningful targets.
This iterative approach allows HuBERT to discover hierarchical representations, where later iterations capture phoneme-like structures while early passes model low-level acoustics. The process resembles expectation-maximization, with the E-step generating targets and the M-step optimizing the transformer.

4. Benchmarking wav2vec and HuBERT on Speech Tasks
Benchmarking wav2vec and HuBERT on Speech Tasks
Performance Metrics for Speech Models
When evaluating self-supervised speech models like wav2vec and HuBERT, standard metrics include Word Error Rate (WER) for automatic speech recognition (ASR), Phoneme Error Rate (PER) for phonetic analysis, and speaker verification accuracy for voice identification tasks. For ASR, WER is computed as:
where S is substitutions, D is deletions, I is insertions, and N is the total words in the reference. Lower WER indicates better performance. For speaker verification, the Equal Error Rate (EER) balances false acceptance and rejection rates.
Benchmarking on LibriSpeech
On the LibriSpeech 960h benchmark, wav2vec 2.0 Base achieves a WER of 2.7% on test-clean when fine-tuned with a CTC loss, while HuBERT Large reaches 1.9% with iterative clustering refinement. The performance gap stems from HuBERT's masked prediction objective leveraging both acoustic and linguistic features, whereas wav2vec relies primarily on contrastive learning of latent speech representations.
Key Architectural Differences
- wav2vec 2.0: Uses a contrastive loss over quantized latent speech units, with dynamic masking of input frames.
- HuBERT: Employs a cross-entropy loss predicting clustered MFCC features, iteratively refined via k-means.
Computational Efficiency Trade-offs
While HuBERT outperforms wav2vec on accuracy, it requires 1.5× more training iterations due to its iterative clustering phase. For a 300M parameter model, wav2vec converges in ~100k steps on 128 GPUs, whereas HuBERT needs ~150k steps. The compute-accuracy trade-off favors HuBERT for high-resource settings but makes wav2vec preferable for edge deployment.
Cross-Lingual Generalization
On the MLS benchmark (multilingual LibriSpeech), wav2vec shows stronger zero-shot transfer, with a 15.2% WER average across 8 languages versus HuBERT's 18.7%. This aligns with findings that contrastive learning generalizes better to unseen phonemes than cluster-based objectives. However, after fine-tuning, HuBERT closes the gap, achieving 12.1% vs. wav2vec's 11.8%.
Robustness to Noise
Under additive white noise (SNR=10dB), HuBERT's WER degrades by 22% relative to clean speech, compared to wav2vec's 29%. The iterative clustering in HuBERT appears to learn more noise-invariant features, as evidenced by t-SNE plots showing tighter phoneme clusters in noisy conditions.
Memory Footprint Analysis
For real-time ASR on a Tesla T4 GPU, wav2vec Base (95M params) processes 16kHz audio at 0.8× real-time with 1.2GB memory, while HuBERT Base (95M params) requires 1.5GB due to additional projection layers for cluster prediction. This makes wav2vec more suitable for memory-constrained applications.
4.2 Fine-Tuning for Downstream Applications (ASR, Emotion Recognition)
Transfer Learning with Pre-Trained SSL Models
Pre-trained self-supervised learning (SSL) models like wav2vec 2.0 and HuBERT provide rich acoustic representations that can be fine-tuned for downstream tasks. The key advantage lies in their ability to capture universal speech features during pre-training, reducing the need for large labeled datasets in downstream applications. The fine-tuning process involves:
- Task-Specific Head Adaptation: Replacing the pre-training objective (e.g., masked prediction) with a task-specific output layer.
- Feature Extraction Freezing: Optionally freezing lower layers to retain general acoustic features while training only upper layers.
- Learning Rate Scheduling: Using lower learning rates for pre-trained weights to avoid catastrophic forgetting.
where λ controls the trade-off between the downstream task loss and the SSL loss, useful for semi-supervised fine-tuning.
Automatic Speech Recognition (ASR) Fine-Tuning
For ASR, the pre-trained model is typically augmented with a Connectionist Temporal Classification (CTC) head. The CTC loss function aligns variable-length audio inputs with target transcriptions:
where p(y|x) is marginalized over all possible alignments between input x and label sequence y. Key considerations include:
- Vocabulary Matching: The output layer must match the token set (characters, subwords, or words) of the target domain.
- SpecAugment: Time/frequency masking during fine-tuning improves robustness to acoustic variations.
- Layer-wise Learning Rate Decay: Lower rates for earlier layers preserve general features.
Emotion Recognition Adaptation
For emotion recognition, the model requires architectural changes to capture prosodic and paralinguistic features:
- Pooling Strategy: Statistic (mean/max) or attention-based pooling replaces the CTC head.
- Multi-Task Learning: Joint training with auxiliary tasks (e.g., speaker ID) improves emotion discrimination.
- Data Augmentation: Pitch shifting and speed perturbation increase affective variability.
where AttnPool computes weighted averages of frame-level SSL features HSSL.
Practical Implementation Considerations
Effective fine-tuning requires careful hyperparameter selection:
| Parameter | ASR Range | Emotion Range |
|---|---|---|
| Learning Rate | 1e-5 to 3e-4 | 5e-6 to 1e-4 |
| Batch Size | 16-64 | 32-128 |
| Frozen Layers | 0-6 | 0-12 |
Gradient accumulation is often necessary when GPU memory limits batch size. Mixed precision training (FP16/FP32) provides additional speedups without sacrificing accuracy.
Case Study: IEMOCAP Emotion Recognition
When fine-tuning HuBERT on the IEMOCAP dataset, best practices include:
- Using 3-layer BiLSTM on top of frozen HuBERT features
- Adding learnable positional embeddings to capture temporal affect dynamics
- Balancing classes via inverse frequency weighting
This approach achieves ~65% accuracy on four-class emotion recognition, outperforming supervised baselines by 8-12% absolute.
4.3 Computational Efficiency and Deployment Considerations
Self-supervised learning models like wav2vec and HuBERT achieve state-of-the-art performance in speech representation learning, but their computational demands pose challenges for real-world deployment. The transformer-based architectures in these models require careful optimization to balance accuracy with inference speed and memory constraints.
Model Architecture and Computational Complexity
The computational cost of wav2vec and HuBERT primarily stems from the transformer encoder layers. For a model with L layers, H attention heads, and hidden dimension d, the time complexity for processing an input sequence of length T is:
The quadratic dependence on sequence length T becomes particularly problematic for long audio inputs. HuBERT improves upon wav2vec 2.0 by reducing the need for multiple forward passes through its iterative clustering approach, but both models remain computationally intensive.
Quantization and Pruning Strategies
Post-training quantization reduces model size and accelerates inference by converting weights from 32-bit floating point to 8-bit integers. For wav2vec 2.0, dynamic quantization of the transformer layers yields a 4x reduction in model size with minimal accuracy loss:
Structured pruning removes entire attention heads or feed-forward neurons based on importance scores. Empirical studies show that up to 30% of HuBERT's attention heads can be pruned without significant performance degradation on downstream tasks.
Hardware-Specific Optimizations
Modern accelerators like GPUs and TPUs exploit parallel computation through:
- Tensor Cores: Mixed-precision matrix operations accelerate transformer attention mechanisms
- Memory Optimization: Kernel fusion reduces data movement between GPU global memory and registers
- Batch Processing: Dynamic batching groups variable-length inputs for efficient GPU utilization
On NVIDIA architectures, enabling TensorFloat-32 (TF32) precision for wav2vec inference provides a 2-3x speedup over FP32 while maintaining numerical stability.
Real-Time Deployment Constraints
For real-time applications, the end-to-end latency budget typically requires:
This necessitates optimizations like:
- Chunked Processing: Splitting long audio into overlapping 1-2 second segments
- Knowledge Distillation: Training smaller student models with layer reduction
- On-Device Deployment: Using frameworks like TensorFlow Lite for mobile CPUs
Energy Efficiency Considerations
The energy consumption E of inference scales with the number of floating point operations (FLOPs):
For a standard wav2vec 2.0 Base model processing 1 hour of audio, the energy consumption on different hardware platforms varies significantly:
- Desktop GPU (NVIDIA V100): ~0.5 kWh
- Mobile CPU (ARM Cortex-A76): ~0.05 kWh
- Edge TPU (Google Coral): ~0.02 kWh
This makes architectural choices critical for battery-powered applications.
5. Key Research Papers and Citations
5.1 Key Research Papers and Citations
- Fast-HuBERT: An Efficient Training Framework for Self ... - ar5iv — The base model of wav2vec 2.0 and HuBERT consists of 95 million parameters. These models are computationally expensive, often taking up a large amount of memory and a long training period. As a result, the computational cost is not affordable to most researchers, and the long training time causes inconvenience for in-depth research on speech ...
- GitHub - s3prl/s3prl: Self-Supervised Speech Pre-training and ... — We only list the major contributors here for conciseness. However, we are deeply grateful for all the contributions. Please see the Contributors page for the full list.. Sep 2024: Support MS-HuBERT (see MS-HuBERT); Dec 2023: Support Multi-resolution HuBERT (MR-HuBERT, see Multiresolution HuBERT); Oct 2023: Support ESPnet pre-trained upstream models (see ESPnet HuBERT and WavLabLM)
- Comprehensive Layer-wise Analysis of SSL Models for Audio Deepfake ... — In this paper, we address these gaps by undertaking a comprehensive analysis of SSL models across various settings. This includes (1) full speech utterance deepfake detection in English (En), Chinese (Zh), and Spanish (Es); (2) partial speech utterance detection in English and Chinese; and (3) detection of songs and scene-based (acoustic environment) deepfakes.
- Comparison of wav2vec 2.0 models on three speech processing tasks — The current state-of-the-art for various speech processing problems is a sequence-to-sequence model based on a self-attention mechanism known as transformer. The widely used wav2vec 2.0 is a self-supervised transformer model pre-trained on large amounts of unlabeled speech and then fine-tuned for a specific task. The data used for training and fine-tuning, along with the size of the ...
- Using Speaker-Specific Emotion Representations in Wav2vec 2.0-Based ... — The wav2vec 2.0 representation has been employed in various SER studies because of its outstanding ability to create generalized representations that can be used to improve acoustic model training. SUPERB [30] evaluated how well pre-trained audio SSL approaches performed on ten speech tasks. The pre-trained SSL networks with high performance ...
- Probing Speaker-specific Features in Speaker Representations - arXiv.org — A similar structure is shared among most speech SSL models, i.e., a convolutional neural network (CNN) encoder are followed by a series of consecutive Transformer blocks. HuBERT , WavLM , and Wav2vec 2.0 are three prominent speech SSL models advance various speech processing tasks using the abovementioned common structure. HuBERT uses a masked ...
- (PDF) The Ability of Self-Supervised Speech Models for Audio ... — tSNEs of embeddings of HuBERT xLarge fusion (left) and wav2vec 2.0 Large fusion (right) on 16 audio datasets. Each point is a sample in a dataset.
- Wav2Vec2 - Hugging Face — Overview. The Wav2Vec2 model was proposed in wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations by Alexei Baevski, Henry Zhou, Abdelrahman Mohamed, Michael Auli.. The abstract from the paper is the following: We show for the first time that learning powerful representations from speech audio alone followed by fine-tuning on transcribed speech can outperform the ...
- PDF wav2vec 2.0: A Framework for Self-Supervised Learning of ... - NeurIPS — audio alone followed by fine-tuning on transcribed speech can outperform the best semi-supervised methods while being conceptually simpler. wav2vec 2.0 masks the speech input in the latent space and solves a contrastive task defined over a quantization of the latent representations which are jointly learned. Experiments
- wav2vec 2.0: A Framework for Self-Supervised Learning of Speech ... — audio alone followed by fine-tuning on transcribed speech can outperform the best semi-supervised methods while being conceptually simpler. wav2vec 2.0 masks the speech input in the latent space ...
5.2 Open-Source Implementations and Toolkits
- Novel Speech Recognition Systems Applied to Forensics within Child ... — Self-supervised audio encoders like Wav2Vec2.0, HuBERT, and Conformers learn high quality audio representations. ... strides of {5, 2, 2, 2, 2, 2, 2} and kernel widths of {10, 3, 3, 3, 3, 2, 2}. The transformer network is formed by 24 blocks, 1024 dimensions, inner dimensions numbering 4096, and a total of 16 attention heads. ... However, we ...
- 语音-识别篇之wav2vec和hubert - 知乎 - 知乎专栏 — 特征编码器包含七层,每个层中的时间卷积具有512个通道,步长分别为(5,2,2,2,2,2,2),内核宽度分别为(10,3,3,3,3,2,2)。 ... hubert和wav2vec输入的输入的都是16khz波形图,经过一些列的cnn操作操作后降维到49hz,大概25ms一个unit,这个数字好熟悉,主流的算法都是25ms。 ...
- 3 Best Open-Source ASR Models Compared: Whisper, wav2vec 2.0, Kaldi ... — Despite the notoriety associated with wav2vec 2.0, there are relatively few examples of open-source ASR versions available. For our comparison, we chose wav2vec2-large-robust-ft-libri-960h , produced originally as a result of this paper and now hosted and made available for ASR inference by the HuggingFace transformers library.
- GitHub - pushkal1234/Speech-Recognition-system_wav2vec-2.0- — Speech-Recognition-system_wav2vec-2.- Facebook recently introduced and open-sourced their new framework for self-supervised learning of representations from raw audio data called Wav2Vec 2.0. Facebook researchers claim this framework can enable automatic speech recognition models with just 10 minutes of transcribed speech data.
- PDF Comparing Open-Source Speech Recognition ⋆ Toolkits — Abstract. In this paper, a large-scale evaluation of open-source speech recognition toolkits is described. Specifically, HTK in association with the decoders HDecode and Julius, CMU Sphinx with the decoders pock-etsphinx and Sphinx-4, and the Kaldi toolkit are compared in terms of usability and expense of recognition accuracy. The evaluation ...
- Wav2vec 2.0: Learning the structure of speech from raw audio - AI at Meta — To evaluate cross-linguality, we trained wav2vec 2.0 on unannotated speech audio of 12 languages from the Common Voice benchmark. The resulting approach, called XLSR, shows that cross-lingual training dramatically improves performance on low-resource languages, compared with training only on a single language.We also measured how often the learned speech units are used in each language and ...
- PDF arXiv:2102.00850v1 [eess.AS] 1 Feb 2021 — tions extracted from wav2vec 2.0 would also be suitable input for training an ASR model. Training on extracted representa-tions offers a light-weight alternative to the computationally expensive fine-tuning procedure described in [3]. We study how representations from the two versions of the open-source wav2vec framework compare when used as input
- PDF Wav2vec 2.0 inside out — 1.3 Wav2vec 2.0 Baevski et al. introduced the Wav2vec 2.0 model in 2020 [8]. This model has a Transformer-based architecture, combined with a Convolutional fea-ture encoder followed by the Transformer layers. The model has been pre-trained with unlabelled data where parts of the input are masked at the level of the feature encoder.
- Self-training and pre-training, understanding the wav2vec series — wav2vec, is a convolutional neural network (CNN) that takes raw audio as input and computes a general representation that can be input to a speech recognition system. The objective is a contrastive loss that requires distinguishing a true future audio sample from negatives. b. The model
- 使用语音文件 Fine-tuning SSL-model <Wav2vec、Hubert> — 我们探讨使用语音SSL模型进行语音修复的情况,即从其周围环境中重建语音信号的缺失部分,也就是完成一个与预文本任务非常相似的下游任务。特别地,我们提出了两种解决方案来匹配HuBERT的输出与HiFiGAN的输入,通过冻结一个并微调另一个,反之亦然。然后,将插值的Mel频谱图输入到预训练的 ...
5.3 Advanced Topics and Ongoing Research
- GitHub - SeaBenSea/HuBERT-SER: Wav2Vec for speech recognition ... — Wav2Vec for speech recognition, classification, and audio classification - SeaBenSea/HuBERT-SER. Wav2Vec for speech recognition, classification, and audio classification - SeaBenSea/HuBERT-SER ... This repository consists of models, scripts, and notebooks that help you to use all the benefits of HuBERT 2.0 in your research. In the following, I ...
- A Fine-tuned Wav2vec 2.0/HuBERT Benchmark For Speech Emotion ... — Speech self-supervised models such as wav2vec 2.0 and HuBERT are making revolutionary progress in Automatic Speech Recognition (ASR). However, they have not been totally proven to produce better performance on tasks other than ASR. In this work, we explored partial fine-tuning and entire fine-tuning on wav2vec 2.0 and HuBERT pre-trained models for three non-ASR speech tasks: Speech Emotion ...
- Comprehensive Layer-wise Analysis of SSL Models for Audio Deepfake ... — In this paper, we address these gaps by undertaking a comprehensive analysis of SSL models across various settings. This includes (1) full speech utterance deepfake detection in English (En), Chinese (Zh), and Spanish (Es); (2) partial speech utterance detection in English and Chinese; and (3) detection of songs and scene-based (acoustic environment) deepfakes.
- A fine-tuned wav2vec2.0/Hubert benchmark for SER, Speaker verification ... — ASR fine-tuned models for both wav2vec 2.0 and HuBERT are taken into consideration because we assume that some tasks may benefit from the ASR fine-tuning. Pretrained HuBERT. wav2vec 2.0과 동일한 방식으로, CNN으로 인코딩된 오디오 피처는 HuBERT에서 무작위로 마스킹됩니다.
- Hubert - Hugging Face — Hubert was proposed in HuBERT: ... the HuBERT model either matches or improves upon the state-of-the-art wav2vec 2.0 performance on the Librispeech (960h) and Libri-light (60,000h) benchmarks with 10min, 1h, 10h, 100h, and 960h fine-tuning subsets. ... Values can be obtained by loading a .flac or .wav audio file into an array of type List[float ...
- PDF Transfer Learning of Wav2vec 2.0 for Automatic Lyric Transcription — In recent years, self-supervised learning (SSL) has be-come a new paradigm in ASR research. Several SSL meth-ods can perform excellently with access to only a few hours or even a few minutes of labeled data [14-16]. Among them, wav2vec 2.0 [16] has been shown to be a particu-larly promising model for transfer learning [12]. wav2vec
- PDF MT4SSL: Boosting Self-Supervised Speech Representation Learning by ... — include wav2vec [8], vq-wav2vec [12] and wav2vec 2.0 [5]. Predictive learning aims to predict the pre-clustered or model-generated targets with the input representations. HuBERT [6] predicts the discrete targets clustered by the K-means algorithm of the masked regions with a BERT-like method. To learn
- HuBERT Model - GeeksforGeeks — Since the introduction of the Wav2Vec model, self-supervised learning research in speech has gained momentum. HuBERT is a self-supervised model that allows the BERT model to be applied to audio inputs. Applying a BERT model to a sound input is challenging as sound units have variable length and there can be multiple sound units in each input.
- (PDF) The Ability of Self-Supervised Speech Models for Audio ... — tSNEs of embeddings of HuBERT xLarge fusion (left) and wav2vec 2.0 Large fusion (right) on 16 audio datasets. Each point is a sample in a dataset.








