Android TTS Male Female Voice Change

不羁的心 提交于 2019-12-06 02:05:09

问题


I am working with TTS.

But i need to change the voice of the tts from female to male and vice versa.

I know i can do it by eSpeak. But problem is that. In the setting page when i select the eSpeak TTS the voice changes to male and when i choose the Pico TTS the voice turns to female. But when after changing the engine in the setting page when i try to change the voice and try to use that changed voice in my app it only speaks in male voice.

I download the third party app from http://eyes-free.googlecode.com/svn/trunk/tts/

Then in my app's MainActivity i do the below,

    editText = (EditText) findViewById(R.id.EditText01);

    Button speak = (Button) findViewById(R.id.SpeakButton);
    speak.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            // TODO Auto-generated method stub

            if(editText.getText().toString().equalsIgnoreCase(""))
                startActivity(new Intent(Main.this, ConfigurationManager.class));
            else {
                tts = new TTS(Main.this, ttsInitListener, true );
            }

        }

    });

But what i am trying to do is without entering to the TextToSpeech Setting page, only changing a male/female button i want to change the voice for TTS.

Please help me to do so. I have tried lots of times.


回答1:


Apparently you can not switch from the default female voice on the android TTS you will need to use another engine. iSpeech and Nuance have really good engines and support male and female voices.



来源:https://stackoverflow.com/questions/8890911/android-tts-male-female-voice-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!