class_docstr: Class for language ID training"
      
class_docstr_tok: ["Class","for","language","ID","training","''"]
docstr: Computation pipeline based on a encoder + speaker classifier.
  Data augmentation and environmental corruption are applied to the
  input speech.
docstr_tok: ["Computation","pipeline","based","on","a","encoder","+","speaker","classifier",".","Data","augmentation","and","environmental","corruption","are","applied","to","the","input","speech","."]
code: def compute_forward(self, batch, stage):
      """Computation pipeline based on a encoder + speaker classifier.
      Data augmentation and environmental corruption are applied to the
      input speech.
      """
      batch = batch.to(self.device)
      wavs, lens = batch.sig
  
      # Add waveform augmentation if specified.
      if stage == sb.Stage.TRAIN and hasattr(
          self.hparams, "wav_augment"
      ):
          wavs, lens = self.hparams.wav_augment(wavs, lens)
  
      # Feature extraction and normalization
      feats = self.modules.compute_features(wavs)
      feats = self.modules.mean_var_norm(feats, lens)
  
      # Embeddings + speaker classifier
      embeddings = self.modules.embedding_model(feats, lens)
      outputs = self.modules.classifier(embeddings)
  
      return outputs, lens
  
file_path: speechbrain/recipes/VoxLingua107/lang_id/train.py
imports: import os
  import sys
  import random
  from typing import Dict
  import json
  from functools import partial
  import webdataset
  import logging
  import torch
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.dataio.batch import PaddedBatch
label_desc: Use image node_id 1 for calling the LanguageBrain obj's underlying member method code with example usage: obj.compute_forward(batch, stage) and returns: outputs,  lens