Best guess at Android implementation

This commit is contained in:
Dylan Jaide White 2022-03-12 21:25:53 +00:00
parent 2537d27886
commit bf2afec4b3

View File

@ -18,6 +18,7 @@ import android.view.accessibility.AccessibilityManager;
public class TTS extends GodotPlugin implements TextToSpeech.OnInitListener {
private TextToSpeech tts = null;
private float volume = 1f;
private float rate = 1f;
private Integer utteranceId = 0;
@ -36,6 +37,15 @@ public class TTS extends GodotPlugin implements TextToSpeech.OnInitListener {
tts.stop();
}
public float get_volume() {
return this.volume;
}
public void set_volume(float volume) {
this.volume = volume;
tts.Engine.KEY_PARAM_VOLUME = volume;
}
public float get_rate() {
return this.rate;
}