{"record":{"id":"6949373d2ef9a470","repo":"unslothai/unsloth","slug":"stt-model-model-id-is-not-downloaded-download","errorCode":null,"errorMessage":"STT model '{model_id}' is not downloaded. Download it in Settings, then Voice, before loading it.","messagePattern":"STT model '(.+?)' is not downloaded\\. Download it in Settings, then Voice, before loading it\\.","errorType":"http","errorClass":"SttModelNotDownloadedError","httpStatus":409,"severity":"error","filePath":"studio/backend/core/inference/stt_mtmd_sidecar.py","lineNumber":792,"sourceCode":"        self._update_in_progress = True\n        try:\n            with self._start_lock, self._lock:\n                model_was_active = self._process_alive()\n                self._release_locked()\n                yield model_was_active\n        finally:\n            self._update_in_progress = False\n\n    @staticmethod\n    def _reserve_free_port() -> tuple[socket.socket, int]:\n        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n        sock.bind((\"127.0.0.1\", 0))\n        return sock, sock.getsockname()[1]\n\n    def _ensure_model_downloaded(self, model_id: str) -> tuple[str, str]:\n        paths = _cached_model_paths(model_id)\n        if paths is None:\n            raise SttModelNotDownloadedError(\n                f\"STT model '{model_id}' is not downloaded. \"\n                \"Download it in Settings, then Voice, before loading it.\"\n            )\n        return paths\n\n    def load(\n        self,\n        model: Optional[str] = None,\n        request_cancel_event: Optional[threading.Event] = None,\n    ) -> None:\n        if request_cancel_event is not None and request_cancel_event.is_set():\n            raise SttTranscriptionCancelledError(\"Transcription cancelled.\")\n        self._raise_if_update_in_progress()\n        model_id = resolve_mtmd_model_id(model)\n        binary = ensure_engine_available()\n        # Startup happens outside _lock (it is slow), so this keeps two callers\n        # from each spawning a server and orphaning the first.\n        with self._start_lock:","sourceCodeStart":774,"sourceCodeEnd":810,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/stt_mtmd_sidecar.py#L774-L810","documentation":"Raised by _ensure_model_downloaded() as SttModelNotDownloadedError when _cached_model_paths(model_id) returns None, meaning the mtmd (multimodal Whisper) model files are not present in the local cache. Both load() and transcribe() call it up front so a missing model fails fast before any server start or audio decode.","triggerScenarios":"load(model) or transcribe_bytes(...) with a model id whose GGUF model/mmproj files were never downloaded via the Settings > Voice download flow, or whose cache directory was deleted/moved.","commonSituations":"Fresh install with no model downloaded; user pointed the cache at a wiped directory; model files removed after a disk cleanup; requesting a second model that was never fetched.","solutions":["Download the model in Settings > Voice before loading it.","Verify the model cache directory exists and contains the model and mmproj files for that model_id.","Call the download API/route for the model first, then retry the load."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"```python\nfrom studio.backend.core.inference.stt_mtmd_sidecar import _cached_model_paths\n\nif _cached_model_paths(model_id) is None:\n    prompt_download(model_id)  # Settings > Voice flow\n```","typeGuard":null,"tryCatchPattern":"```python\ntry:\n    sidecar.load(model_id)\nexcept SttModelNotDownloadedError:\n    start_download_flow(model_id)  # then retry after completion\n```","preventionTips":["Check the model cache before offering the model in the UI.","Disable model choices whose download never completed.","Trigger downloads eagerly from Settings rather than lazily at dictation time."],"tags":["stt","model-download","cache-miss","validation"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}