ensure_local_model

Function ensure_local_model 

Source
async fn ensure_local_model(
    settings: &Option<Value>,
) -> Result<PathBuf, SttError>
Expand description

Resolve the GGML model path, downloading an auto-managed model on first use.

  • Explicit voice:whisperModelPath / AGENTMUX_WHISPER_MODEL → used as-is (no download; error if missing).
  • Otherwise → <config>/whisper-models/ggml-<name>.bin, where name comes from voice:whisperModel (default base.en), fetched once from the whisper.cpp model repo. A global lock serializes concurrent first-uses.