3

I am using the MediaRecorder for audio recording in android. I receive very poor audio quality when I record. I checked iPhone recording, and it is very good, but in android I receive horrible sound.

For sound recording I use:

 recorder = new MediaRecorder();
 recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
 recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
 recorder.setAudioEncoder(MediaRecorder.AudioSource.DEFAULT);
 recorder.setOutputFile(path);
 recorder.prepare();
 recorder.start(); 

How do I improve Audio Recording quality?

Praveenkumar
  • 24,084
  • 23
  • 95
  • 173
Nikunj Patel
  • 21,853
  • 23
  • 89
  • 133
  • possible duplicate of [very poor quality of audio recorded on my droidx using MediaRecorder, why?](http://stackoverflow.com/questions/5010145/very-poor-quality-of-audio-recorded-on-my-droidx-using-mediarecorder-why) – Jacob Feb 23 '12 at 03:19
  • did you get any solution? and improvment in audio quality – curiousMind Jun 27 '18 at 11:00

2 Answers2

7

Try this one -

recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setAudioEncoder(MediaRecorder.getAudioSourceMax());
recorder.setAudioEncodingBitRate(16);
recorder.setAudioSamplingRate(44100);
recorder.setOutputFile(path);
recorder.prepare();
recorder.start(); 
Praveenkumar
  • 24,084
  • 23
  • 95
  • 173
0

Android has mainly supported 3 sound formats (i mean from creation point of view) : 3gp, mp4 and amr. Actually all there quality is very poor, so nothing to do about that.

Anyway you can use external mp3 codecs or save it as wave file. Sounds will be more clear but such codec(wav) will require large voice file in comporations of three formats mentioned above.

Jviaches
  • 826
  • 3
  • 14
  • 30