Dataset Utilities¶
- class pyroomacoustics.datasets.utils.AttrDict(dictionary)¶
Bases:
objectConvert a dictionary into an object
- pyroomacoustics.datasets.utils.download_multiple(files_dict, overwrite=False, verbose=False, no_fail=False, backoff_time=None)¶
A utility to download multiple files
- Parameters:
files_dict (dict) – A dictionary of files to download with key=local_path and value=url
overwrite (bool) – If True if the local file exists, it will be overwritten. If False (default), existing files are skipped.
verbose (bool) – If True writes to stdout the result of the operation.
no_fail (bool) – If True, silently skip the file if the download fails.
backoff_time (None or float) – The time to wait between downloading two files. If None, the time is zero.
- pyroomacoustics.datasets.utils.download_uncompress(url, path='.', compression=None, context=None)¶
This functions download and uncompress on the fly a file of type tar, tar.gz, tar.bz2.
- Parameters:
url (str) – The URL of the file
path (str, optional) – The path where to uncompress the file
compression (str, optional) – The compression type (one of ‘bz2’, ‘gz’, ‘tar’), infered from url if not provided
context (SSL certification, optional) – Default is to use none.