diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-06-25 13:22:57 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-06-25 13:22:57 -0700 |
commit | 78fb3775ee20c48980a3cfe00b8a7263422158d0 (patch) | |
tree | dda3d5e3e45b5c70a75275a3ead3446ad23fd30e | |
parent | c6f36ed547e7f480ea2484cc378698d4205b3155 (diff) | |
parent | aaf842edbfe76990413d4c002acb394f855321b5 (diff) | |
download | frameworks_base-78fb3775ee20c48980a3cfe00b8a7263422158d0.zip frameworks_base-78fb3775ee20c48980a3cfe00b8a7263422158d0.tar.gz frameworks_base-78fb3775ee20c48980a3cfe00b8a7263422158d0.tar.bz2 |
Merge change 5385 into donut
* changes:
Updating the TextToSpeech.java with skeleton methods.
-rwxr-xr-x | core/java/android/speech/tts/TextToSpeech.java | 80 |
1 files changed, 66 insertions, 14 deletions
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java index c064284..bc016a7 100755 --- a/core/java/android/speech/tts/TextToSpeech.java +++ b/core/java/android/speech/tts/TextToSpeech.java @@ -46,10 +46,6 @@ public class TextToSpeech { * Denotes a generic operation failure. */ public static final int TTS_ERROR = -1; - /** - * Denotes a failure due to a missing resource. - */ - public static final int TTS_ERROR_MISSING_RESOURCE = -2; /** * Queue mode where all entries in the playback queue (media to be played @@ -61,6 +57,39 @@ public class TextToSpeech { */ public static final int TTS_QUEUE_ADD = 1; + + /** + * Denotes the language is available exactly as specified by the locale + */ + public static final int TTS_LANG_COUNTRY_VAR_AVAILABLE = 2; + + + /** + * Denotes the language is available for the language and country specified + * by the locale, but not the variant. + */ + public static final int TTS_LANG_COUNTRY_AVAILABLE = 1; + + + /** + * Denotes the language is available for the language by the locale, + * but not the country and variant. + */ + public static final int TTS_LANG_AVAILABLE = 0; + + /** + * Denotes the language data is missing. + */ + public static final int TTS_LANG_MISSING_DATA = -1; + + /** + * Denotes the language is not supported by the current TTS engine. + */ + public static final int TTS_LANG_NOT_SUPPORTED = -2; + + + + /** * Called when the TTS has initialized. * @@ -141,16 +170,6 @@ public class TextToSpeech { } - private boolean dataFilesCheck() { - // TODO #TTS# config manager will be in settings - Log.i("TTS_FIXME", "FIXME in Tts: config manager will be in settings"); - // TODO #TTS# implement checking of the correct installation of - // the data files. - - return true; - } - - private void initTts() { mStarted = false; @@ -353,6 +372,27 @@ public class TextToSpeech { /** + * Speaks the IPA string using the specified queuing strategy and speech + * parameters. Note that the speech parameters are not universally supported + * by all engines and will be treated as a hint. The TTS library will try to + * fulfill these parameters as much as possible, but there is no guarantee + * that the voice used will have the properties specified. + * + * @param ipaText + * The string of IPA text to be spoken. + * @param queueMode + * The queuing strategy to use. + * See TTS_QUEUE_ADD and TTS_QUEUE_FLUSH. + * @param params + * The hashmap of speech parameters to be used. + */ + public void speakIpa(String ipaText, int queueMode, HashMap<String,String> params) + { + //TODO: Implement speakIpa + } + + + /** * Plays the earcon using the specified queueing mode and parameters. * * @param earcon @@ -537,6 +577,18 @@ public class TextToSpeech { } } + /** + * Checks if the specified language as represented by the locale is available. + * + * @param loc + * The locale describing the language to be used. + */ + public int isLanguageAvailable(Locale loc) { + //TODO: Implement isLanguageAvailable + return 0; + } + + /** * Speaks the given text using the specified queueing mode and parameters. |