1

Can I synthesize arbitrary text strings with TTS from the Android's console?

To give the idea, on Debian I would do:

festival --tts <(echo Buongiorno signore)

The TTS engine needs to be always available and run offline, thus Google TTS is not an option. The phone is a "Samsung Galaxy Fame gt-s6810p" with Android 4.1.2; it comes with an offline Samsung TTS engine installed.

1

I normally run android tts from android terminal, just the way on linux.

I achieve this with sl4a & Python4Android (github.com/kuri65536/python-for-android/releases). Here is the wrapper script that I use for python environment in terminal.

Just Create a python program using sl4a tts api, like this ::

`#!/system/bin/py  # Change the Path to wrapper script

 import android
 import sys

 droid = android.Android()

 print 'Speaking ::' + sys.argv[1]
 droid.ttsSpeak(sys.argv[1])

`

Save as tts. Run it in terminal with your text as argument.

tts 'Hello, It's me TTS , running from console.'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.