code: def compute_spectrogram_tf(
      waveform: tf.Tensor,
      frame_length: int = 2048,
      frame_step: int = 512,
      spec_exponent: float = 1.0,
      window_exponent: float = 1.0,
  ) -> tf.Tensor:
      """
      Compute magnitude / power spectrogram from waveform as a
      `n_samples x n_channels` tensor.
  
      Parameters:
          waveform (tf.Tensor):
              Input waveform as `(times x number of channels)` tensor.
          frame_length (int):
              (Optional) Length of a STFT frame to use.
          frame_step (int):
              (Optional) HOP between successive frames.
          spec_exponent (float):
              (Optional) Exponent of the spectrogram (usually 1 for
              magnitude spectrogram, or 2 for power spectrogram).
          window_exponent (float):
              (Optional) Exponent applied to the Hann windowing function
              (may be useful for making perfect STFT/iSTFT reconstruction).
  
      Returns:
          tf.Tensor:
              Computed magnitude / power spectrogram as a
              `(T x F x n_channels)` tensor.
      """
      stft_tensor: tf.Tensor = tf.transpose(
          stft(
              tf.transpose(waveform),
              frame_length,
              frame_step,
              window_fn=lambda f, dtype: hann_window(
                  f, periodic=True, dtype=waveform.dtype
              )
              ** window_exponent,
          ),
          perm=[1, 2, 0],
      )
      return tf.abs(stft_tensor) ** spec_exponent
  
imports: import tensorflow
  from tensorflow.signal import hann_window, stft
label_desc: Use image node_id 1 for calling a global function with example usage: compute_spectrogram_tf(waveform, frame_length, frame_step, spec_exponent, window_exponent) and returns: unknown