Shortcuts

SquimSubjective

class torchaudio.models.SquimSubjective(ssl_model: Module, projector: Module, predictor: Module)[source]

Speech Quality and Intelligibility Measures (SQUIM) model that predicts subjective metric scores for speech enhancement (e.g., Mean Opinion Score (MOS)). The model is adopted from NORESQA-MOS [Manocha and Kumar, 2022] which predicts MOS scores given the input speech and a non-matching reference.

Parameters:
  • ssl_model (torch.nn.Module) – The self-supervised learning model for feature extraction.

  • projector (torch.nn.Module) – Projection layer that projects SSL feature to a lower dimension.

  • predictor (torch.nn.Module) – Predict the subjective scores.

Tutorials using SquimSubjective:
Torchaudio-Squim: Non-intrusive Speech Assessment in TorchAudio

Torchaudio-Squim: Non-intrusive Speech Assessment in TorchAudio

Torchaudio-Squim: Non-intrusive Speech Assessment in TorchAudio

Methods

forward

SquimSubjective.forward(waveform: Tensor, reference: Tensor)[source]

Predict subjective evaluation metric score.

Parameters:
  • waveform (torch.Tensor) – Input waveform for evaluation. Tensor with dimensions (batch, time).

  • reference (torch.Tensor) – Non-matching clean reference. Tensor with dimensions (batch, time_ref).

Returns:

Subjective metric score. Tensor with dimensions (batch,).

Return type:

(torch.Tensor)

Factory Functions

squim_subjective_model

Build a custome torchaudio.prototype.models.SquimSubjective model.

squim_subjective_base

Build torchaudio.prototype.models.SquimSubjective model with default arguments.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources