I actually figured out how to make multiple languages work in this extension, but that's a bit complicated to explain In short, you need to add a new argument (stirng) to textToSpeech_play then you have to replace the textToSpeech_play function in Java by this :
public void textToSpeech_play(final String text,String LOCALE){
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
the extension is not working in my gamemaker
Hi, how can i change language? I would like set Italian language
I actually figured out how to make multiple languages work in this extension, but that's a bit complicated to explain
In short, you need to add a new argument (stirng) to textToSpeech_play then you have to replace the textToSpeech_play function in Java by this :
public void textToSpeech_play(final String text,String LOCALE){
String toSpeak = text;
Locale locale2 = new Locale(LOCALE);
t1.setLanguage(locale2);
t1.speak(toSpeak, TextToSpeech.QUEUE_FLUSH, null);
}
Next you'll use this :