class_docstr: Adds a tone backdoor trigger to a set of audio examples. Works for a single example or a batch of examples.
docstr: Initialize a CacheToneTrigger instance.
  
  :param sampling_rate: Positive integer denoting the sampling rate for x.
  :param frequency: Frequency of the tone to be added.
  :param duration: Duration of the tone to be added.
code: def __init__(
      self,
      sampling_rate: int = 16000,
      frequency: int = 440,
      duration: float = 0.1,
      **kwargs,
  ):
      """
      Initialize a CacheToneTrigger instance.
  
      :param sampling_rate: Positive integer denoting the sampling rate for x.
      :param frequency: Frequency of the tone to be added.
      :param duration: Duration of the tone to be added.
      """
      trigger = librosa.tone(
          frequency, sr=sampling_rate, duration=duration
      )
      super().__init__(trigger, **kwargs)
  
file_path: adversarial-robustness-toolbox/art/attacks/poisoning/perturbations/audio_perturbations.py
imports: from typing import Optional
  import librosa
  import numpy
label_desc: Use image node_id 1 to create a new CacheToneTrigger object from inherited base classes: CacheTrigger with example: obj = CacheToneTrigger(sampling_rate, frequency, duration)