code: def load_ffmpeg_file(
      filename,
      sample_rate=None,
      num_channels=None,
      channel=None,
      start=None,
      stop=None,
      dtype=None,
      cmd_decode="ffmpeg",
      cmd_probe="ffprobe",
      replaygain_mode=None,
      replaygain_preamp=0.0,
  ):
      """
      Load the audio data from the given file and return it as a numpy array.
  
      This uses ffmpeg (or avconv) and thus supports a lot of different file
      formats, resampling and channel conversions. The file will be fully decoded
      into memory if no start and stop positions are given.
  
      Parameters
      ----------
      filename : str
          Name of the audio sound file to load.
      sample_rate : int, optional
          Sample rate to re-sample the signal to [Hz]; 'None' returns 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 dtype, optional
          Numpy dtype to return the signal in (supports signed and unsigned
          8/16/32-bit integers, and single and double precision floats,
          each in little or big endian). If 'None', np.int16 is used.
      cmd_decode : {'ffmpeg', 'avconv'}, optional
          Decoding command (defaults to ffmpeg, alternatively supports avconv).
      cmd_probe : {'ffprobe', 'avprobe'}, optional
          Probing command (defaults to ffprobe, alternatively supports avprobe).
      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 samples.
      sample_rate : int
          Sample rate of the audio samples.
  
      """
      # set default dtype
      if dtype is None:
          dtype = np.int16
      # ffmpeg output format
      fmt = _ffmpeg_fmt(dtype)
      # start and stop position
      if start is None:
          start = 0
      max_len = None
      if stop is not None:
          max_len = stop - start
      # convert the audio signal using ffmpeg
      signal = np.frombuffer(
          decode_to_memory(
              filename,
              fmt=fmt,
              sample_rate=sample_rate,
              num_channels=num_channels,
              channel=channel,
              skip=start,
              max_len=max_len,
              cmd_decode=cmd_decode,
              cmd_probe=cmd_probe,
              replaygain_mode=replaygain_mode,
              replaygain_preamp=replaygain_preamp,
          ),
          dtype=dtype,
      )
      # get the needed information from the file
      if sample_rate is None or num_channels is None:
          info = get_file_info(filename, cmd=cmd_probe)
          if sample_rate is None:
              sample_rate = info["sample_rate"]
          if num_channels is None:
              num_channels = info["num_channels"]
      # reshape the audio signal
      if num_channels > 1:
          signal = signal.reshape((-1, num_channels))
      return signal, sample_rate
  
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 8 for calling a global function with example usage: load_ffmpeg_file(filename, sample_rate, num_channels, channel, start, stop, dtype, cmd_decode, cmd_probe, replaygain_mode, replaygain_preamp) and returns: signal,  sample_rate