docstr: Default constructor.
docstr_tok: ["Default","constructor","."]
code: def __init__(
      self,
      audio_params: Dict,
      audio_adapter: AudioAdapter,
      audio_path: str,
      random_seed: int = 0,
      chunk_duration: float = 20.0,
  ) -> None:
      """
      Default constructor.
      """
      # Length of segment in frames (if fs=22050 and
      # frame_step=512, then T=512 corresponds to 11.89s)
      self._T = audio_params["T"]
      # Number of frequency bins to be used (should
      # be less than frame_length/2 + 1)
      self._F = audio_params["F"]
      self._sample_rate = audio_params["sample_rate"]
      self._frame_length = audio_params["frame_length"]
      self._frame_step = audio_params["frame_step"]
      self._mix_name = audio_params["mix_name"]
      self._n_channels = audio_params["n_channels"]
      self._instruments = [self._mix_name] + audio_params[
          "instrument_list"
      ]
      self._instrument_builders: Optional[List] = None
      self._chunk_duration = chunk_duration
      self._audio_adapter = audio_adapter
      self._audio_params = audio_params
      self._audio_path = audio_path
      self._random_seed = random_seed
  
      self.check_parameters_compatibility()
  
imports: import os
  import time
  from os.path import exists
  from os.path import sep
  from typing import Any, Dict, List, Optional, Tuple
  import tensorflow
  from .audio.adapter import AudioAdapter
  from .audio.convertor import db_uint_spectrogram_to_gain, spectrogram_to_db_uint
  from .audio.spectrogram import compute_spectrogram_tf, random_pitch_shift, random_time_stretch
  from .utils.logging import logger
  from .utils.tensor import check_tensor_shape, dataset_from_csv, set_tensor_shape, sync_apply
label_desc: Use image node_id 1 to create a new DatasetBuilder object from inherited base classes: object with example: obj = DatasetBuilder(audio_params, audio_adapter, audio_path, random_seed, chunk_duration)