mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-11-23 10:45:56 +00:00
Best guess at Android implementation
This commit is contained in:
parent
2537d27886
commit
bf2afec4b3
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user