code: def decode_to_disk(
      infile,
      fmt="f32le",
      sample_rate=None,
      num_channels=1,
      channel=None,
      skip=None,
      max_len=None,
      outfile=None,
      tmp_dir=None,
      tmp_suffix=None,
      cmd="ffmpeg",
      replaygain_mode=None,
      replaygain_preamp=0.0,
  ):
      """
      Decode the given audio file to another file.
  
      Parameters
      ----------
      infile : str
          Name of the audio sound file to decode.
      fmt : {'f32le', 's16le'}, optional
          Format of the samples:
          - 'f32le' for float32, little-endian,
          - 's16le' for signed 16-bit int, little-endian.
      sample_rate : int, optional
          Sample rate to re-sample the signal to (if set) [Hz].
      num_channels : int, optional
          Number of channels to reduce the signal to.
          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.
      skip : float, optional
          Number of seconds to skip at beginning of file.
      max_len : float, optional
          Maximum length in seconds to decode.
      outfile : str, optional
          The file to decode the sound file to; if not given, a temporary file
          will be created.
      tmp_dir : str, optional
          The directory to create the temporary file in (if no `outfile` is
          given).
      tmp_suffix : str, optional
          The file suffix for the temporary file if no `outfile` is given; e.g.
          ".pcm" (including the dot).
      cmd : {'ffmpeg', 'avconv'}, optional
          Decoding command (defaults to ffmpeg, alternatively supports avconv).
      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
      -------
      outfile : str
          The output file name.
  
      """
      # check input file type
      if not isinstance(infile, string_types):
          raise ValueError(
              "only file names are supported as `infile`, not %s."
              % infile
          )
      # create temp file if no outfile is given
      if outfile is None:
          # looks stupid, but is recommended over tempfile.mktemp()
          f = tempfile.NamedTemporaryFile(
              delete=False, dir=tmp_dir, suffix=tmp_suffix
          )
          f.close()
          outfile = f.name
          delete_on_fail = True
      else:
          delete_on_fail = False
      # check output file type
      if not isinstance(outfile, string_types):
          raise ValueError(
              "only file names are supported as `outfile`, not %s."
              % outfile
          )
      # call ffmpeg (throws exception on error)
      try:
          call = _ffmpeg_call(
              infile,
              outfile,
              fmt,
              sample_rate,
              num_channels,
              channel,
              skip,
              max_len,
              cmd,
              replaygain_mode=replaygain_mode,
              replaygain_preamp=replaygain_preamp,
          )
          subprocess.check_call(call)
      except Exception:
          if delete_on_fail:
              os.unlink(outfile)
          raise
      return outfile
  
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 3 for calling a global function with example usage: decode_to_disk(infile, fmt, sample_rate, num_channels, channel, skip, max_len, outfile, tmp_dir, tmp_suffix, cmd, replaygain_mode, replaygain_preamp) and returns: outfile