termux / termux-api

Termux add-on app which exposes device functionality as API to command line programs.
https://f-droid.org/en/packages/com.termux.api/
2.3k stars 454 forks source link

termux-tts-speak heard by other party during phone call #144

Open mayureshw opened 6 years ago

mayureshw commented 6 years ago

On two phones, both running android 6.x, this behavior is different.

On phone 1, if termux-tts-speak overlaps with a call, I hear it locally but the remote party doesn't hear it. This behavior is desirable for my purpose.

On phone 2, under the same scenario, remote party gets to hear whatever I hear from tts locally, which is undesirable for my purpose.

Speech engine in use is Google TTS.

I tried using all -s options of termux-tts-speak on phone 2 which did not help. Either the behavior doesn't change or the sound doesn't play at all.

Would appreciate help with any workaround at either android settings or tts engine or at termux api level.

mayureshw commented 6 years ago

As a workaround I dump an audio file (wav or mp3) using espeak and then play it using vlc using am command on termux. vlc co-operates better with phone app in terms of pausing / resuming what it is playing or at least not letting the other party hear it. But I don't get the quality of sound that I was able to get with Google TTS via termux-tts-speak.