Skip to content

docs(audio-recorder): note that Android AEC also needs the playback path - #1256

Open
recepteksi wants to merge 1 commit into
software-mansion:mainfrom
recepteksi:docs/android-aec-output-path
Open

docs(audio-recorder): note that Android AEC also needs the playback path#1256
recepteksi wants to merge 1 commit into
software-mansion:mainfrom
recepteksi:docs/android-aec-output-path

Conversation

@recepteksi

Copy link
Copy Markdown

Refs #1254

⚠️ Breaking changes ⚠️

  • None. Documentation only.

Introduced changes

  • Adds a caution to the AudioRecorder full-duplex section noting that on Android
    the input preset is only the capture half of echo cancellation.

The section currently presents

new AudioRecorder({ androidInputPreset: 'voiceCommunication', iosVoiceProcessing: true })

as what a full-duplex app needs. That is complete on iOS. On Android the platform
AEC cancels against the voice-communication output path, and AudioContext
playback defaults to USAGE_MEDIA, so on some devices the app's own output still
reaches the microphone with the preset set correctly — which is what #1254
reports, with a proposed fix on the output builder.

This PR does not touch that behaviour: @closetcaiman said in the issue that the
approach needs thinking through, and this is only the documentation half
(suggestion 2 in the report), so it should not constrain that decision.

It also adds a testing note. Headphones remove the acoustic path entirely, so a
broken setup verified over headphones looks fixed — worth stating next to the
recommendation itself.

How I ran into it

Building a voice assistant on 0.13.3, which predates androidInputPreset, so
our Android capture never engaged the platform AEC at all and the session had to
stop listening while it spoke. Reading upstream to plan the upgrade, the docs
suggested the input preset alone would be enough; #1254 says otherwise. I have
not reproduced the output-path half on a device myself — the wording follows the
issue rather than asserting more than I verified, and is deliberately hedged
("on some devices").

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added/Conducted relevant tests — documentation only
  • Performed self-review of the code
  • Updated Web Audio API coverage — not applicable
  • Added support for web — not applicable
  • Updated old arch android spec file — not applicable

The full-duplex section presents androidInputPreset: 'voiceCommunication' plus
iosVoiceProcessing: true as what such an app needs. On Android that is only the
capture half: the platform AEC cancels against the voice-communication OUTPUT
path, and AudioContext playback defaults to USAGE_MEDIA, so on some devices the
app's own output still reaches the microphone.

Adds a caution pointing at software-mansion#1254, where that is being tracked, and a testing
note — headphones remove the acoustic path and hide the problem entirely, which
makes a broken setup look fixed.

Refs software-mansion#1254
@closetcaiman closetcaiman added the documentation Additions, corrections, or updates to documentation and technical specs label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Additions, corrections, or updates to documentation and technical specs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants