文档https://developer.android.com/reference/android/speech/tts/TextToSpeech.html有一个方法setVoice(),我们可以在其中设置语音对象。谷歌文本到语音api setVoice()不可用
但是,当我在我的应用程序中创建一个TextToSpeech对象,我没有得到方法setVoice()。
TextToSpeech tts = tts = new TextToSpeech(this, this);
int result = tts.setLanguage(Locale.US); // I get this method
int result1 = tts.setVoice(); // I dont get this method.
您使用的是什么API级别? – Ash