RuntimeAdapterService over a private Unix-domain socket (default
/run/voicestudio/runtime.sock, VOICE_STUDIO_RUNTIME_SOCKET override; no
HTTP, no TCP, no database, no outbound network):
- Health/GetCapabilities read one RuntimeContext, so runtime/adapter
versions are identical across both calls by construction. Devices come
from torch (CUDA per-GPU / MPS / CPU with system RAM as capacity);
models come from the tts_backend engine registry + hf_revisions pinned
revisions, digest-pinned via a cached sha256 snapshot digest. READY is
explicit: probe passed, snapshot complete, digest computed — a
loading/installed/failed model is reported truthfully, never READY.
- Execute streams started -> bounded progress -> exactly one terminal
event, validates attempt identity, approved model digest, typed bounded
parameters, and LOCAL absolute-path handles (URL-shaped handles are
invalid input, never fetched), runs the engine on a worker thread,
enforces the request deadline, and writes the output WAV atomically
with a size/sha256/duration manifest plus raw measurements.
- Stable RTA_* failure codes map onto RuntimeFailureClass: input,
model-load, inference, GPU-resource, local-storage, canceled, crash.
- Cancel is idempotent by attempt id (ACCEPTED / ALREADY_TERMINAL /
NOT_FOUND) against a bounded attempt registry.
- python -m backend.runtime_adapter serves; --selfcheck starts a temp
socket and runs a port of internal/gateway/preflight.go's checks
against itself (verified passing on this host: 1 device, 2 ready
digest-pinned models).