#! | 42 lines | 30 code | 12 blank | 0 comment | 0 complexity | 14484eb42b5aed2158a1a4993558cce8 MD5 | raw file
1This directory contains all of the native code necessary for speech 2synthesis on Android. 3 4The external/espeak directory contains a port of espeak, a free tts engine. 5Very little is changed - a build file (Android.mk) is provided, wide 6characters are disabled, and a few advanced pthread features (not needed) 7are commented out. 8 9The frameworks/tts directory contains a C library and build files that 10create a JNI shared library allowing you to call espeak from Java. 11The corresponding Java class that works with this JNI code is found in 12the top-level of eyes-free in: tts/src/com/google/tts/SpeechSynthesis.java 13 14To compile the code here, you will need to download the latest Android 15source code from git - note that this is not the SDK, but the entire 16source package. See the instructions here: 17 18 http://source.android.com/download 19 20Follow the instructions and complete a full build of Android before 21proceeding. 22 23Copy external/espeak to the "external" directory in the Android source, copy frameworks/tts to the "frameworks" directory in the Android source, then create 24a java directory under frameworks/tts and copy SpeechSynthesis.java (from 25MY_SVN_DIRECTORY/tts/src/com/google/tts) into frameworks/tts/java. 26To recompile just those directories, assuming you have run 27"source build/envsetup.sh" in your bash shell, you an just type: 28 29 mmm external/espeak 30 31 mmm frameworks/tts 32 33When you're done, you'll get this file: 34 35 out/target/product/generic/system/lib/libspeechsynthesis.so 36 37Copy this file to tts/libs/armeabi. 38 39In order to make use of this file, you will need to make sure that libs/armeabi/libspeechsynthesis.so is copied into your apk before it is signed. 40As of the Cupcake SDK (SDK 1.5), any .so files under libs/armeabi will be 41picked up and packed automatically when building with the default ant scripts 42generated by the Android SDK.