Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase volume of recording Android AudioRecord

I'm using AudioRecord and lame to record mic input to a mp3 sample for 12 seconds. The audio is recorder as expected but I realized the volume is too low.

Is there a way to increase the volume of the recording?

like image 793
Wedava Avatar asked Oct 11 '14 18:10

Wedava


1 Answers

There is no gain settings in the audioRecord class to play with, so you cannot control the volume of the audio being recorded. The low volume of the audio is related to the hardware and varies from device to device. Here are a few options you can try.

1) try opening in the audio record in different modes and see whats works best . check - http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html

2) in audio record you get the raw PCM buffers. You can write a simple code/function to shift the bits (8/16 bits per channel) left or right to double or halve the gain. (Think of it as a very crude volume control)

3) try searching the net for more complex digital gain techniques for a smoother control. There are many implementations. (There are proprietary techniques as well)

Check: How to adjust microphone sensitivity while recording audio in android

like image 172
Shrish Avatar answered Sep 19 '22 06:09

Shrish