我正在为我的应用实施谷歌翻译兼容器 怎么能实现这个应用程序的一些想法 一些类似的源URL或相关的谷歌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);