Search code examples
androidaudiotext-to-speechaudio-streamingvoip

Android: Play soundfile or text-to-speech during phone call/SIP


is it possible in android to make a phone call or SIP call and play a soundfile after the call is established? Other option that would be ok for me is that after the established call the TTS engine reads some text so that the person on the other side could hear that. Is this possible?

Thanks!


Solution

  • If you mean played locally (i.e. only you can hear it), then sure. That should be working without using any special tricks.

    If you mean inject audio into the uplink so that the other party can hear it, then no - at least not during a normal voice call. Perhaps it would be possible during a SIP call if you implement the whole SIP stack yourself and generate the audio packets in your app. I'm not really familiar with how SIP calls works, so I can't say whether that would work or not.