class_docstr: Slightly speed up or slow down an audio signal.
  
  Resample the audio signal at a rate that is similar to the original rate,
  to achieve a slightly slower or slightly faster signal. This technique is
  outlined in the paper: "Audio Augmentation for Speech Recognition"
  
  Arguments
  ---------
  orig_freq : int
      The frequency of the original signal.
  speeds : list
      The speeds that the signal should be changed to, as a percentage of the
      original signal (i.e. `speeds` is divided by 100 to get a ratio).
  
  Example
  -------
  >>> from speechbrain.dataio.dataio import read_audio
  >>> signal = read_audio('tests/samples/single-mic/example1.wav')
  >>> perturbator = SpeedPerturb(orig_freq=16000, speeds=[90])
  >>> clean = signal.unsqueeze(0)
  >>> perturbed = perturbator(clean)
  >>> clean.shape
  torch.Size([1, 52173])
  >>> perturbed.shape
  torch.Size([1, 46956])
class_docstr_tok: ["Slightly","speed","up","or","slow","down","an","audio","signal",".","Resample","the","audio","signal","at","a","rate","that","is","similar","to","the","original","rate",",","to","achieve","a","slightly","slower","or","slightly","faster","signal",".","This","technique","is","outlined","in","the","paper",":","``","Audio","Augmentation","for","Speech","Recognition","''","Arguments","--","--","--","--","-","orig_freq",":","int","The","frequency","of","the","original","signal",".","speeds",":","list","The","speeds","that","the","signal","should","be","changed","to",",","as","a","percentage","of","the","original","signal","(","i.e",".","`","speeds","`","is","divided","by","100","to","get","a","ratio",")",".","Example","--","--","--","-",">",">",">","from","speechbrain.dataio.dataio","import","read_audio",">",">",">","signal","=","read_audio","(","'tests\/samples\/single-mic\/example1.wav","'",")",">",">",">","perturbator","=","SpeedPerturb","(","orig_freq=16000",",","speeds=","[","90","]",")",">",">",">","clean","=","signal.unsqueeze","(","0",")",">",">",">","perturbed","=","perturbator","(","clean",")",">",">",">","clean.shape","torch.Size","(","[","1",",","52173","]",")",">",">",">","perturbed.shape","torch.Size","(","[","1",",","46956","]",")"]
docstr: Arguments
  ---------
  waveforms : tensor
      Shape should be `[batch, time]` or `[batch, time, channels]`.
  
  Returns
  -------
  Tensor of shape `[batch, time]` or `[batch, time, channels]`.
docstr_tok: ["Arguments","--","--","--","--","-","waveforms",":","tensor","Shape","should","be","`","[","batch",",","time","]","`","or","`","[","batch",",","time",",","channels","]","`",".","Returns","--","--","--","-","Tensor","of","shape","`","[","batch",",","time","]","`","or","`","[","batch",",","time",",","channels","]","`","."]
code: def forward(self, waveform):
      """
      Arguments
      ---------
      waveforms : tensor
          Shape should be `[batch, time]` or `[batch, time, channels]`.
  
      Returns
      -------
      Tensor of shape `[batch, time]` or `[batch, time, channels]`.
      """
  
      # Perform a random perturbation
      self.samp_index = torch.randint(0, len(self.speeds), (1,))
      perturbed_waveform = self.resamplers[self.samp_index](waveform)
      return perturbed_waveform
  
imports: import math
  import random
  import torch
  import torch.nn.functional
  from speechbrain.dataio.legacy import ExtendedCSVDataset
  from speechbrain.dataio.dataloader import make_dataloader
  from speechbrain.processing.signal_processing import compute_amplitude, dB_to_amplitude, convolve1d, notch_filter, reverberate
label_desc: Use image node_id 2 for calling the SpeedPerturb obj's underlying member method code with example usage: obj.forward(waveform) and returns: perturbed_waveform