Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting a TTS job externally through adb. #33

Open
sweetbbak opened this issue Jun 26, 2023 · 3 comments
Open

Starting a TTS job externally through adb. #33

sweetbbak opened this issue Jun 26, 2023 · 3 comments

Comments

@sweetbbak
Copy link

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

@drmfinlay
Copy link
Owner

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.

@sweetbbak
Copy link
Author

Thank you so much! That is perfect

@drmfinlay
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants