drmfinlay / tts-util-app

TTS Util — Text-to-speech utility Android app for synthesising text into audible speech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Starting a TTS job externally through adb.

sweetbbak opened this issue · comments

commented

Would it be possible to pass text to TTS Util using adb and an intent? I'm just curious because I'm using Waydroid on Linux and I'm exploring options to pass text to Waydroid in various ways. There's not a lot that can easily be done because everything under Waydroid is owned by Root. Port forwarding could work but then I can't pause TTS playback. It would be nice to use ADB to pass text to tts util.

Thank you for your work, I get a lot of use and enjoyment out of it while I listen to novels all day and night lol

Hello @sweetbbak,

Thank you for opening this issue. It is already possible to instruct TTS Util to read text using ADB. However, it is not ideal. You can try it with the following incantation:

adb shell am start -n com.danefinlay.ttsutil/.ui.TextActionActivity -a android.intent.action.SEND -e android.intent.extra.TEXT 'Hello from the Android Debug Bridge.'

This results in the device quickly switching to and from a blank activity which enqueues the text for playback and exits. It doesn't look very nice. I'll see if I can add a nicer way of allowing this and document it somewhere.

commented

Thank you so much! That is perfect

No worries! I have figured out a nicer way that uses the activity manager (am) broadcast command instead of start. It requires some changes though. Should be possible in the next version.