Skip to content

fix: upgrade OpenAI Realtime API to GA and resolve audio feedback loop#21

Merged
PyDevDeep merged 1 commit into
mainfrom
fix/n8n-routing-and-stub
Jul 2, 2026
Merged

fix: upgrade OpenAI Realtime API to GA and resolve audio feedback loop#21
PyDevDeep merged 1 commit into
mainfrom
fix/n8n-routing-and-stub

Conversation

@PyDevDeep

Copy link
Copy Markdown
Owner

Title: fix: Upgrade OpenAI Realtime API to GA and resolve audio feedback loop

Description
This PR implements critical hotfixes to stabilize the voice streaming infrastructure. It migrates the backend from the deprecated OpenAI Beta API to the General Availability (GA) release and resolves acoustic feedback loops on the client side that were causing infinite VAD interruption cycles.

Changelog

  1. Backend (OpenAI GA Migration)
  • backend/services/openai_realtime.py: Removed the deprecated OpenAI-Beta header. Updated the session.update payload to match the GA schema, explicitly defining input and output audio formats.
  • backend/api/ws_voice.py: Updated event listeners to consume the new GA event structures (response.output_audio.delta and response.output_transcript.done).
  1. Frontend (DSP & Routing)
  • frontend/src/hooks/useVoiceSession.js: Injected native WebRTC DSP parameters (echoCancellation, noiseSuppression, autoGainControl) into navigator.mediaDevices.getUserMedia to suppress acoustic feedback and prevent false-positive VAD triggers.
  • frontend/vite.config.js: Fixed the dev server proxy port to route /api and /ws traffic through the Nginx reverse proxy (8080) instead of the isolated FastAPI container port (8000).
  • .gitignore: Explicitly excluded frontend/node_modules/ from source control.

Acceptance Criteria Checklist
[x] OpenAI WebSocket connects using the gpt-realtime-1.5 model without 3000/4000 closure codes.
[x] Client microphone input is filtered for echo, preventing infinite response_cancelled loops.
[x] Frontend Vite proxy successfully forwards WebSocket upgrade requests to the backend.

@PyDevDeep PyDevDeep merged commit 141eda6 into main Jul 2, 2026
5 checks passed
@PyDevDeep PyDevDeep deleted the fix/n8n-routing-and-stub branch July 2, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant