fix(voice): expand speech buffer to 60s, handle 2.1 cancellation race, and bound cleanup
- Expand max_input_buffer_bytes to 3,072,000 (64s at 24kHz PCM16) with 65s fixed deadline - Broaden response_cancel_not_active race classifier to include gpt-realtime-2.1/shimmer - Add transport abort method and bound cleanup waits during websocket close - Record repair progress in docs/plans/live-conversation-repair-progress.md
This commit is contained in:
+6
-2
@@ -292,7 +292,11 @@ async def handle_stream_websocket(websocket, session_id, auth_service, lifecycle
|
||||
try:
|
||||
for task in children:
|
||||
task.cancel()
|
||||
await asyncio.gather(*children, return_exceptions=True)
|
||||
if children:
|
||||
_, pending_children = await asyncio.wait(children, timeout=5)
|
||||
if pending_children:
|
||||
diagnostic(str(session_id), "stream_cleanup", "CLEANUP_TIMEOUT",
|
||||
code=outcome, pending_tasks=len(pending_children))
|
||||
try:
|
||||
# Saturation must not strand the durable terminal outcome once admission frees.
|
||||
deadline = asyncio.get_running_loop().time() + 6
|
||||
@@ -309,7 +313,7 @@ async def handle_stream_websocket(websocket, session_id, auth_service, lifecycle
|
||||
exc=exc, code=outcome)
|
||||
try:
|
||||
if runtime:
|
||||
await asyncio.wait_for(runtime.close(), 6)
|
||||
await runtime.close()
|
||||
elif adapter:
|
||||
await asyncio.wait_for(adapter.close(), 6)
|
||||
except Exception as exc:
|
||||
|
||||
Reference in New Issue
Block a user