Question

I am working on project in which I need voice into urdu. So any one can tell me how I can change this voice? Thanks

public void onInit(int status) {
xy.setPitch(1);
if (status == TextToSpeech.SUCCESS)
    xy.speak("this is text to speech in engish" +
            "           ", TextToSpeech.QUEUE_ADD, null);}
Was it helpful?

Solution

It is either:

tts.setLanguage(new Locale("ur"));

Or:

tts.setLanguage(new Locale("urd"));

Used this link to find out.

OTHER TIPS

there are two option to do that. 1- goto androd setting and change your language to URDU 2- tts.setLanguage(new Local("urd"));

t1=new TextToSpeech ( getApplicationContext (), new TextToSpeech.OnInitListener () { @Override public void onInit(int status) { if(status != TextToSpeech.ERROR) {

                t1.setLanguage(new Locale("ur"));
            }**strong text**
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top