code: def load_wave_file(
      filename,
      sample_rate=None,
      num_channels=None,
      channel=None,
      start=None,
      stop=None,
      dtype=None,
  ):
      """
      Load the audio data from the given file and return it as a numpy array.
  
      Only supports wave files, does not support re-sampling or arbitrary
      channel number conversions. Reads the data as a memory-mapped file with
      copy-on-write semantics to defer I/O costs until needed.
  
      Parameters
      ----------
      filename : str
          Name of the file.
      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 whichever 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].
  
  
      Returns
      -------
      signal : numpy array
          Audio signal.
      sample_rate : int
          Sample rate of the signal [Hz].
  
      Notes
      -----
      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.
  
      """
      from scipy.io import wavfile
  
      file_sample_rate, signal = wavfile.read(filename, mmap=True)
      # if the sample rate is not the desired one, raise exception
      if sample_rate is not None and sample_rate != file_sample_rate:
          raise ValueError(
              "Requested sample rate of %f Hz, but got %f Hz and "
              "re-sampling is not implemented."
              % (sample_rate, file_sample_rate)
          )
      # same for the data type
      if dtype is not None and signal.dtype != dtype:
          raise ValueError(
              "Requested dtype %s, but got %s and re-scaling is "
              "not implemented." % (dtype, signal.dtype)
          )
      # only request the desired part of the signal
      if start is not None:
          start = int(start * file_sample_rate)
      if stop is not None:
          stop = min(len(signal), int(stop * file_sample_rate))
      if start is not None or stop is not None:
          signal = signal[start:stop]
      if channel is not None and num_channels is None:
          # It's clear what the caller means here
          num_channels = 1
      if num_channels is not None:
          from ..audio.signal import remix
  
          signal = remix(signal, num_channels, channel)
      # return the signal
      return signal, file_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 9 for calling a global function with example usage: load_wave_file(filename, sample_rate, num_channels, channel, start, stop, dtype) and returns: signal,  file_sample_rate