code: def convert_samplerate(audio_path, desired_sample_rate):
      sox_cmd = "sox {} --type raw --bits 16 --channels 1 --rate {} --encoding signed-integer --endian little --compression 0.0 --no-dither - ".format(
          quote(audio_path), desired_sample_rate
      )
      try:
          output = subprocess.check_output(
              shlex.split(sox_cmd), stderr=subprocess.PIPE
          )
      except subprocess.CalledProcessError as e:
          raise RuntimeError(
              "SoX returned non-zero status: {}".format(e.stderr)
          )
      except OSError as e:
          raise OSError(
              e.errno,
              "SoX not found, use {}hz files or install it: {}".format(
                  desired_sample_rate, e.strerror
              ),
          )
  
      return desired_sample_rate, np.frombuffer(output, np.int16)
  
file_path: DeepSpeech/native_client/python/client.py
imports: from __future__ import absolute_import, division, print_function
  import argparse
  import numpy
  import shlex
  import subprocess
  import sys
  import wave
  import json
  from deepspeech import Model, version
  from timeit import default_timer
label_desc: Use image node_id 1 for calling a global function with example usage: convert_samplerate(audio_path, desired_sample_rate) and returns: desired_sample_rate,  np