If TTS not supporting Kannada Language, how to play the text in Kannada?

1.1k Views Asked by At

I am trying to set Text to speech object language as Kannada. below is code where i am setting the language whose language code is kn as per the documentation. But somehow i m getting the error message as language not supported

int result = tts.setLanguage(new Locale("kn", "IN"));
        if (result == TextToSpeech.LANG_MISSING_DATA || result == TextToSpeech.LANG_NOT_SUPPORTED) {
            Log.e("TTS", "This Language is not supported");
            result = tts.setLanguage(Locale.US);

            if (result == TextToSpeech.LANG_MISSING_DATA || result == TextToSpeech.LANG_NOT_SUPPORTED) {
                result = tts.setLanguage(Locale.ENGLISH);

            }

        }

Please suggest What are the approaches for the playing this text in kannada language or any other language. If any api will provide it it will help me alot

0

There are 0 best solutions below