diff options
author | Charles Chen <clchen@google.com> | 2009-11-18 16:34:32 -0800 |
---|---|---|
committer | Charles Chen <clchen@google.com> | 2009-11-19 12:02:55 -0800 |
commit | b4fbe768f8bfb2550dec100e29d0edc09b8a051a (patch) | |
tree | 18194b4d5a51811eed25bf0a37ce553fcac2ad06 /packages/TtsService | |
parent | 6d5d55c103a9816ed6c3873f72ae814afb7ddd4c (diff) | |
download | frameworks_base-b4fbe768f8bfb2550dec100e29d0edc09b8a051a.zip frameworks_base-b4fbe768f8bfb2550dec100e29d0edc09b8a051a.tar.gz frameworks_base-b4fbe768f8bfb2550dec100e29d0edc09b8a051a.tar.bz2 |
Adding the ability to specify the speech synthesis
engine to use for text-to-speech.
Diffstat (limited to 'packages/TtsService')
-rwxr-xr-x | packages/TtsService/src/android/tts/TtsService.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/TtsService/src/android/tts/TtsService.java b/packages/TtsService/src/android/tts/TtsService.java index c816a21..8d8ef8e 100755 --- a/packages/TtsService/src/android/tts/TtsService.java +++ b/packages/TtsService/src/android/tts/TtsService.java @@ -1326,6 +1326,17 @@ public class TtsService extends Service implements OnCompletionListener { return mSelf.synthesizeToFile(callingApp, text, speakingParams, filename); } + /** + * Sets the speech synthesis engine for the TTS by specifying its packagename + * + * @param packageName the packageName of the speech synthesis engine (ie, "com.svox.pico") + * + * @return SUCCESS or ERROR as defined in android.speech.tts.TextToSpeech. + */ + public int setEngineByPackageName(String packageName) {
+ return mSelf.setEngine(packageName);
+ } + }; } |