1

In Android 4.0, I can implement the TextToSpeechService class to create a TTS engine. There is even an example TTS engine in the SDK to follow, which is really easy. However, I can't see any information on implementing a TTS engine on Android 2.3. What I want to achieve is like SVOX TTS engine.

Lacek
  • 1,595
  • 2
  • 11
  • 30
  • 1
    Check this SO qusetion [link](http://stackoverflow.com/questions/7223680/how-to-create-custom-text-to-speech-engine/12495672#12495672) – sinisha Jun 20 '13 at 08:36
  • @sinisha Thanks, the first link in the answer contains a [possible solution](https://groups.google.com/d/msg/tts-for-android/EzXyyqG7cvw/A5oLyQNeSYAJ), I will try it out to see if it works. – Lacek Jun 21 '13 at 09:50
  • New welcome. But don't forget to vote up the answer if it's helpful – sinisha Jun 21 '13 at 11:02

1 Answers1

3

The link provided by sinisha leads to a not very detailed solution by the author of a project called eyes-free. Then in the same project I found the author gave much complete instructions on how to implement the TTS engine.

In summary, what we need to do is:

  1. Implement the TtsEngine interface and compile it as libtts[NAME_OF_TTS_ENGINE_IN_LOWWER_CASE].so.
  2. Create a dummy Activity class, named as [NAME_OF_TTS_ENGINE_IN_UPPER_CAMEL_CASE].
  3. Bind the android.intent.action.START_TTS_ENGINE action intent to the class.

The Pico TTS Engine in the AOSP is an excellent example.

Lacek
  • 1,595
  • 2
  • 11
  • 30