summaryrefslogtreecommitdiffstats
path: root/packages/TtsService
diff options
context:
space:
mode:
authorCharles Chen <clchen@google.com>2009-11-18 16:34:32 -0800
committerCharles Chen <clchen@google.com>2009-11-19 12:02:55 -0800
commitb4fbe768f8bfb2550dec100e29d0edc09b8a051a (patch)
tree18194b4d5a51811eed25bf0a37ce553fcac2ad06 /packages/TtsService
parent6d5d55c103a9816ed6c3873f72ae814afb7ddd4c (diff)
downloadframeworks_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-xpackages/TtsService/src/android/tts/TtsService.java11
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);
+ }
+
};
}