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 databasechannels (
Union
[int
,Sequence
[int
],None
]) – channel selection, seeaudresample.remix()
mixdown (
bool
) – apply mono mix-downsampling_rate (
Optional
[int
]) – sampling rate in Hz, one of8000
,16000
,22500
,44100
,48000
cache_root (
Optional
[str
]) – cache folder where databases are stored. If not setaudb.default_cache_root()
is used
- Return type
- 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