class_docstr: Class for sound class embedding training" 
class_docstr_tok: ["Class","for","sound","class","embedding","training","''"]
docstr: Inverts STFT spectra given phase.
docstr_tok: ["Inverts","STFT","spectra","given","phase","."]
code: def invert_stft_with_phase(self, X_int, X_stft_phase):
      """Inverts STFT spectra given phase."""
      X_stft_phase_sb = torch.cat(
          (
              torch.cos(X_stft_phase).unsqueeze(-1),
              torch.sin(X_stft_phase).unsqueeze(-1),
          ),
          dim=-1,
      )
  
      X_stft_phase_sb = X_stft_phase_sb[:, : X_int.shape[1], :, :]
      if X_int.ndim == 3:
          X_int = X_int.unsqueeze(-1)
      X_wpsb = X_int * X_stft_phase_sb
      x_int_sb = self.modules.compute_istft(X_wpsb)
  
      return x_int_sb
  
imports: import os
  import sys
  import torch
  import torchaudio
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.distributed import run_on_main
  from esc50_prepare import prepare_esc50
  from speechbrain.utils.metric_stats import MetricStats
  from os import makedirs
  import torch.nn.functional
  from speechbrain.processing.NMF import spectral_phase
  import matplotlib.pyplot
label_desc: Use image node_id 1 for calling the InterpreterESC50Brain obj's underlying member method code with example usage: obj.invert_stft_with_phase(X_int, X_stft_phase) and returns: x_int_sb