Dilip Dubey
Dilip Dubey

Reputation: 21

Audio quality issue when recorded with MediaRecorder

The audio recorded by MediaRecorder in android App having so much noise.How can I use noise suppression to remove noice while recording.

Upvotes: 2

Views: 1119

Answers (2)

Hisan
Hisan

Reputation: 2645

I had the same problem of low audio quality while using MediaRecorder and finally figured out the correct working solution. Here are few modifications you need to do for good quality audio recordings:

save the file using .m4a extention. and

mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB);
mRecorder.setAudioEncodingBitRate(16*44100);
mRecorder.setAudioSamplingRate(44100);

Many solutions on stackoverflow would suggest .setAudioEncodingBiteRate(16) but 16 is too low to be considered meaningless .

Source: @Grant answer on stackoverflow very poor quality of audio recorded on my droidx using MediaRecorder, why?

Upvotes: 1

Khumash Hussain
Khumash Hussain

Reputation: 9

Are you testing this with the emulator, or on an actual device (if so, which device)? The acoustic tuning (which includes gain control, noise reduction, etc) will be specific to a given platform and product, and is not something you can change.

Jellybean includes APIs to let applications apply certain acoustic filters on recordings, and a noise suppressor is one of those. However, by using that API you're limiting your app to only function correctly on devices running Jellybean or later (and not even all of those devices might actually implement this functionality).

Another possibility would be to include a noise suppressor in your app. I think e.g. Speex includes noise supressing functionality, but it's geared towards low-bitrate speech encoding.

https://developer.android.com/reference/android/media/audiofx/NoiseSuppressor.html

android voice recording - voice with background noice issue

Upvotes: 0

Related Questions