문제

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);}
도움이 되었습니까?

해결책

It is either:

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

Or:

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

Used this link to find out.

다른 팁

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**
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top