fix(stt): correct Realtime WS model to gpt-realtime-whisper + enhance event handling for deltas/completed

- URL now uses ?model=gpt-realtime-whisper (was invalid gpt-4o-mini-realtime-preview)
- Cleaned session.update (removed modalities that may not apply)
- Expanded _handle to catch input_audio_transcription.delta and .completed events
- on_error now forwards transcription errors to frontend client
- Per AUDIT + PLAN item 1
This commit is contained in:
2026-06-04 15:14:26 -04:00
parent 7502f201c7
commit 191b7ad9b5
4 changed files with 367 additions and 12 deletions
+4
View File
@@ -141,6 +141,10 @@ async def conversation_ws(websocket: WebSocket):
async def on_error(msg: str):
logger.warning(f"Whisper error: {msg}")
try:
await websocket.send_json({"type": "error", "message": f"Transcription error: {msg}"})
except Exception:
pass
# Start WhisperStream
stream = WhisperStream(