Skip to content

feat: ✨ Add audio effects support for Android recordings#499

Open
lavigarg-simform wants to merge 1 commit into
fix/I488_fix_android_release_crashfrom
fix/I442_and_I381_android_audio_noise_supression
Open

feat: ✨ Add audio effects support for Android recordings#499
lavigarg-simform wants to merge 1 commit into
fix/I488_fix_android_release_crashfrom
fix/I442_and_I381_android_audio_noise_supression

Conversation

@lavigarg-simform

@lavigarg-simform lavigarg-simform commented Jun 24, 2026

Copy link
Copy Markdown

Description

On Android, recordings made with this package often contain noticeable echo and background noise compared to iOS, which sounds clean for the same environment. The root cause is that Android capture always used the raw MIC source with no device audio processing, while iOS routes through a voice pipeline that suppresses noise and echo by default.

This PR gives Android recordings access to the same kind of device-level audio processing, all opt-in so existing behavior is unchanged.

  • Adds a configurable Android audio input source (AndroidAudioSource) so callers can route capture through the device voice pipeline (e.g. voiceCommunication) instead of the raw mic.
  • Adds opt-in noise suppression, acoustic echo cancellation, and automatic gain control, each attached only when the caller enables it and the device supports it.
  • Effects fail safely: an unsupported or unavailable effect is skipped without aborting the recording, and audio effects are released when the recorder is released.
  • Audio sources that require newer Android versions fall back to the default source on older devices instead of producing unusable audio.
  • Fails loudly when a requested source/sample-rate/channel combination cannot initialize, instead of recording garbage PCM (loud noise).
  • Updates the example app to demonstrate the recommended voice-recording configuration.

All new settings default to off / mic, so projects that do not opt in keep their current recording behavior. Note that automatic gain control alters captured amplitude and therefore the rendered waveform, so it is best avoided for music or level-sensitive recording.

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Closes #442
Closes #381

@lavigarg-simform lavigarg-simform force-pushed the fix/I442_and_I381_android_audio_noise_supression branch from 8f70ccb to 01e8203 Compare June 25, 2026 06:43
@lavigarg-simform lavigarg-simform marked this pull request as ready for review June 25, 2026 06:51
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.

Android recordings have echo/noise compared to iOS Audio Recording Issue in audio_waveforms v1.0.5(Android)

1 participant