Haya D
Haya D

Reputation: 407

How to use Android TTS in Arabic

My application implements the TextToSpeech.OnInitListener interface, and I'm trying to let it speak Arabic letters, but it seems that it doesn't support Arabic.

What should I do?

Here is the code that sets the language, but Arabic is not supported:

mTts = new TextToSpeech (this, this); 
mTts.setLanguage(Locale.US);

Upvotes: 4

Views: 6163

Answers (3)

Emad N.
Emad N.

Reputation: 50

To use Arabic language, You should use

mTts.setLanguage(Locale.forLanguageTag("ar"));

instead of the following line

mTts.setLanguage(Locale.US);

Upvotes: 0

Musharraf
Musharraf

Reputation: 61

The accepted answer is clearly outdated. The current version of Google TTS, as of Feb 2021, supports Arabic language.

Upvotes: 2

alanv
alanv

Reputation: 24114

Arabic is not supported by the default Google TTS engine. You will need to install a third-party TTS engine that supports Arabic such as eSpeak or SVOX Arabic.

Upvotes: 1

Related Questions