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 databaseversion (
str) – version string, latest ifNonebit_depth (
int) – bit depth, one of16,24,32channels (
int|Sequence[int]) – channel selection, seeaudresample.remix()format (
str) – file format, one of'flac','wav'mixdown (
bool) – apply mono mix-downsampling_rate (
int) – sampling rate in Hz, one of8000,16000,22050,24000,44100,48000cache_root (
str) – cache folder where databases are stored. If not setaudb.default_cache_root()is used
- Return type:
- Returns:
Trueif 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