code: def load_audio_file(
      filename,
      sample_rate=None,
      num_channels=None,
      channel=None,
      start=None,
      stop=None,
      dtype=None,
      replaygain_mode=None,
      replaygain_preamp=0.0,
  ):
      """
      Load the audio data from the given file and return it as a numpy array.
      This tries load_wave_file() load_ffmpeg_file() (for ffmpeg and avconv).
  
      Parameters
      ----------
      filename : str or file handle
          Name of the file or file handle.
      sample_rate : int, optional
          Desired sample rate of the signal [Hz], or 'None' to return the
          signal in its original rate.
      num_channels : int, optional
          Reduce or expand the signal to `num_channels` channels.
          If 'None', return the signal with its original channels,
          or whatever is selected by `channel`.
      channel : int, optional
          When reducing a signal to `num_channels` of 1, use this channel,
          or 'None' to return the average across all channels.
      start : float, optional
          Start position [seconds].
      stop : float, optional
          Stop position [seconds].
      dtype : numpy data type, optional
          The data is returned with the given dtype. If 'None', it is returned
          with its original dtype, otherwise the signal gets rescaled. Integer
          dtypes use the complete value range, float dtypes the range [-1, +1].
      replaygain_mode : {None, 'track','album'}, optional
          Specify the ReplayGain volume-levelling mode (None to disable).
      replaygain_preamp : float, optional
          ReplayGain preamp volume change level (in dB).
  
      Returns
      -------
      signal : numpy array
          Audio signal.
      sample_rate : int
          Sample rate of the signal [Hz].
  
      Notes
      -----
      For wave files, the `start` and `stop` positions are rounded to the closest
      sample; the sample corresponding to the `stop` value is not returned, thus
      consecutive segment starting with the previous `stop` can be concatenated
      to obtain the original signal without gaps or overlaps.
      For all other audio files, this can not be guaranteed.
  
      """
      # try reading as a wave file
      error = "All attempts to load audio file %r failed." % filename
      try:
          return load_wave_file(
              filename,
              sample_rate=sample_rate,
              num_channels=num_channels,
              channel=channel,
              start=start,
              stop=stop,
              dtype=dtype,
          )
      except ValueError:
          pass
      # not a wave file (or other sample rate requested), try ffmpeg
      try:
          return load_ffmpeg_file(
              filename,
              sample_rate=sample_rate,
              num_channels=num_channels,
              channel=channel,
              start=start,
              stop=stop,
              dtype=dtype,
              replaygain_mode=replaygain_mode,
              replaygain_preamp=replaygain_preamp,
          )
      except OSError as e:
          # if it's not a file not found error, raise it!
          if e.errno != errno.ENOENT:
              raise
  
          # ffmpeg is not present, try avconv
          try:
              return load_ffmpeg_file(
                  filename,
                  sample_rate=sample_rate,
                  num_channels=num_channels,
                  channel=channel,
                  start=start,
                  stop=stop,
                  dtype=dtype,
                  cmd_decode="avconv",
                  cmd_probe="avprobe",
                  replaygain_mode=replaygain_mode,
                  replaygain_preamp=replaygain_preamp,
              )
          except OSError as e:
              if e.errno == errno.ENOENT:
                  error += " Try installing ffmpeg (or avconv on Ubuntu Linux)."
              else:
                  raise
          except subprocess.CalledProcessError:
              pass
      except subprocess.CalledProcessError:
          pass
      raise LoadAudioFileError(error)
  
imports: from __future__ import absolute_import, division, print_function
  import errno
  import os
  import subprocess
  import sys
  import tempfile
  import numpy
  from ..audio.signal import Signal
  from ..utils import string_types, file_types
label_desc: Use image node_id 11 for calling a global function with example usage: load_audio_file(filename, sample_rate, num_channels, channel, start, stop, dtype, replaygain_mode, replaygain_preamp) and returns: load_wave_file, load_ffmpeg_file, load_ffmpeg_file