Difference between VOICE_COMMUNICATION and MIC in MediaRecorder.AudioSource

Mansur Uddin Khan picture Mansur Uddin Khan · Nov 20, 2017 · Viewed 9k times · Source

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?

Answer

Khaled picture Khaled · Nov 29, 2017

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.