Skip to content

fix(audio): eliminate echo loopback and handle websocket disconnect#22

Open
PyDevDeep wants to merge 1 commit into
mainfrom
fix/audio-echo-and-disconnect
Open

fix(audio): eliminate echo loopback and handle websocket disconnect#22
PyDevDeep wants to merge 1 commit into
mainfrom
fix/audio-echo-and-disconnect

Conversation

@PyDevDeep

Copy link
Copy Markdown
Owner

Goal

Fix acoustic echo and eliminate websocket termination errors when closing the session.

Changes

  • Removed local microphone loopback to audioCtx.destination in useVoiceSession.js to prevent acoustic feedback into the LLM.
  • Handled RuntimeError gracefully in ws_voice.py when websocket.receive() gets called after the connection drops abruptly.

How to Test

  1. Checkout the branch fix/audio-echo-and-disconnect.
  2. Start the FastAPI backend and frontend.
  3. Open the voice chat UI and begin speaking.
  4. Verify there is no echo or continuous noise feedback.
  5. Close the browser tab mid-conversation and check backend logs (there should be no unhandled errors).

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