original_docstring: Prepare the openrir dataset for adding reverb and noises.
  
      Arguments
      ---------
      folder : str
          The location of the folder containing the dataset.
      reverb_csv : str
          Filename for storing the prepared reverb csv.
      noise_csv : str
          Filename for storing the prepared noise csv.
      max_noise_len : float
          The maximum noise length in seconds. Noises longer
          than this will be cut into pieces.
      
docstring: Prepare the openrir dataset for adding reverb and noises.
  Arguments
  
  folder : str
  The location of the folder containing the dataset.
  reverb_csv : str
  Filename for storing the prepared reverb csv.
  noise_csv : str
  Filename for storing the prepared noise csv.
  max_noise_len : float
  The maximum noise length in seconds. Noises longer
  than this will be cut into pieces.
docstring_tokens: Prepare the openrir dataset for adding reverb and noises . Arguments folder : str The location of the folder containing the dataset . reverb_csv : str Filename for storing the prepared reverb csv . noise_csv : str Filename for storing the prepared noise csv . max_noise_len : float The maximum noise length in seconds . Noises longer than this will be cut into pieces .
code: def _prepare_openrir(folder, reverb_csv, noise_csv, max_noise_len):
      """Prepare the openrir dataset for adding reverb and noises.
  
      Arguments
      ---------
      folder : str
          The location of the folder containing the dataset.
      reverb_csv : str
          Filename for storing the prepared reverb csv.
      noise_csv : str
          Filename for storing the prepared noise csv.
      max_noise_len : float
          The maximum noise length in seconds. Noises longer
          than this will be cut into pieces.
      """
  
      # Download and unpack if necessary
      filepath = os.path.join(folder, "rirs_noises.zip")
  
      if os.path.isdir(os.path.join(folder, "RIRS_NOISES")):
          logger.info("Skipping OPENRIR download and extract, path found")
          # download_file(OPENRIR_URL, filepath)
      else:
          download_file(OPENRIR_URL, filepath, unpack=True)
  
      # Prepare reverb csv if necessary
      if not os.path.isfile(reverb_csv):
          rir_filelist = os.path.join(
              folder, "RIRS_NOISES", "real_rirs_isotropic_noises", "rir_list"
          )
          _prepare_csv(folder, rir_filelist, reverb_csv)
  
      # Prepare noise csv if necessary
      if not os.path.isfile(noise_csv):
          noise_filelist = os.path.join(
              folder, "RIRS_NOISES", "pointsource_noises", "noise_list"
          )
          _prepare_csv(folder, noise_filelist, noise_csv, max_noise_len)
code_tokens: def _prepare_openrir ( folder , reverb_csv , noise_csv , max_noise_len ) : filepath = os . path . join ( folder , "rirs_noises.zip" ) if os . path . isdir ( os . path . join ( folder , "RIRS_NOISES" ) ) : logger . info ( "Skipping OPENRIR download and extract, path found" ) else : download_file ( OPENRIR_URL , filepath , unpack = True ) if not os . path . isfile ( reverb_csv ) : rir_filelist = os . path . join ( folder , "RIRS_NOISES" , "real_rirs_isotropic_noises" , "rir_list" ) _prepare_csv ( folder , rir_filelist , reverb_csv ) if not os . path . isfile ( noise_csv ) : noise_filelist = os . path . join ( folder , "RIRS_NOISES" , "pointsource_noises" , "noise_list" ) _prepare_csv ( folder , noise_filelist , noise_csv , max_noise_len )
short_docstring: Prepare the openrir dataset for adding reverb and noises.
short_docstring_tokens: Prepare the openrir dataset for adding reverb and noises .
comment: """Prepare the openrir dataset for adding reverb and noises.
  
      Arguments
      ---------
      folder : str
          The location of the folder containing the dataset.
      reverb_csv : str
          Filename for storing the prepared reverb csv.
      noise_csv : str
          Filename for storing the prepared noise csv.
      max_noise_len : float
          The maximum noise length in seconds. Noises longer
          than this will be cut into pieces.
      """$SEP$# Download and unpack if necessary$SEP$# download_file(OPENRIR_URL, filepath)$SEP$# Prepare reverb csv if necessary$SEP$# Prepare noise csv if necessary