code: def interpolate_vocoder_input(scale_factor, spec):
      """Interpolate spectrogram by the scale factor.
      It is mainly used to match the sampling rates of
      the tts and vocoder models.
  
      Args:
          scale_factor (float): scale factor to interpolate the spectrogram
          spec (np.array): spectrogram to be interpolated
  
      Returns:
          torch.tensor: interpolated spectrogram.
      """
      print(" > before interpolation :", spec.shape)
      spec = (
          torch.tensor(spec).unsqueeze(0).unsqueeze(0)
      )  # pylint: disable=not-callable
      spec = torch.nn.functional.interpolate(
          spec,
          scale_factor=scale_factor,
          recompute_scale_factor=True,
          mode="bilinear",
          align_corners=False,
      ).squeeze(0)
      print(" > after interpolation :", spec.shape)
      return spec
  
file_path: TTS/TTS/vocoder/utils/generic_utils.py
imports: import re
  import torch
  import importlib
  import numpy
  from matplotlib import pyplot
  from TTS.tts.utils.visual import plot_spectrogram
label_desc: Use image node_id 1 for calling a global function with example usage: interpolate_vocoder_input(scale_factor, spec) and returns: spec