List of usage examples for android.speech.tts TextToSpeech synthesizeToFile
@Deprecated public int synthesizeToFile(final String text, final HashMap<String, String> params, final String filename)
From source file:ca.rmen.android.poetassistant.PoemAudioExport.java
private void speakToFile4(TextToSpeech textToSpeech, String text, File audioFile) { HashMap<String, String> params = new HashMap<>(); params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, TEMP_AUDIO_FILE); //noinspection deprecation textToSpeech.synthesizeToFile(text, params, audioFile.getAbsolutePath()); }