When using assistive technology like TalkBack and not accessing either the eSpeak application or the Android TTS settings directly, the voice data would previously not be installed/upgraded correctly. The approach here is to move the logic to onIsLanguageAvailable so that if the espeak voice data is not installed or is upgradable then trigger an install of the voice data and return TextToSpeech.LANG_MISSING_DATA.
Android Port of eSpeak Text-to-Speech
This branch contains the files needed to build espeak on the android platform. It is derived from the eyes-free project.
Prerequisits
To build eSpeak for Android, you need to have the following installed and configured correctly:
- Android SDK
- Android NDK
- Eclipse
- Android Developer Tools (ADT) for Eclipse
- wxWidgets 2.8 (for espeakedit if building the
espeak-datazip files)
Fetching the Sources
The Android port uses the ucd-tools submodule. You can fetch this by running:
$ git submodule init
$ git submodule update
Building
-
Build the
libttsespeak.sofile by running:$ cd android $ ndk-build -
Open Eclipse.
-
Create a new workspace.
-
Import the espeak folder as an exising Android project.
-
Build the espeak apk within Eclipse.
In order to build the espeakdata.zip file in android/res/raw, you need to run the following commands:
$ ./autogen.sh
$ ./configure --prefix=/usr
$ make android
Installing
The generated eSpeakActivity.apk can be installed like any other apk build
via eclipse, such as by using the Run menu option.
After running, eSpeakActivity will extract the espeakdata.zip file into its
own data directory to set up the available voices.
To enable eSpeak, you need to:
- go into the Android
Text-to-Speech settingsUI; - enable
eSpeak TTSin theEnginessection; - select
eSpeak TTSas the default engine; - use the
Listen to an exampleoption to check if everything is working.