Remove stdout event output — WebSocket is the sole event channel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 08:58:29 +00:00
parent f18330608d
commit aad1bda3bf

View File

@@ -15,8 +15,8 @@ word format: {"word": "hello", "start": 0.12, "end": 0.45, "probability": 0.99}
Every WebSocket connection receives the full event stream from the moment it Every WebSocket connection receives the full event stream from the moment it
connects — no subscription handshake required. connects — no subscription handshake required.
All log/status messages go to stderr. Stdout is machine-readable events only. Machine-readable events are sent over WebSocket only.
Pass --verbose to enable info logging (startup, VAD events, transcripts). Pass --verbose to enable logging to stderr (startup, VAD events, transcripts).
Errors always go to stderr regardless of verbosity. Errors always go to stderr regardless of verbosity.
Environment: Environment:
@@ -61,8 +61,6 @@ _ws_clients = set() # set of asyncio.Queue, one per connection
def emit(event): def emit(event):
line = json.dumps(event) line = json.dumps(event)
sys.stdout.write(line + '\n')
sys.stdout.flush()
if _ws_loop is not None: if _ws_loop is not None:
for q in list(_ws_clients): for q in list(_ws_clients):
_ws_loop.call_soon_threadsafe(q.put_nowait, line) _ws_loop.call_soon_threadsafe(q.put_nowait, line)