feat(hardware): on-demand NPU runtime paths + readiness probe (T3.4)

This commit is contained in:
iamdoubz committed 2026-07-02 15:54:54 -05:00
1 parent 8530a22899
commit d5f7b1ac95
1 file changed
+19
+19
View File
@@ -44,6 +44,25 @@ pub fn whisper_model_path() -> PathBuf {
whisper_model_file(DEFAULT_WHISPER_MODEL)
}
/// On-demand NPU runtime (ONNX Runtime + OpenVINO EP DLLs, T3.4). Kept OUT of
/// the base installer to keep the binary lean (NFR-RES-1) — several hundred MB
/// of OpenVINO runtime is only fetched when an NPU is actually detected. The
/// download populates this dir; `ORT_DYLIB_PATH` is pointed at the ORT DLL here.
pub fn npu_runtime_dir() -> PathBuf {
wa_root().join("runtime").join("openvino")
}
/// The dlopen target for `ort` (load-dynamic). Its presence is the readiness
/// signal: an NPU is only "available" for routing once this exists on disk.
pub fn npu_runtime_dll() -> PathBuf {
npu_runtime_dir().join("onnxruntime.dll")
}
/// True once the NPU runtime has finished downloading (T3.4 step 2).
pub fn npu_runtime_ready() -> bool {
npu_runtime_dll().exists()
}
/// Fixed filenames pending T4.7 (diarization model management/selection in Settings).
pub fn diarization_segmentation_model_file() -> PathBuf {
models_dir().join("seg-pyannote-3.0.onnx")