class_docstr: A wrapper class for performing separation.
class_docstr_tok: ["A","wrapper","class","for","performing","separation","."]
docstr: Performs source separation and export result to file using
  given audio adapter.
  
  Filename format should be a Python formattable string that could
  use following parameters :
  
  - {instrument}
  - {filename}
  - {foldername}
  - {codec}.
  
  Parameters:
      audio_descriptor (AudioDescriptor):
          Describe song to separate, used by audio adapter to
          retrieve and load audio data, in case of file based
          audio adapter, such descriptor would be a file path.
      destination (str):
          Target directory to write output to.
      audio_adapter (AudioAdapter):
          (Optional) Audio adapter to use for I/O.
      offset (int):
          (Optional) Offset of loaded song.
      duration (float):
          (Optional) Duration of loaded song (default: 600s).
      codec (Codec):
          (Optional) Export codec.
      bitrate (str):
          (Optional) Export bitrate.
      filename_format (str):
          (Optional) Filename format.
      synchronous (bool):
          (Optional) True is should by synchronous.
docstr_tok: ["Performs","source","separation","and","export","result","to","file","using","given","audio","adapter",".","Filename","format","should","be","a","Python","formattable","string","that","could","use","following","parameters",":","-","{","instrument","}","-","{","filename","}","-","{","foldername","}","-","{","codec","}",".","Parameters",":","audio_descriptor","(","AudioDescriptor",")",":","Describe","song","to","separate",",","used","by","audio","adapter","to","retrieve","and","load","audio","data",",","in","case","of","file","based","audio","adapter",",","such","descriptor","would","be","a","file","path",".","destination","(","str",")",":","Target","directory","to","write","output","to",".","audio_adapter","(","AudioAdapter",")",":","(","Optional",")","Audio","adapter","to","use","for","I\/O",".","offset","(","int",")",":","(","Optional",")","Offset","of","loaded","song",".","duration","(","float",")",":","(","Optional",")","Duration","of","loaded","song","(","default",":","600s",")",".","codec","(","Codec",")",":","(","Optional",")","Export","codec",".","bitrate","(","str",")",":","(","Optional",")","Export","bitrate",".","filename_format","(","str",")",":","(","Optional",")","Filename","format",".","synchronous","(","bool",")",":","(","Optional",")","True","is","should","by","synchronous","."]
code: def separate_to_file(
      self,
      audio_descriptor: AudioDescriptor,
      destination: str,
      audio_adapter: Optional[AudioAdapter] = None,
      offset: float = 0,
      duration: float = 600.0,
      codec: Codec = Codec.WAV,
      bitrate: str = "128k",
      filename_format: str = "{filename}/{instrument}.{codec}",
      synchronous: bool = True,
  ) -> None:
      """
      Performs source separation and export result to file using
      given audio adapter.
  
      Filename format should be a Python formattable string that could
      use following parameters :
  
      - {instrument}
      - {filename}
      - {foldername}
      - {codec}.
  
      Parameters:
          audio_descriptor (AudioDescriptor):
              Describe song to separate, used by audio adapter to
              retrieve and load audio data, in case of file based
              audio adapter, such descriptor would be a file path.
          destination (str):
              Target directory to write output to.
          audio_adapter (AudioAdapter):
              (Optional) Audio adapter to use for I/O.
          offset (int):
              (Optional) Offset of loaded song.
          duration (float):
              (Optional) Duration of loaded song (default: 600s).
          codec (Codec):
              (Optional) Export codec.
          bitrate (str):
              (Optional) Export bitrate.
          filename_format (str):
              (Optional) Filename format.
          synchronous (bool):
              (Optional) True is should by synchronous.
      """
      if audio_adapter is None:
          audio_adapter = AudioAdapter.default()
      waveform, _ = audio_adapter.load(
          audio_descriptor,
          offset=offset,
          duration=duration,
          sample_rate=self._sample_rate,
      )
      sources = self.separate(waveform, audio_descriptor)
      self.save_to_file(
          sources,
          audio_descriptor,
          destination,
          filename_format,
          codec,
          audio_adapter,
          bitrate,
          synchronous,
      )
  
imports: import atexit
  import os
  from multiprocessing import Pool
  from os.path import basename, dirname, join, splitext
  from typing import Any, Dict, Generator, List, Optional
  import numpy
  import tensorflow
  from .None import SpleeterError
  from .audio import Codec
  from .audio.adapter import AudioAdapter
  from .audio.convertor import to_stereo
  from .model import EstimatorSpecBuilder, InputProviderFactory, model_fn
  from .model.provider import ModelProvider
  from .types import AudioDescriptor
  from .utils.configuration import load_configuration
label_desc: Use image node_id 10 for calling the Separator obj's underlying member method code with example usage: obj.separate_to_file(audio_descriptor, destination, audio_adapter, offset, duration, codec, bitrate, filename_format, synchronous) without return types