feat(voice-client): PySide6 desktop client and Windows build scripts

Add voice_confirmation_client (poll, TTS MP3 playback, mic WAV resolve),
PyInstaller spec, start/build helpers, and API unit tests.

Pending manual testing: end-to-end on OR workstations and packaged exe.

Made-with: Cursor
This commit is contained in:
Kevin
2026-04-27 09:52:10 +08:00
parent e4c6127619
commit 4c3f9a367b
19 changed files with 1324 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
#!/usr/bin/env python3
"""Build the voice confirmation desktop client with PyInstaller (run on target OS)."""
from __future__ import annotations
import argparse
import shutil
import subprocess
import sys
from pathlib import Path
def main() -> None:
root = Path(__file__).resolve().parents[1]
spec = root / "voice_client.spec"
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--clean",
action="store_true",
help="Remove build/ and dist/ before building",
)
args = parser.parse_args()
if args.clean:
for name in ("build", "dist"):
p = root / name
if p.is_dir():
shutil.rmtree(p)
if not spec.is_file():
print(f"Missing {spec}", file=sys.stderr)
sys.exit(1)
cmd = [sys.executable, "-m", "PyInstaller", str(spec), "--noconfirm"]
print("Running:", " ".join(cmd))
raise SystemExit(subprocess.call(cmd, cwd=root))
if __name__ == "__main__":
main()