Android TTS 男女变声
我正在与 TTS 合作。
但我需要将 tts 的声音从女性更改为男性,反之亦然。
我知道我可以通过 eSpeak 做到这一点。但问题是。在设置页面中,当我选择 eSpeak TTS 时,声音变为男性,当我选择 Pico TTS 时,声音变为女性。 但是,当在设置页面中更改引擎后,当我尝试更改语音并尝试在我的应用程序中使用更改后的语音时,它只用男性声音说话。
我从 http://eyes-free.googlecode.com/svn 下载第三方应用/trunk/tts/
然后在我的应用程序的 MainActivity 中执行以下操作,
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 );
}
}
});
但我想做的是不进入 TextToSpeech 设置页面,仅更改我想更改语音的男性/女性按钮用于 TTS。
请帮助我这样做。我已经尝试过很多次了。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然,您无法从 Android TTS 上的默认女声切换,您需要使用另一个引擎。 iSpeech 和 Nuance 拥有非常好的引擎并支持男性和女性声音。
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.