exists()

audb.exists(name, *, version=None, bit_depth=None, channels=None, format=None, mixdown=False, sampling_rate=None, cache_root=None)[source]

Check if specified database flavor exists in local cache folder.

Does not check for any flavor of the requested database in the cache, but only for a particular flavor. Note, that using only the name, e.g. audb.exists('emodb') is also a single flavor.

To list all available flavors of a particular database, use:

audb.cached(name='emodb')
Parameters:
  • name (str) – name of database

  • version (str) – version string, latest if None

  • bit_depth (int) – bit depth, one of 16, 24, 32

  • channels (int | Sequence[int]) – channel selection, see audresample.remix()

  • format (str) – file format, one of 'flac', 'wav'

  • mixdown (bool) – apply mono mix-down

  • sampling_rate (int) – sampling rate in Hz, one of 8000, 16000, 22050, 24000, 44100, 48000

  • cache_root (str) – cache folder where databases are stored. If not set audb.default_cache_root() is used

Return type:

bool

Returns:

True if database flavor exists

Examples

>>> db = audb.load(
...     "emodb",
...     version="1.4.1",
...     only_metadata=True,
...     verbose=False,
... )
>>> audb.exists("emodb", version="1.4.1")
True
>>> audb.exists("emodb", version="1.4.1", format="wav")
False