class_docstr: Class that manages the training loop. See speechbrain.core.Brain.
docstr: Prepare the features for computation, including augmentation.
  
  Arguments
  ---------
  wavs : tuple
      Input signals (tensor) and their relative lengths (tensor).
  stage : sb.Stage
      The current stage of training.
docstr_tok: ["Prepare","the","features","for","computation",",","including","augmentation",".","Arguments","--","--","--","--","-","wavs",":","tuple","Input","signals","(","tensor",")","and","their","relative","lengths","(","tensor",")",".","stage",":","sb.Stage","The","current","stage","of","training","."]
code: def prepare_features(self, wavs, stage):
      """Prepare the features for computation, including augmentation.
  
      Arguments
      ---------
      wavs : tuple
          Input signals (tensor) and their relative lengths (tensor).
      stage : sb.Stage
          The current stage of training.
      """
      wavs, lens = wavs
  
      # 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)
  
      return feats, lens
  
file_path: speechbrain/templates/hyperparameter_optimization_speaker_id/train.py
imports: import os
  import sys
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
  from mini_librispeech_prepare import prepare_mini_librispeech
  from speechbrain.utils import hpopt
label_desc: Use image node_id 2 for calling the SpkIdBrain obj's underlying member method code with example usage: obj.prepare_features(wavs, stage) and returns: feats,  lens