class_docstr: Apply random audio codecs to input waveforms using torchaudio.
  
  This class provides an interface for applying codec augmentation techniques to audio data.
  
  Arguments
  ---------
  sample_rate: int
      The sample rate of the input waveform.
  
  Example
  -------
  >>> waveform = torch.rand(4, 16000)
  >>> if torchaudio.list_audio_backends()[0] == 'ffmpeg':
  ...     augmenter = CodecAugment(16000)
  ...     output_waveform = augmenter(waveform)
docstr: Apply a random audio codec from the available list.
  
  Arguments
  ---------
  waveform: torch.Tensor
      Input waveform of shape `[batch, time]`.
  
  Returns
  ---------
  torch.Tensor
      Coded version of the input waveform of shape `[batch, time]`.
docstr_tok: ["Apply","a","random","audio","codec","from","the","available","list",".","Arguments","--","--","--","--","-","waveform",":","torch.Tensor","Input","waveform","of","shape","`","[","batch",",","time","]","`",".","Returns","--","--","--","--","-","torch.Tensor","Coded","version","of","the","input","waveform","of","shape","`","[","batch",",","time","]","`","."]
code: def forward(self, waveform):
      """
      Apply a random audio codec from the available list.
  
      Arguments
      ---------
      waveform: torch.Tensor
          Input waveform of shape `[batch, time]`.
  
      Returns
      ---------
      torch.Tensor
          Coded version of the input waveform of shape `[batch, time]`.
      """
      format, encoder = random.choice(self.available_format_encoders)
      return self.apply_codec(waveform, format=format, encoder=encoder)
  
file_path: speechbrain/speechbrain/augment/codec.py
imports: import random
  import torch
  import torchaudio
label_desc: Use image node_id 3 for calling the CodecAugment obj's underlying member method code with example usage: obj.forward(waveform) and returns: self