How to adjust microphone volume in Android programmatically - android

Is there a way to increase/decrease the input volume of the Android microphone. I did some research on Google as well as StackOverflow but didn't find a suitable answer.
Here are some links:
How to adjust microphone volume in android?
Adjust Microphone Recording Volume
Is Android capable of managing microphone/input volume?.
Please provide any help/reference.

I had a certain problem where I had to increase the volume (gain) of the sound and also filter out some frequencies I used TarsosDSP library for android it has a particular class called GainProcessor where you can adjust the sound accordingly. Hope it helps.

Related

How to increase the microphone gain while recording?

I'm building video chat application. During the call only one side audio is clear and other side its feeble and quiet. I want to increase the gain of microphone on the device so that the voice is clearly audible at other side.
Can any one tell me how to increase the Microphone gain programatically in android?
More specifically which API should I use for this?
When the microphone is open, it used the volume of the AudioManager.STREAM_MUSIC.
Try to increase this volume and check if the microphone volume also increased.

Is Android capable of managing microphone/input volume?

I've searched everywhere, including the RootTools source. I can't find anything that manages the microphone, apart from muting it altogether. And there are no hints inside the AudioRecorder.setMicrophoneMute(bool) method either...
There are a few posts about this issue, but none of them ever go anywhere (through no fault of OPs'). Is it (legally) possible to override the OS and get to the mic hardware directly or something?
Thanks,
-tre
You can't directly set the recording volume, but you can change what you do with the byte data you get from AudioRecord (look at the AudioTrack class for reducing the volume of the track)
Edit: I forgot to mention that if you're having trouble with volume spikes you can look at automatic gain control. Some devices activate it automatically, but you can manually enable it.
On occasion, I get a phone or tablet with poorly chosen microphone input volume. Android 4 had it adjustable but not the newer versions. It makes it impossible to use VOIP. It's not just for fancy audio recordings.

Pan Stereo Audio Android

Is there a best way to go about panning stereo audio in an android app? I have been looking for some decent audio libraries but have yet to come up with anything solid.
MediaPlayer.setVolume allows you to set the volume of the left and right channels independently.
For more details have a look at This SO question.

Trigger event on sound input from mic

I'm trying to make an application that'll react when a sharp and loud sound will be heard in my tablets microphone.
What I want to know is if it's possible to trigger such an event and is it possible to set some sort of threshold for the sound level of the input.
Thanks
Check these links out:
StackOverflow answer.
Which leads to this NoiseAlert source code.
But its just a matter of listening on the microphone then triggering your event when sound levels are high enough.

Getting microphone volume while recording

I'm using the simple app shown in the Android documentation to play around with recording and playing audio. Just to add a small feature, I want to get the volume of the microphone while it's recording to move a bar like how the voice recognition will fill the microphone while you are speaking into it. I looked around online, but no one seems to have a definitive answer, could someone point me in the right direction? Thanks!
i think there is no specific volume for mic. when you are recording that takes media volume as mic volume.

Categories

Resources