code: def _resample_samplerate(samples, sr, newsr):
      # type: (np.ndarray, int, int, str) -> np.ndarray
      
      try:
          from samplerate import resample
      except ImportError:
          return None
  
      ratio = newsr/sr
      return _applyMultichan(samples,
                             lambda S: resample(S, ratio, 'sinc_best'))
docs: Uses https://github.com/tuxu/python-samplerate