これを試してください:
TextToSpeech mTextToSpeech = new TextToSpeech(this,new TextToSpeech.OnInitListener()
{
@Override
public void onInit(int status)
{
// TODO Auto-generated method stub
if(status == TextToSpeech.SUCCESS)
{
// set language
int supported = mTextToSpeech.setLanguage(Locale.US);
if((supported != TextToSpeech.LANG_AVAILABLE)&&(supported != TextToSpeech.LANG_COUNTRY_AVAILABLE))
{
displayToast("dont support current language");
}
}
}
});
// start to speak
mTextToSpeech.speak("A for Apple", TextToSpeech.QUEUE_FLUSH, null);
// store your voice to file
int r = mTextToSpeech.synthesizeToFile(mEditText.getText().toString(), null, "/mnt/sdcard/speak.wav");
if(r == TextToSpeech.SUCCESS) displayToast("save success!");