code: def process_audio(sampling_rate, waveform):
      # convert from int16 to floating point
      waveform = waveform / 32678.0
  
      # convert to mono if stereo
      if len(waveform.shape) > 1:
          waveform = librosa.to_mono(waveform.T)
  
      # resample to 16 kHz if necessary
      if sampling_rate != 16000:
          waveform = librosa.resample(
              waveform, orig_sr=sampling_rate, target_sr=16000
          )
  
      # limit to 30 seconds
      waveform = waveform[: 16000 * 30]
  
      # make PyTorch tensor
      waveform = torch.tensor(waveform)
      return waveform
  
imports: from __future__ import annotations
  import base64
  import io
  import time
  from io import BytesIO
  import numpy
  import scipy
  import wavio
  import soundfile
  import torch
  import librosa
  from src.tts_sentence_parsing import init_sentence_state, get_sentence
  from src.tts_utils import prepare_speech, get_no_audio, chunk_speed_change
label_desc: Use image node_id 6 for calling a global function with example usage: process_audio(sampling_rate, waveform) and returns: waveform