To Connect Audio Generator to Phone Call? I know that you cannot play music to your phone call without hacking the code as discussed here but I would like to connect an audio generator to a phone call. 
This approach should be simpler because I have the synthesizer code myself. 
Assume the code can be run in real-time with only a little tau time-lag so fits very well in such an application. 
I am not sure how you can reach an real-time access from your keyboard to your phone call. 

Cases where the feature is needed


Sometimes, I am in a library where I cannot talk and I cannot move without disturbing my work. 
However, I could easily type to the caller such that the text would be converted to speech in real-time. 
Person with a disability that he cannot speak but only type. People are calling him, but currently, he cannot provide discussions because of restrictions and little understanding about the tech.


I am using Samsung Galaxy S4 GT-i9506 with CyanogenMod 13 (Android 6.0). 
So I want 


Type with your Laptop or Bluetooth keyboard connected to your phone. 
Synthesize the typed text in real time to the phone conversation. 


How can you connect audio generator to your phone call?
As you've already said you don't mind typing on your laptop to achieve this, it's perfectly possible. Just use any text-to-speech system on your laptop (Windows has one built-in, and you can buy/download extra voices for it), and make it output to your laptop's headphone jack. Then you need an adapter cable to connect the headphone output of the laptop to the handsfree kit of your phone. Alternatively, you can use your PC as a Bluetooth headset for your phone instead of using a tangible cable.

Note that this technique isn't specific to Android at all: it would work just the same with an iPhone or even a 'dumbphone'.



Doing it on the device might not be possible, even with a custom ROM. My answer here about recording calls explains why not all phones can do this: often, the phone call audio goes directly from the Bluetooth interface or speaker/mic to the mobile baseband, so the application processor has no way to send other audio to it (or to intercept the received audio).