I am trying to implement a pause and play function to some text using tts and MediaPlayer. However, I can\'t seem to be able to create a .wav file using the synthesizeToFile
The method synthesizeToFile
is asynchronous thus you should do the checking
File fileTTS = new File(destFileName);
if (fileTTS.exists()) {
Log.d(TAG, "successfully created fileTTS");
}
else {
Log.d(TAG, "failed while creating fileTTS");
}
in onUtteranceCompletedListener
or UtteranceProgressListener