Skip to content

Conversation

@gnageswa-amazon
Copy link
Contributor

Issue #:
In the current voicefocus code, we always create new web audio AudioWorklet node to enhance the audio. In case of Connect, this is creating a new node (and thus artifacts along with it) for every call. Even after calling destroy method, these artifacts are still there in browser (web worker and wasm files) due to a Chrome bug [https://issues.chromium.org/issues/41435286], these resources are never cleaned up from browser and increasing the browser memory foot print.

Description of changes:

  • This fix addresses the memory footprint problem by reusing existing AudioWorklet node and re-attaching to new media stream source and destination in web audio graph.
  • It also has minor changes to reset model metrics when clients invoke reset call.

Testing:

  • The changes are tested internally by changing code in local node_modules.

Can these tested using a demo application? Please provide reproducible step-by-step instructions.
Yes, the voice focus behaviour must be unchanged for first and any subsequent calls.

Checklist:

  1. Have you successfully run npm run build:release locally?
    yes

  2. Do you add, modify, or delete public API definitions? If yes, has that been reviewed and approved?
    yes

  3. Do you change the wire protocol, e.g. the request method? If yes, has that been reviewed and approved?
    no

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@gnageswa-amazon gnageswa-amazon requested a review from a team as a code owner November 19, 2025 20:21
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