Difference between VOICE_COMMUNICATION and MIC in MediaRecorder.AudioSource
Asked Answered
A

1

7

I am using media recorder for recording call in android using VOICE_COMMUNICATION & MIC mode alternatively.

RECORD_SOURCE = MediaRecorder.AudioSource.VOICE_COMMUNICATION; //RECORD_SOURCE = MediaRecorder.AudioSource.MIC; iAudioRecorder = new AudioRecord(RECORD_SOURCE, NATIVE_SAMPLE_RATE, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, RECORD_BUF_UNIT);

I saw that MIC recorded audio data has gain much greater than VOICE_COMMUNICATION (about 2/3 times) for some devices. Also background music captured by VOICE_COMMUNICATION is not as good as MIC.

Why do audio quality (like gain, responsiveness) differs for this two recording modes?

Apologetics answered 20/11, 2017 at 14:44 Comment(0)
D
6

According to the Android Developer Reference for MIC and VOICE_COMMUNICATION, some pre-processing like echo cancellation, noise suppression is applied on the audio captured using VOICE_COMMUNICATION which, in turn, causes some attenuation on the data. Moreover, on doing such pre-processing, audio signals with low amplitude becomes even more weak due to this attenuation. So we feel like background audio is sort of gone away for some devices when it is too low.

Another point was varied characteristics from device to device. From this link, it solely depends on device manufacturer and they are free to decide which pre-processing should work on which modes and how.

Dugong answered 29/11, 2017 at 6:5 Comment(4)
I have manually turned off the pre-processing by instance.setEnabled(false);, but it doesn't work for some devices.Apologetics
Low configuration devices like walton primo give almost the same performance(like gain, responsiveness) for both MIC & VOICE_COMMUNICATION . But high configuration devices like samsung show the difference like low gain & low responsiveness for remote music for VOICE_COMMUNICATION than MIC.Apologetics
May be instance.setEnabled(false); doesn't work. Then how can I turn of the pre-processing ?Apologetics
Again, manufacturer do have the privilege to alter API characteristics. I guess, in your case, that call is simply discarded for some modes and devices. I do have found different behavior for [AudioRecord.read](developer.android.com/reference/android/media/…, int, int)) on some devices.Dugong

© 2022 - 2024 — McMap. All rights reserved.