Play audio file as microphone input into Android app - android

How can I play an audio file as a microphone input into an Android app? I want the Android app to think this audio is coming from the mic.

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.

ANDROID: Play an audio after recieving call

I am making an android application in which I have to answer the call and then I want to play pre-recorded audio so that the person calling will hear this.
Is there any API or any library which can I use for this?
Can we do it through text-to-speech ?
Thank you
It is not possible to play audio during call in Android device.
Note: You can play back the audio data only to the standard output
device. Currently, that is the mobile device speaker or a Bluetooth
headset. You cannot play sound files in the conversation audio during
a call.
Link to android documentation
https://developer.android.com/guide/topics/media/mediaplayer
For more information
How to play an audio file on a voice call in android

How to record live streaming audiofrom url in Android

I am creating an online radio application. In the app we have an option to record the audio.
I did this using device MIC. But it captures the noise. Is it possible to record audio from streaming url?

Android voice recognition another audio source

Is it possible to use android voice recognition from another audio source (then the microphone) such as file or the audio coming from the device itself?

How to play MP3 files into the microphone input

In a chat session, whenever I want the other person to hear a pre-recorded voice, I need to play it on my speakers and use my microphone to capture it. How can I play MP3 files into the microphone input so that whenever I do a voice chat I could play the MP3 file in such a way that I am speaking through the microphone itself?

Categories

Resources