class_docstr: OneOf randomly picks one of the given transforms when called, and applies that
  transform.
  Usage example:
  ```
  augment = OneOf([
      TimeStretch(min_rate=0.8, max_rate=1.25, p=1.0),
      PitchShift(min_semitones=-4, max_semitones=4, p=1.0),
  ])
  # Generate 2 seconds of dummy audio for the sake of example
  samples = np.random.uniform(low=-0.2, high=0.2, size=(32000,)).astype(np.float32)
  # Augment/transform/perturb the audio data
  augmented_samples = augment(samples=samples, sample_rate=16000)
  # Result: The audio was either time-stretched or pitch-shifted, but not both
  ```
class_docstr_tok: ["OneOf","randomly","picks","one","of","the","given","transforms","when","called",",","and","applies","that","transform",".","Usage","example",":","``","`","augment","=","OneOf","(","[","TimeStretch","(","min_rate=0.8",",","max_rate=1.25",",","p=1.0",")",",","PitchShift","(","min_semitones=-4",",","max_semitones=4",",","p=1.0",")",",","]",")","#","Generate","2","seconds","of","dummy","audio","for","the","sake","of","example","samples","=","np.random.uniform","(","low=-0.2",",","high=0.2",",","size=","(","32000",",",")",")",".astype","(","np.float32",")","#","Augment\/transform\/perturb","the","audio","data","augmented_samples","=","augment","(","samples=samples",",","sample_rate=16000",")","#","Result",":","The","audio","was","either","time-stretched","or","pitch-shifted",",","but","not","both","``","`"]
code: def __init__(self, transforms, p: float = 1.0):
      super().__init__(transforms, p)
      self.transform_index = 0
      self.should_apply = True
  
imports: import random
  import numpy
  from numpy.typing import NDArray
  from audiomentations.core.transforms_interface import BaseSpectrogramTransform
label_desc: Use image node_id 1 to create a new OneOf object from inherited base classes: BaseCompose with example: obj = OneOf(transforms, p)