class_docstr: An AudioAdapter implementation that use FFMPEG binary through
  subprocess in order to perform I/O operation for audio processing.
  
  When created, FFMPEG binary path will be checked and expended,
  raising exception if not found. Such path could be infered using
  `FFMPEG_PATH` environment variable.
class_docstr_tok: ["An","AudioAdapter","implementation","that","use","FFMPEG","binary","through","subprocess","in","order","to","perform","I\/O","operation","for","audio","processing",".","When","created",",","FFMPEG","binary","path","will","be","checked","and","expended",",","raising","exception","if","not","found",".","Such","path","could","be","infered","using","`","FFMPEG_PATH","`","environment","variable","."]
docstr: Write waveform data to the file denoted by the given path using
  FFMPEG process.
  
  Parameters:
      path (Union[Path, str]):
          Path like of the audio file to save data in.
      data (np.ndarray):
          Waveform data to write.
      sample_rate (float):
          Sample rate to write file in.
      codec (Codec):
          (Optional) Writing codec to use, default to `None`.
      bitrate (str):
          (Optional) Bitrate of the written audio file, default to
          `None`.
  
  Raises:
      IOError:
          If any error occurs while using FFMPEG to write data.
docstr_tok: ["Write","waveform","data","to","the","file","denoted","by","the","given","path","using","FFMPEG","process",".","Parameters",":","path","(","Union","[","Path",",","str","]",")",":","Path","like","of","the","audio","file","to","save","data","in",".","data","(","np.ndarray",")",":","Waveform","data","to","write",".","sample_rate","(","float",")",":","Sample","rate","to","write","file","in",".","codec","(","Codec",")",":","(","Optional",")","Writing","codec","to","use",",","default","to","`","None","`",".","bitrate","(","str",")",":","(","Optional",")","Bitrate","of","the","written","audio","file",",","default","to","`","None","`",".","Raises",":","IOError",":","If","any","error","occurs","while","using","FFMPEG","to","write","data","."]
code: def save(
      self,
      path: Union[Path, str],
      data: np.ndarray,
      sample_rate: float,
      codec: Codec = None,
      bitrate: str = None,
  ) -> None:
      """
      Write waveform data to the file denoted by the given path using
      FFMPEG process.
  
      Parameters:
          path (Union[Path, str]):
              Path like of the audio file to save data in.
          data (np.ndarray):
              Waveform data to write.
          sample_rate (float):
              Sample rate to write file in.
          codec (Codec):
              (Optional) Writing codec to use, default to `None`.
          bitrate (str):
              (Optional) Bitrate of the written audio file, default to
              `None`.
  
      Raises:
          IOError:
              If any error occurs while using FFMPEG to write data.
      """
      if isinstance(path, Path):
          path = str(path)
      directory = os.path.dirname(path)
      if not os.path.exists(directory):
          raise SpleeterError(
              f"output directory does not exists: {directory}"
          )
      logger.debug(f"Writing file {path}")
      input_kwargs = {"ar": sample_rate, "ac": data.shape[1]}
      output_kwargs = {"ar": sample_rate, "strict": "-2"}
      if bitrate:
          output_kwargs["audio_bitrate"] = bitrate
      if codec is not None and codec != "wav":
          output_kwargs["codec"] = self.SUPPORTED_CODECS.get(
              codec, codec
          )
      process = (
          ffmpeg.input("pipe:", format="f32le", **input_kwargs)
          .output(path, **output_kwargs)
          .overwrite_output()
          .run_async(pipe_stdin=True, pipe_stderr=True, quiet=True)
      )
      try:
          process.stdin.write(data.astype("<f4").tobytes())
          process.stdin.close()
          process.wait()
      except IOError:
          raise SpleeterError(f"FFMPEG error: {process.stderr.read()}")
      logger.info(f"File {path} written succesfully")
  
file_path: spleeter/spleeter/audio/ffmpeg.py
imports: import datetime
  import os
  import shutil
  from pathlib import Path
  from typing import Dict, Optional, Union
  import ffmpeg
  import numpy
  from ..None import SpleeterError
  from ..types import Signal
  from ..utils.logging import logger
  from .None import Codec
  from .adapter import AudioAdapter
label_desc: Use image node_id 3 for calling the FFMPEGProcessAudioAdapter obj's underlying member method code with example usage: obj.save(path, data, sample_rate, codec, bitrate) without return types