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
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