class_docstr: Implementation of the imperceptible attack against a speech recognition model.
  
  | Paper link: http://proceedings.mlr.press/v97/qin19a.html
docstr: Generate imperceptible, adversarial examples.
  
  :param x: An array with the original inputs to be attacked.
  :param y: Target values of shape (batch_size,). Each sample in `y` is a string and it may possess different
      lengths. A possible example of `y` could be: `y = np.array(['SIXTY ONE', 'HELLO'])`.
  :return: An array holding the adversarial examples.
code: def generate(
      self, x: np.ndarray, y: Optional[np.ndarray] = None, **kwargs
  ) -> np.ndarray:
      """
      Generate imperceptible, adversarial examples.
  
      :param x: An array with the original inputs to be attacked.
      :param y: Target values of shape (batch_size,). Each sample in `y` is a string and it may possess different
          lengths. A possible example of `y` could be: `y = np.array(['SIXTY ONE', 'HELLO'])`.
      :return: An array holding the adversarial examples.
      """
      if y is None:
          raise ValueError(
              "The target values `y` cannot be None. Please provide a `np.ndarray` of target labels."
          )
  
      nb_samples = x.shape[0]
  
      x_imperceptible = [None] * nb_samples
  
      nb_batches = int(np.ceil(nb_samples / float(self.batch_size)))
      for m in range(nb_batches):
          # batch indices
          begin, end = m * self.batch_size, min(
              (m + 1) * self.batch_size, nb_samples
          )
  
          # create batch of adversarial examples
          x_imperceptible[begin:end] = self._generate_batch(
              x[begin:end], y[begin:end]
          )
  
      # for ragged input, use object dtype
      dtype = np.float32 if x.ndim != 1 else object
      return np.array(x_imperceptible, dtype=dtype)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import TYPE_CHECKING, Optional, Tuple, Union
  import numpy
  import scipy.signal
  from art.attacks.attack import EvasionAttack
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin, NeuralNetworkMixin
  from art.estimators.pytorch import PyTorchEstimator
  from art.estimators.speech_recognition.speech_recognizer import SpeechRecognizerMixin
  from art.estimators.tensorflow import TensorFlowV2Estimator
  from art.utils import pad_sequence_input
label_desc: Use image node_id 2 for calling the ImperceptibleASR obj's underlying member method code with example usage: obj.generate(x, y) and returns: np