{"record":{"id":"6974b3c957e2daaa","repo":"unslothai/unsloth","slug":"the-local-transcription-runtime-exited-before-beco","errorCode":null,"errorMessage":"The local transcription runtime exited before becoming ready; the model file may be corrupt or unsupported.","messagePattern":"The local transcription runtime exited before becoming ready; the model file may be corrupt or unsupported\\.","errorType":"exception","errorClass":"SttEngineUnavailableError","httpStatus":501,"severity":"error","filePath":"studio/backend/core/inference/stt_ggml_sidecar.py","lineNumber":1045,"sourceCode":"                    self._loading = False\n                    self._load_cancel_event = None\n                    self._load_owner_cancel_event = None\n                    self._starting_process = None\n\n    @staticmethod\n    def _wait_for_server(\n        process: subprocess.Popen,\n        port: int,\n        cancel_event: Optional[threading.Event] = None,\n    ) -> None:\n        deadline = time.monotonic() + _SERVER_START_TIMEOUT_SECONDS\n        while time.monotonic() < deadline:\n            if cancel_event is not None and cancel_event.is_set():\n                raise SttLoadCancelledError(\n                    \"GGUF STT model loading was cancelled so training could start.\"\n                )\n            if process.poll() is not None:\n                raise SttEngineUnavailableError(\n                    \"The local transcription runtime exited before becoming \"\n                    \"ready; the model file may be corrupt or unsupported.\"\n                )\n            # Require a whisper-server-specific response twice, with the managed\n            # child alive around each probe. An arbitrary local process that won\n            # the bind race would otherwise be mistaken for the sidecar and\n            # receive the user's microphone audio.\n            if GgmlSttSidecar._probe_is_whisper_server(process, port) and (\n                GgmlSttSidecar._probe_is_whisper_server(process, port)\n            ):\n                return\n            time.sleep(0.2)\n        raise SttEngineUnavailableError(\"The local transcription runtime did not start in time.\")\n\n    @staticmethod\n    def _probe_is_whisper_server(process: subprocess.Popen, port: int) -> bool:\n        \"\"\"One readiness probe: our child is alive and the responder looks like\n        whisper.cpp's server (its index page and errors identify whisper).\"\"\"","sourceCodeStart":1027,"sourceCodeEnd":1063,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/stt_ggml_sidecar.py#L1027-L1063","documentation":"SttEngineUnavailableError raised in _wait_for_server when process.poll() is not None: the spawned whisper-server child exited before answering two readiness probes. The message points at a corrupt or unsupported GGUF model file because that is the dominant cause of immediate whisper-server exit; a missing shared library or bad binary produces the same symptom.","triggerScenarios":"load() spawns whisper-server with the cached GGUF; the process dies during the readiness poll loop (poll() returns a return code) before _probe_is_whisper_server succeeds twice.","commonSituations":"Truncated/corrupt model download in the cache; GGUF file incompatible with the installed whisper.cpp version (new quantization/format); missing GPU runtime libs on the child's loader path; antivirus or sandbox killing the freshly spawned binary.","solutions":["Delete the cached GGUF for that model and re-download it via Settings > Voice.","Run `unsloth studio update` to align the managed whisper.cpp binary with the model format.","Reproduce manually: run the whisper-server command from the log with the same model path and read its stderr (the sidecar pipes it to DEVNULL).","If an external AV/sandbox killed it, allowlist the managed whisper-server binary."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"import os\npath = _cached_model_path(model_id)\nif path is None or not os.path.isfile(path):\n    prompt_download(model_id)\nelif os.path.getsize(path) < EXPECTED_MIN_SIZE.get(model_id, 0):\n    revalidate_model(model_id)  # suspect truncated download","typeGuard":null,"tryCatchPattern":"try:\n    sidecar.load(model_id)\nexcept SttEngineUnavailableError as exc:\n    if \"exited before becoming ready\" in str(exc):\n        revalidate_or_redownload_model(model_id)\n        fall_back_to_transformers()","preventionTips":["Validate GGUF size/checksum after download completes.","Keep whisper.cpp and model formats in lockstep via `unsloth studio update`.","Allowlist the managed whisper-server binary in AV/sandbox tooling."],"tags":["stt","ggml","whisper-cpp","corrupt-model","process-exit"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}