Saturday, 17 August 2013

Check if a TextToSpeech object can say a string

Check if a TextToSpeech object can say a string

Is there a way to check if a specific TextToSpeech object can say a
certain String?
For example, a tts object that was init with Locale.US can say: "Hello World"
But if the String had non English letters, it would skip them.
Is there a way to ask tts if he can say an entire String?
*I know I can use regular expression to check if a string is in English,
but I am looking for a more generic solution to support other locales.

No comments:

Post a Comment