{"record":{"id":"96fa8a86c4766d05","repo":"unslothai/unsloth","slug":"the-local-transcription-runtime-did-not-answer-the","errorCode":null,"errorMessage":"The local transcription runtime did not answer the request. Transcription will use the Transformers engine from now on.","messagePattern":"The local transcription runtime did not answer the request\\. Transcription will use the Transformers engine from now on\\.","errorType":"exception","errorClass":"SttEngineUnavailableError","httpStatus":501,"severity":"error","filePath":"studio/backend/core/inference/stt_ggml_sidecar.py","lineNumber":1202,"sourceCode":"                \"POST\",\n                \"/inference\",\n                body = body,\n                headers = {\"Content-Type\": f\"multipart/form-data; boundary={boundary}\"},\n            )\n            with connection.getresponse() as response:\n                if not 200 <= response.status < 300:\n                    raise SttEngineUnavailableError(\n                        f\"The local transcription runtime returned HTTP {response.status}.\"\n                    )\n                payload = json.loads(response.read().decode(\"utf-8\"))\n        except (SttAudioDecodeError, SttEngineUnavailableError):\n            raise\n        except Exception as exc:\n            # A cancel closes this socket deliberately, so it is not evidence of a broken\n            # runtime and must not disable the engine.\n            if cancel_event is None or not cancel_event.is_set():\n                note_runtime_inference_failure(f\"{type(exc).__name__}: {exc}\")\n            raise SttEngineUnavailableError(\n                \"The local transcription runtime did not answer the request. \"\n                \"Transcription will use the Transformers engine from now on.\"\n            ) from exc\n        finally:\n            cancel_done.set()\n            connection.close()\n        text = payload.get(\"text\")\n        if not isinstance(text, str):\n            raise SttAudioDecodeError(\"Could not decode the audio.\")\n        # It served a transcription, so whatever failed earlier was transient.\n        clear_runtime_inference_failure()\n        # whisper.cpp joins segments with newlines; dictation wants one line.\n        return \" \".join(part.strip() for part in text.splitlines() if part.strip()).strip()\n\n\n_sidecar: Optional[GgmlSttSidecar] = None\n\n","sourceCodeStart":1184,"sourceCodeEnd":1220,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/core/inference/stt_ggml_sidecar.py#L1184-L1220","documentation":"SttEngineUnavailableError raised when the /inference request fails at the transport level (connection refused/reset, timeout, JSON decode of the response): any non-SttAudioDecodeError/SttEngineUnavailableError exception is wrapped in this error. The raising call also records a runtime inference failure (unless a cancel caused the socket close), which permanently routes future transcriptions to the Transformers engine until a success calls clear_runtime_inference_failure().","triggerScenarios":"_post_inference's connection.request/getresponse raises — whisper-server crashed mid-request, the port went away, or the response body was not parseable JSON — and cancel_event is None or not set.","commonSituations":"whisper-server child OOM-killed during a long transcription; server process died between load and inference; socket closed by cancel (excluded from failure-marking by design); incompatible server build returning non-JSON.","solutions":["Retry with the Transformers engine — the message states the fallback is already active.","Restart Studio (or trigger a model reload) to respawn whisper-server, then retry GGML dictation to clear the failure mark.","If it recurs, check RAM/VRAM headroom — a child killed mid-inference is the most common transport failure.","Keep whisper.cpp updated via `unsloth studio update`."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = sidecar.transcribe(audio, language=lang)\nexcept SttEngineUnavailableError as exc:\n    if \"Transformers engine\" in str(exc):\n        result = transformers_stt.transcribe(audio, language=lang)  # fallback is intended","preventionTips":["Keep the Transformers STT engine available as the fallback path.","Monitor RAM/VRAM so whisper-server is not OOM-killed mid-request.","After restarting the engine, run one successful GGML transcription to clear the failure mark (clear_runtime_inference_failure)."],"tags":["stt","ggml","network","fallback","engine-health"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}