flavor_path()¶
- audb.flavor_path(name, version, *, bit_depth=None, channels=None, format=None, mixdown=False, sampling_rate=None)[source]¶
Flavor cache path.
Returns the path under which
audb.load()stores a specific flavor of a database in the cache folder, that is:<name>/<version>/<flavor-id>/Note that the returned path is relative. To get the absolute path, do:
os.path.join( audb.default_cache_root(...), audb.flavor_path(...), )
- Parameters:
name (
str) – name of databaseversion (
str) – version stringbit_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,48000
- Return type:
- Returns:
flavor path relative to cache folder
- Raises:
ValueError – if a non-supported
bit_depth,format, orsampling_rateis requested
Examples
>>> audb.flavor_path("emodb", version="1.4.1").split(os.path.sep) ['emodb', '1.4.1', 'd3b62a9b']