Loop an audio through microphone in Android? - android

Is there anyway in android to loop a recorded audio through microphone. I mean that instead of speaking in microphone, i should be able to send a recorded audio from code into it.

Related

Play audio on microphone on Android device

I'd like to create an App that plays an audio file/stream to the microphone to allow a video communication App to capture the sound as input.
To Play the Audio I'm currently using the AudioTrack class.
The closest question is this one, but still unanswered.

How to record internal audio?

I'm currently developing a mobile game that can be recorded while playing. And microphone is need during the game.
So I want to record the game background music, the game sound effects ,and
human voice from microphone.
I can record all the sounds through microphone now. But I can not hear the background music and sound effects clearly after the record is finished.
So,I want to know If I can record all the game sounds internally. I googled a lot And I found AudioRecord can do that by set the audio source to REMOTE_SUBMIX. But this is not allowed by non-system app in android.
So, is there any way to record internal audio in Android?

audio record through ear phone in android?

I want to record user's singing for karaoke. I used audio recorder API of android to record audio. My requirement is to record only user's singing for karaoke, I do not want karaoke getting mixed with user's singing. So I used ear phone to listen to karaoke and record user's singing through ear phone. My problem is, in some of the device karoake gets mixed with users singing. Also audio quality is very bad. I'm using MIC audio source with 8000 frequency and channel in mono. I got little success with audio source camcoder but recorded audio is of low quality. Is there any way to improve audio quality? Also is camcoder is supported in all device? Is there any other way to record only users singing?. Your response will be helpful. Thank you.

Is there any way to select specific speaker for android device?

We are developing a VOIP application, there is one component which need to record the audio from mic, and play the remote audio to speaker. And we need to do some audio/signal processing for the recorded audio.
But on some android device, the selected mic and speaker is so near, the audio captured from MIC clipping (too loud) because of the audio played by speaker. This cause the captured audio waveform have nonlinear losses, and make the audio/signal processing component doesn't work.
We doesn't want to set AUDIO_STREAM_VOICE_CALL to enable build-in AEC, because it will make the recorded audio sample rate to be 8k while I'd like the recorded audio to be 48k.
So We have consider following solution:
Decrease the mic volume. Base on this SO question and this discussion thread, it seams impossible.
Using specific speaker and mic to make the distance a little bit far, so the mic captured audio volume is low.
So any way to select specific speaker on android platform?
If the distance between microphone and the speaker is crucial here maybe is would be enough to use camera's mic:
MediaRecorder.AudioSource.CAMCORDER

how to play a pre-recorded sound in speaker or mic during a call..?

Is this possible to play a pre-recorded sound in speaker or mic during a call.. so that other party could hear it?
Please refer to this first before reading through. The modem processor directly feeds from the mic and since there is not wiring between the app and modem processor, IMHO you cannot route the pre-recorded audio to the other end.
The other party can hear only what the microphone picks up. So, if you play a pre-recorded audio file while in a call on the speaker, and it is loud enough, the mic will pick up the audio and it will be heard at the other end. Not sure if echo cancellation will have an "adverse" effect in this case by eliminating the audio from the speaker.

Categories

Resources