docstr: Given an input batch it computes the phoneme probabilities.
docstr_tok: ["Given","an","input","batch","it","computes","the","phoneme","probabilities","."]
code: def compute_forward(self, batch, stage):
      "Given an input batch it computes the phoneme probabilities."
      batch = batch.to(self.device)
      wavs, wav_lens = batch.sig
      phns_bos, _ = batch.phn_encoded_bos
  
      # Add waveform augmentation if specified.
      if stage == sb.Stage.TRAIN and hasattr(
          self.hparams, "wav_augment"
      ):
          wavs, wav_lens = self.hparams.wav_augment(wavs, wav_lens)
          phns_bos = self.hparams.wav_augment.replicate_labels(phns_bos)
  
      feats = self.modules.wav2vec2(wavs, wav_lens)
      x = self.modules.enc(feats)
  
      # output layer for ctc log-probabilities
      logits = self.modules.ctc_lin(x)
      p_ctc = self.hparams.log_softmax(logits)
  
      e_in = self.modules.emb(phns_bos)
      h, _ = self.modules.dec(e_in, x, wav_lens)
  
      # output layer for seq2seq log-probabilities
      logits = self.modules.seq_lin(h)
      p_seq = self.hparams.log_softmax(logits)
  
      hyps = None
      if stage == sb.Stage.VALID:
          hyps, _, _, _ = self.hparams.valid_searcher(x, wav_lens)
      elif stage == sb.Stage.TEST:
          hyps, _, _, _ = self.hparams.test_searcher(x, wav_lens)
  
      return p_ctc, p_seq, wav_lens, hyps
  
file_path: speechbrain/recipes/TIMIT/ASR/seq2seq/train_with_wav2vec2.py
imports: import os
  import sys
  import torch
  import logging
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.distributed import run_on_main, if_main_process
label_desc: Use image node_id 1 for calling the ASR obj's underlying member method code with example usage: obj.compute_forward(batch, stage) and returns: p_ctc,  p_seq,  wav_lens,  hyps