class_docstr: SpeedPerturbation
  
  The speed perturbation in kaldi uses sox-speed instead of sox-tempo,
  and sox-speed just to resample the input,
  i.e pitch and tempo are changed both.
  
  "Why use speed option instead of tempo -s in SoX for speed perturbation"
  https://groups.google.com/forum/#!topic/kaldi-help/8OOG7eE4sZ8
  
  Warning:
      This function is very slow because of resampling.
      I recommmend to apply speed-perturb outside the training using sox.
class_docstr_tok: ["SpeedPerturbation","The","speed","perturbation","in","kaldi","uses","sox-speed","instead","of","sox-tempo",",","and","sox-speed","just","to","resample","the","input",",","i.e","pitch","and","tempo","are","changed","both",".","``","Why","use","speed","option","instead","of","tempo","-s","in","SoX","for","speed","perturbation","''","https",":","\/\/groups.google.com\/forum\/","#","!","topic\/kaldi-help\/8OOG7eE4sZ8","Warning",":","This","function","is","very","slow","because","of","resampling",".","I","recommmend","to","apply","speed-perturb","outside","the","training","using","sox","."]
code: def __repr__(self):
      if self.utt2ratio is None:
          return (
              "{}(lower={}, upper={}, "
              "keep_length={}, res_type={})".format(
                  self.__class__.__name__,
                  self.lower,
                  self.upper,
                  self.keep_length,
                  self.res_type,
              )
          )
      else:
          return "{}({}, res_type={})".format(
              self.__class__.__name__,
              self.utt2ratio_file,
              self.res_type,
          )
  
imports: import librosa
  import numpy
  import scipy
  import soundfile
  from espnet.utils.io_utils import SoundHDF5File
label_desc: Use image node_id 2 for calling the SpeedPerturbation obj's underlying member method code with example usage: obj.__repr__() and returns: str, str