duration()¶
- audb.info.duration(name, *, version=None, tables=None, media=None, cache_root=None)[source]¶
Total media duration.
- Parameters
name (
str
) – name of databasetables (
Optional
[Sequence
]) – include only tables matching the regular expression or provided in the listmedia (
Optional
[Sequence
]) – include only media matching the regular expression or provided in the listcache_root (
Optional
[str
]) – cache folder where databases are stored. If not setaudb.default_cache_root()
is used
- Return type
- Returns
duration
- Raises
ValueError – if table or media is requested that is not part of the database
Examples
>>> duration("emodb", version="1.4.1") Timedelta('0 days 00:24:47.092187500') >>> duration("emodb", version="1.4.1", media=["wav/03a01Fa.wav"]) Timedelta('0 days 00:00:01.898250')