vllm_omni.utils.speaker_cache ¶
Process-wide thread-safe LRU cache for speaker extraction artifacts.
Keyed by (model_type, speaker_name, created_at) so each upload generation has its own slot. Access via :func:get_speaker_cache.
SpeakerEmbeddingCache ¶
Thread-safe in-memory LRU cache for speaker extraction artifacts.
clear ¶
Remove entries. With a name, drops matches across model types and generations.
make_cache_key staticmethod ¶
Build a cache key. created_at=0 for built-in speakers (no upload).
Names are normalized (stripped + lowercased) so delete/clear paths that normalize to lowercase match entries put with mixed-case names.
get_speaker_cache ¶
get_speaker_cache() -> SpeakerEmbeddingCache
Return the process-wide speaker cache singleton.