3
我實現谷歌翻譯similator到我的應用程序
如何實現這個應用前 一些類似的源地址或相關的谷歌API的請轉發一些想法先感謝如何實現的翻譯一種語言到另一種語言的機器人
screenshot of this app
http://www.freeimagehosting.net/uploads/73620ad386.png
input:
from any language <-----translate----------->to any language
output:
translation of text and voice of translate text
this app same as google translator
checkIntent.setAction(TextToSpeech.Engine.ACTION_CHECK_TTS_DATA);
startActivityForResult(checkIntent,1);
private TextToSpeech mTts;
protected void onActivityResult(
int requestCode, int resultCode, Intent data) {
if (requestCode == 1) {
if (resultCode == TextToSpeech.Engine.CHECK_VOICE_DATA_PASS) {
// success, create the TTS instance
mTts = new TextToSpeech(this, null);
} else {
// missing data, install it
Intent installIntent = new Intent();
installIntent.setAction(
TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);
startActivity(installIntent);
}
}
mTts.setLanguage(Locale.US);
其確定我使用谷歌API翻譯文本將完成,但聲音的轉換不工作,這是我的情況將在2天嘗試,但沒有解決我上面我一些源代碼forawrd請提出了一些有價值的解決方案提前感謝 – Narasimha 2010-11-11 07:25:39