Skip to content

[FEAT] androidConfig.audioSource - control Android audio preprocessing #428

Description

@akidd27

Problem

On Android, the library hardcodes MediaRecorder.AudioSource.MIC in all recording paths (AudioRecorderManager.kt and AudioDeviceManager.kt). This means OEM-level DSP processing (noise suppression, AGC, "AI voice enhancement") is applied to the captured audio before it reaches the app.

On many devices (Honor/Huawei, Xiaomi/Redmi, and others with aggressive audio DSP), this degrades audio quality for speech-to-text, acoustic analysis, and raw audio capture.

On iOS, the library already exposes ios.audioSession.mode, which lets users set 'Measurement' to bypass platform audio processing; there is no Android equivalent.

Proposed solution

Expose an option in AndroidConfig that lets users choose the Android MediaRecorder.AudioSource used for recording. The library currently hardcodes MIC; users should be able to request VOICE_RECOGNITION, UNPROCESSED, or an automatic best-effort selection instead.

The default should remain MIC for backwards compatibility. Graceful fallback to MIC is important since UNPROCESSED is not supported on all devices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions