load()

audmodel.load(uid, *, cache_root=None, timeout=14400, verbose=False)[source]

Download a model by its unique ID.

If root is not set, the model is downloaded to the default cache folder, see audmodel.default_cache_root(). If the model already exists in the cache folder, the download is skipped.

Parameters
  • uid (str) – unique model ID (omit version for latest version) or alias

  • cache_root (Optional[str]) – cache folder where models and headers are stored. If not set audmodel.default_cache_root() is used

  • timeout (float) – maximum time in seconds before giving up acquiring a lock

  • verbose (bool) – show debug messages

Return type

str

Returns

path to model folder

Raises

Examples

>>> root = load("d4e9c65b-3.0.0")
>>> "/".join(root.split(os.path.sep)[-2:])
'd4e9c65b/3.0.0'