code: def preprocess_wav(self, fpath_or_wav, source_sr=None):
      # Load the wav from disk if needed
      if isinstance(fpath_or_wav, (str, Path)):
          wav, source_sr = librosa.load(str(fpath_or_wav), sr=None)
      else:
          wav = fpath_or_wav
  
      # Resample if numpy.array is passed and sr does not match
      if source_sr is not None and source_sr != self.sampling_rate:
          wav = librosa.resample(wav, source_sr, self.sampling_rate)
  
      # loudness normalization
      wav = normalize_volume(
          wav, self.audio_norm_target_dBFS, increase_only=True
      )
  
      # trim long silence
      if webrtcvad:
          wav = trim_long_silences(
              wav,
              self.vad_window_length,
              self.vad_moving_average_width,
              self.vad_max_silence_length,
              self.sampling_rate,
          )
      return wav
  
file_path: PaddleHub/modules/audio/voice_cloning/lstm_tacotron2/audio_processor.py
imports: from pathlib import Path
  from warnings import warn
  import struct
  from scipy.ndimage.morphology import binary_dilation
  import numpy
  import librosa
label_desc: Use image node_id 2 for calling the SpeakerVerificationPreprocessor obj's underlying member method code with example usage: obj.preprocess_wav(fpath_or_wav, source_sr) and returns: wav