feat(voice): run pipeline eyes-free (STT -> Brain -> TTS), defer screen share
Make source/vision optional so the conversation loop runs with no screen capture. Add Settings.voice() preset and `python -m wsai --voice` demo. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Entry point.
|
||||
|
||||
python -m wsai # mock pipeline (no deps, no keys) — runs a demo
|
||||
python -m wsai --voice # eyes-free voice loop demo (STT -> Brain -> TTS)
|
||||
python -m wsai --live # capture this screen + Claude eyes/brain
|
||||
python -m wsai --env # build from WSAI_* environment variables
|
||||
|
||||
@@ -25,7 +26,8 @@ async def _run(settings: Settings, demo: bool) -> None:
|
||||
from .pipeline import Pipeline
|
||||
|
||||
pipe = build(settings)
|
||||
pipe.source = MockFrameSource(interval=0.3, limit=4)
|
||||
if pipe.source is not None: # keep eyes-free configs eyes-free
|
||||
pipe.source = MockFrameSource(interval=0.3, limit=4)
|
||||
if pipe.stt is not None:
|
||||
pipe.stt = MockSTT(interval=0.4)
|
||||
await pipe.run()
|
||||
@@ -35,6 +37,7 @@ async def _run(settings: Settings, demo: bool) -> None:
|
||||
|
||||
def main() -> None:
|
||||
ap = argparse.ArgumentParser(prog="wsai")
|
||||
ap.add_argument("--voice", action="store_true", help="eyes-free voice loop (STT -> Brain -> TTS)")
|
||||
ap.add_argument("--live", action="store_true", help="capture screen + Claude backends")
|
||||
ap.add_argument("--env", action="store_true", help="build from WSAI_* env vars")
|
||||
ap.add_argument("-v", "--verbose", action="store_true")
|
||||
@@ -45,7 +48,9 @@ def main() -> None:
|
||||
format="%(levelname)s %(name)s: %(message)s",
|
||||
)
|
||||
|
||||
if args.live:
|
||||
if args.voice:
|
||||
settings, demo = Settings.voice(), True
|
||||
elif args.live:
|
||||
settings, demo = Settings.live(), False
|
||||
elif args.env:
|
||||
settings, demo = Settings.from_env(), False
|
||||
|
||||
Reference in New Issue
Block a user