feat: add CW-026 Local Voice plugin

This commit is contained in:
Bryan Gilliom
2026-07-27 00:33:25 +08:00
commit 5d680928b9
29 changed files with 2697 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env python3
"""Run a deterministic Local Voice installation preflight."""
from __future__ import annotations
import argparse
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
RENDERER = ROOT / "scripts" / "local_voice.py"
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--runtime-root")
parser.add_argument("--device", choices=("metal", "cpu", "cuda"), default="metal")
args = parser.parse_args()
command = [
sys.executable,
str(RENDERER),
"doctor",
"--device",
args.device,
]
if args.runtime_root:
command.extend(["--runtime-root", args.runtime_root])
completed = subprocess.run(command, check=False)
if completed.returncode:
return completed.returncode
completed = subprocess.run(
[sys.executable, str(RENDERER), "list"],
check=False,
)
if completed.returncode:
return completed.returncode
print("Local Voice installation preflight passed.")
return 0
if __name__ == "__main__":
raise SystemExit(main())