phiola icon indicating copy to clipboard operation
phiola copied to clipboard

Feature: Unprocessed mic as an option for Android

Open MikeStirner opened this issue 9 months ago • 1 comments

On some android devices, there is an "unprocessed" mic that can be selected. It basically removes auto gain control and thus is different from the default mic the OS picks.

I think it is called: AudioSource.UNPROCESSED

How do you feel about having that as a setting?

MikeStirner avatar May 01 '25 04:05 MikeStirner

Yes, it seems like a useful feature. The only difficulty is that the corresponding API was added into AAudio in Android API ver.28, while phiola is built for API ver.26. So I should either increase the API version target (which I really don't want to do) or use dynamic linking (I will test if this works on my Android).

stsaz avatar May 01 '25 05:05 stsaz

Fingers still crossed! I hope it works!

MikeStirner avatar May 13 '25 15:05 MikeStirner

I added a new Recording option in v2.5-beta0. I hope it works for you, because I couldn't really tell the audio difference from the recordings on my device.

stsaz avatar May 17 '25 04:05 stsaz

Sweet! I will let you know! Unprocessed will sound very quiet when you are further from the mic, since it disables automatic gain control. You will sound ten or more times louder if the mic is an inch away than if it is an arms length away.

MikeStirner avatar May 20 '25 12:05 MikeStirner

Works flawlessly! I can also definitely tell it is quieter, as expected when farther. Here were my tests:

Test 1: Using speech recognition on a keyboard (Whisper IME app used) while doing a recording.

Result: Passed with and without unprocessed. Correctly mutes during keyboard recording time window and unmutes afterwards. Perfect!

Test 2: Recording a voice message in signal while doing a recording.

Result: Without unprocessed, ends the recording upon starting voice message recording in Signal app. With unproc, mutes then unmutes afterwards, as I had expected. Perfect!

Test 3: Jumping onto a call while doing a recording.

Result: With and without unproc, ends the recording once the call begins, as expected. Good!

I used Android 13, Samsung S20 5G.

Let me know if I can support this project financially!

MikeStirner avatar May 20 '25 13:05 MikeStirner