AudioClip Database#

The microservice stores audio clips in a in-memory database. As such, the database does not persist if the microservice is closed or restarted. Moreover this database is not shared between microservices.

The AudioClip database can be parametrized via the configuration file of the microservice.

TTL#

The AudioClip database supports the following TTL options:

Note

The clib_db_ttl_refresh and clib_db_ttl_check_interval_seconds options contain a typo in their names. This will be corrected in upcoming versions.

  • clip_db_ttl_seconds: Time in seconds for an audio file to remain present on the server. Default is 3600 seconds (1 Hour).

  • clib_db_ttl_refresh_on_use: Indicates whether the TTL countdown for an audio file should reset upon use (for example, a call to GetAvatarFacePose is made to the corresponding clip.). Default is false.

  • clib_db_ttl_check_interval_seconds: The frequency, in seconds, at which the system checks for expired TTLs. Default is 60 seconds (1 Minute).

A background task runs every clib_db_ttl_check_interval_seconds to identify expired audio clips. If clib_db_ttl_refresh_on_use is set to true, the expiration check is based on the last used date. If set to false, the check is based on the upload time.

Maximum size#

It is possible to set a maximum size to the audio clip database (in bytes) using the clip_db_max_size_bytes option. This will ensure that the service clip database never grows beyond this clip size. Note that the size is calculated on upload, after applying the TTL purges regarding old audio clips.