docs(audio-recorder): note that Android AEC also needs the playback path - #1256
Open
recepteksi wants to merge 1 commit into
Open
docs(audio-recorder): note that Android AEC also needs the playback path#1256recepteksi wants to merge 1 commit into
recepteksi wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1254
Introduced changes
the input preset is only the capture half of echo cancellation.
The section currently presents
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
AudioContextplayback defaults to
USAGE_MEDIA, so on some devices the app's own output stillreaches 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 predatesandroidInputPreset, soour 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