Recording only caller voice in android

I am using MediaRecorder to record a call in android. But I just want to record the voice of the caller. It can be done?

  recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); // mRecorder.setOutputFile("/sdcard/yousuck2.3gp"); if (audiofile == null) { File sampleDir = Environment.getExternalStorageDirectory(); try { audiofile = File.createTempFile("ibm", ".3gp", sampleDir); } catch (IOException e) { Log.e(TAG, "sdcard access error"); return; } } 

What is the difference between VOICE_CALL , VOICE_UPLINK and VOICE_DOWNLINK ? I read Android docs but couldn't understand.

+7
source share
2 answers

I used to have the same problem that I was looking for a lot than I found a simple word solution from https://stackoverflow.com/a/1254760/ ... I found out that VOICE_UPLINK : audio is being transferred from your end to another party. IOW, what are you saying into the microphone (plus ambient noise depending on whether noise reduction is used and how well it works).

VOICE_DOWNLINK : Audio transmitted from another participant to the end.

VOICE_CALL: VOICE_UPLINK + VOICE_DOWNLINK.

therefore, I use a recording format like DOWNLINK , and its work hopes that it is a simple word to distinguish.

+2
source

What is the difference between VOICE_CALL, VOICE_UPLINK and VOICE_DOWNLINK ??? I read on Android docs ... didn't understand.

Classes MediaRecorder.MediaSource now after API level 4 (Android 1.6) Includes

  • VOICE_CALL Uplink Voice Call + Downlink Audio Source
  • VOICE_DOWNLINK Forward Link Audio Source (Rx)
  • VOICE_UPLINK Uplink Audio Source (Tx)

See here for more details.

link proff

I am using a media recorder to record a call in android. But I just want to record the voice of the caller. Can this be done?

As a short answer, it is not possible to record a call directly to the Android platform so far due to the hardware architecture. Most call recorders on the market record voice when the device is on speaker or in the same technique.

0
source

All Articles