Search code examples
javaandroidfileaudiomicrophone

How to play audio files to microphone input


I was wondering how could I achieve a call chat between me and some other person which the other person does not hear me talk but rather the audio file.

Let's say I own an audio file which contains a voice that says "Hello", he will hear that instead of my voice.

Thank you in advanced.


Solution

  • Short answer: NO, this is not possible,

    this is clearly explained in the android developer web:

    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.

    the reason why, is not explained in the android web but it must be for sure to avoid criminal actions.