Take the 2-minute tour ×

I have a scenario where in I need to record the voice along with a backtrack/music playing. The user uses a headset to hear the music and sings along with the music,I need to capture both the things in one file.

This is something like getting the audio output from the media player in code.

Is this possible??Please advice!!

If I use the device speaker(external) then this will be possible,but I need the other way.

share|improve this question
I am doing this stuff in java..i don't know whether the same stuff works on android.BDW, what have you tried? –  joey rohan Feb 26 '13 at 13:37
I am playing the music file in the speaker and capturing both the voice and music that way.. ie playing the music using a MediaPlayer simultaneously recording the voice using MediaRecorder. –  amj Feb 26 '13 at 13:50
add comment

1 Answer

You can get a low-quality version of the output mix using the Visualizer class. It's not really intended for the kind of use-case you describe, so it will sound pretty bad if you try to play it back.

There's no other way of recording the output that will work on a stock Android phone (except for the loudspeaker method that you mentioned).
Some SoCs do have support for this, but since the functionality isn't exposed through any Android API you'd need to have root access and will limit your app to work on a select few phone models.

share|improve this answer
Thanks for the reply Michael,let me try with Visualizer. –  amj Feb 27 '13 at 5:06
Tried to use Visualizer,but as you said the file misses the clarity ... –  amj Feb 28 '13 at 5:49
add comment

Your Answer


