code: def load_wav(
      *,
      filename: str,
      sample_rate: int = None,
      resample: bool = False,
      **kwargs,
  ) -> np.ndarray:
      """Read a wav file using Librosa and optionally resample, silence trim, volume normalize.
  
      Resampling slows down loading the file significantly. Therefore it is recommended to resample the file before.
  
      Args:
          filename (str): Path to the wav file.
          sr (int, optional): Sampling rate for resampling. Defaults to None.
          resample (bool, optional): Resample the audio file when loading. Slows down the I/O time. Defaults to False.
  
      Returns:
          np.ndarray: Loaded waveform.
      """
      if resample:
          # loading with resampling. It is significantly slower.
          x, _ = librosa.load(filename, sr=sample_rate)
      else:
          # SF is faster than librosa for loading files
          x, _ = sf.read(filename)
      return x
  
imports: from io import BytesIO
  from typing import Tuple
  import librosa
  import numpy
  import scipy
  import soundfile
  from librosa import magphase, pyin
label_desc: Use image node_id 26 for calling a global function with example usage: load_wav() and returns: x