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 database

  • version (str) – version string

  • 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

Return type:

str

Returns:

flavor path relative to cache folder

Raises:

ValueError – if a non-supported bit_depth, format, or sampling_rate is requested

Examples

>>> audb.flavor_path("emodb", version="1.4.1").split(os.path.sep)
['emodb', '1.4.1', 'd3b62a9b']