Issue
I am working on TTS (Text to Speech). And I want to get the list of supported voices, what should I do EXAMPLE:
private TextToSpeech t1;
t1 = new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
if (status != TextToSpeech.ERROR) {
t1.setLanguage(Locale.US);
}
}
});
t1.setLanguage(Locale.US);
Voice va=new Voice("en-gb-x-rjs#female_2-local",new
Locale("en","US"),400,200,true,a);
t1.setVoice(va);
String toSpeak = textTitle.getText().toString();
t1.speak(toSpeak, TextToSpeech.QUEUE_FLUSH, null);
I want have all list as
"en-gb-x-rjs#female_2-local"
Solution
As per doc
getVoices()
method from TextToSpeech
returns set of all the available voices.
Answered By - Kamal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.