diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-14 17:43:58 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-14 17:43:58 -0700 |
commit | 211aef308bc6ca55d99777d19227f412492db9c2 (patch) | |
tree | 76375dcb2696420b81c8f1c97d27e5cc8a4b302c /core/java | |
parent | 4c3a589e8e4efbd6f4c5e63bd94cb6181f189b7d (diff) | |
parent | 62253a319d6359ce71c547d0b0aa36ba17789ab4 (diff) | |
download | frameworks_base-211aef308bc6ca55d99777d19227f412492db9c2.zip frameworks_base-211aef308bc6ca55d99777d19227f412492db9c2.tar.gz frameworks_base-211aef308bc6ca55d99777d19227f412492db9c2.tar.bz2 |
Merge change 7134 into donut
* changes:
Unhide required definitions in TextToSpeech.Engine that cover return codes and extras for android.intent.action.CHECK_TTS_DATA intent, and the key values for the parameter hashmap that can be passed by an application in speak(), synthesizeToFile(), playSilence() and playEarcon().
Diffstat (limited to 'core/java')
-rwxr-xr-x | core/java/android/speech/tts/TextToSpeech.java | 94 |
1 files changed, 91 insertions, 3 deletions
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java index a2e70b8..db9f8d8 100755 --- a/core/java/android/speech/tts/TextToSpeech.java +++ b/core/java/android/speech/tts/TextToSpeech.java @@ -113,43 +113,131 @@ public class TextToSpeech { /** * Internal constants for the TTS functionality * - * {@hide} */ public class Engine { // default values for a TTS engine when settings are not found in the provider + /** + * {@hide} + */ public static final int FALLBACK_TTS_DEFAULT_RATE = 100; // 1x + /** + * {@hide} + */ public static final int FALLBACK_TTS_DEFAULT_PITCH = 100;// 1x + /** + * {@hide} + */ public static final int FALLBACK_TTS_USE_DEFAULTS = 0; // false + /** + * {@hide} + */ public static final String FALLBACK_TTS_DEFAULT_SYNTH = "com.svox.pico"; // default values for rendering public static final int TTS_DEFAULT_STREAM = AudioManager.STREAM_MUSIC; // return codes for a TTS engine's check data activity + /** + * Indicates success when checking the installation status of the resources used by the + * text-to-speech engine with the android.intent.action.CHECK_TTS_DATA intent. + */ public static final int CHECK_VOICE_DATA_PASS = 1; + /** + * Indicates failure when checking the installation status of the resources used by the + * text-to-speech engine with the android.intent.action.CHECK_TTS_DATA intent. + */ public static final int CHECK_VOICE_DATA_FAIL = 0; + /** + * Indicates erroneous data when checking the installation status of the resources used by + * the text-to-speech engine with the android.intent.action.CHECK_TTS_DATA intent. + */ public static final int CHECK_VOICE_DATA_BAD_DATA = -1; + /** + * Indicates missing resources when checking the installation status of the resources used + * by the text-to-speech engine with the android.intent.action.CHECK_TTS_DATA intent. + */ public static final int CHECK_VOICE_DATA_MISSING_DATA = -2; - public static final int CHECK_VOICE_DATA_MISSING_DATA_NO_SDCARD = -3; + /** + * Indicates missing storage volume when checking the installation status of the resources + * used by the text-to-speech engine with the android.intent.action.CHECK_TTS_DATA intent. + */ + public static final int CHECK_VOICE_DATA_MISSING_VOLUME = -3; // return codes for a TTS engine's check data activity + /** + * Extra information received with the android.intent.action.CHECK_TTS_DATA intent where + * the text-to-speech engine specifies the path to its resources. + */ public static final String VOICE_DATA_ROOT_DIRECTORY = "dataRoot"; + /** + * Extra information received with the android.intent.action.CHECK_TTS_DATA intent where + * the text-to-speech engine specifies the file names of its resources under the + * resource path. + */ public static final String VOICE_DATA_FILES = "dataFiles"; + /** + * Extra information received with the android.intent.action.CHECK_TTS_DATA intent where + * the text-to-speech engine specifies the locale associated with each resource file. + */ public static final String VOICE_DATA_FILES_INFO = "dataFilesInfo"; - // keys for the parameters passed with speak commands + // keys for the parameters passed with speak commands. Hidden keys are used internally + // to maintain engine state for each TextToSpeech instance. + /** + * {@hide} + */ public static final String TTS_KEY_PARAM_RATE = "rate"; + /** + * {@hide} + */ public static final String TTS_KEY_PARAM_LANGUAGE = "language"; + /** + * {@hide} + */ public static final String TTS_KEY_PARAM_COUNTRY = "country"; + /** + * {@hide} + */ public static final String TTS_KEY_PARAM_VARIANT = "variant"; + /** + * Parameter key to specify the audio stream type to be used when speaking text + * or playing back a file. + */ public static final String TTS_KEY_PARAM_STREAM = "streamType"; + /** + * Parameter key to identify an utterance in the completion listener after text has been + * spoken, a file has been played back or a silence duration has elapsed. + */ public static final String TTS_KEY_PARAM_UTTERANCE_ID = "utteranceId"; + + // key positions in the array of cached parameters + /** + * {@hide} + */ protected static final int TTS_PARAM_POSITION_RATE = 0; + /** + * {@hide} + */ protected static final int TTS_PARAM_POSITION_LANGUAGE = 2; + /** + * {@hide} + */ protected static final int TTS_PARAM_POSITION_COUNTRY = 4; + /** + * {@hide} + */ protected static final int TTS_PARAM_POSITION_VARIANT = 6; + /** + * {@hide} + */ protected static final int TTS_PARAM_POSITION_STREAM = 8; + /** + * {@hide} + */ protected static final int TTS_PARAM_POSITION_UTTERANCE_ID = 10; + /** + * {@hide} + */ protected static final int TTS_NB_CACHED_PARAMS = 6; } |