Sample Header Ad - 728x90

Disabling Noise reduction/echo cancellation/any other effects on the microphone input in smartphone

2 votes
0 answers
2887 views
I have made a program that reads a fixed number of bytes from the microphone and sends it out to the speaker, effectively a program to route audio from the mic to speaker without any changes Normally I can hear what I say into the microphone loud and clear on the attached headphone However, if I blow into the microphone, I can momentarily notice the sound in the earphone going smaller, which slowly rises back to its normal volume I think some kind of built in noise reduction or some other effect is kicking in when I blow into the microphone Is there any way to completely stop or bypass any kind of preprocessing the phone does to the microphone input samples, or to the output samples?I have looked at all the sound related settings on the phone and they are all disabled, at least as far as I can tell. I use AudioRecord class to get microphone audio samples and AudioTrack to play them back. AudioRecord source is MediaRecorder.AudioSource.DEFAULT (MediaRecorder.AudioSource.MIC gives the same result). MediaRecorder.AudioSource.VOICE_RECOGNITION doesn't seem to have any effects on the input sound, but I would have guessed that MediaRecorder.AudioSource.DEFAULT or .MIC would be the option without any preprocessing attached to it. I would like to know if there is a way to completely prevent the phone from doing any kind of audio processing, at the mic or the speaker side, through some option in the phone settings or through adb or in my program's code. The phone is Samsung Galaxy S7 with android 8.0, but I am looking for a a general solution if it exists.
Asked by user17915 (381 rep)
Jul 2, 2020, 06:05 AM
Last activity: Jul 2, 2020, 06:23 AM