List of usage examples for android.speech.tts TextToSpeech getFeatures
@Deprecated public Set<String> getFeatures(final Locale locale)
From source file:Main.java
/** * Returns whether speech synthesis using a specific language on the * specified TTS requires a network connection. * * @param tts The TTS engine to check./*from www . j a va 2 s . c o m*/ * @param language The language to check. * @return {@code true} if the language requires a network connection. */ public static boolean isNetworkRequiredForSynthesis(TextToSpeech tts, Locale language) { final Set<String> features = tts.getFeatures(language); return features.contains(Engine.KEY_FEATURE_NETWORK_SYNTHESIS) && !features.contains(Engine.KEY_FEATURE_EMBEDDED_SYNTHESIS); }