/native/README

http://eyes-free.googlecode.com/ · #! · 42 lines · 30 code · 12 blank · 0 comment · 0 complexity · 14484eb42b5aed2158a1a4993558cce8 MD5 · raw file

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