class_docstr: This class implements the imperceptible, robust, and targeted attack to generate adversarial examples for automatic
  speech recognition models. This attack will be implemented specifically for DeepSpeech model and is framework
  dependent, specifically for PyTorch.
  
  | Paper link: https://arxiv.org/abs/1903.10346
docstr: Compute the psd matrix of the perturbation.
  
  :param delta: The perturbation.
  :param original_max_psd: The maximum psd of the original audio.
  :return: The psd matrix.
docstr_tok: ["Compute","the","psd","matrix","of","the","perturbation",".",":","param","delta",":","The","perturbation",".",":","param","original_max_psd",":","The","maximum","psd","of","the","original","audio",".",":","return",":","The","psd","matrix","."]
code: def _psd_transform(
      self, delta: "torch.Tensor", original_max_psd: np.ndarray
  ) -> "torch.Tensor":
      """
      Compute the psd matrix of the perturbation.
  
      :param delta: The perturbation.
      :param original_max_psd: The maximum psd of the original audio.
      :return: The psd matrix.
      """
      import torch
  
      # Get window for the transformation
      window_fn = torch.hann_window  # type: ignore
  
      # Return STFT of delta
      delta_stft = torch.view_as_real(
          torch.stft(
              delta,
              n_fft=self.n_fft,
              hop_length=self.hop_length,
              win_length=self.win_length,
              center=False,
              window=window_fn(self.win_length).to(
                  self.estimator.device
              ),
              return_complex=True,
          ).to(self.estimator.device)
      )
  
      # Take abs of complex STFT results
      transformed_delta = torch.sqrt(
          torch.sum(torch.square(delta_stft), -1)
      )
  
      # Compute the psd matrix
      psd = (8.0 / 3.0) * transformed_delta / self.win_length
      psd = psd**2
      psd = (
          torch.pow(
              torch.tensor(10.0).type(torch.float64),
              torch.tensor(9.6).type(torch.float64),
          ).to(self.estimator.device)
          / torch.reshape(
              torch.tensor(original_max_psd).to(self.estimator.device),
              [-1, 1, 1],
          )
          * psd.type(torch.float64)
      )
  
      return psd
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import TYPE_CHECKING, Optional, Tuple, List
  import numpy
  import scipy
  from art.attacks.attack import EvasionAttack
  from art.estimators.pytorch import PyTorchEstimator
  from art.estimators.speech_recognition.pytorch_deep_speech import PyTorchDeepSpeech
  from art.estimators.speech_recognition.speech_recognizer import SpeechRecognizerMixin
  from art.estimators.speech_recognition.speech_recognizer import PytorchSpeechRecognizerMixin
label_desc: Use image node_id 9 for calling the ImperceptibleASRPyTorch obj's underlying member method code with example usage: obj._psd_transform(delta, original_max_psd) and returns: psd