1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Merge pull request #61316 from bruvzg/tts_3x

[3.x] Backport text-to-speech support.
This commit is contained in:
Rémi Verschelde
2022-08-05 23:45:51 +02:00
committed by GitHub
45 changed files with 3905 additions and 2 deletions

View File

@@ -52,6 +52,7 @@
#include "java_godot_io_wrapper.h"
#include "java_godot_wrapper.h"
#include "tts_android.h"
const char *OS_Android::ANDROID_EXEC_PATH = "apk";
@@ -81,6 +82,34 @@ public:
virtual ~AndroidLogger() {}
};
bool OS_Android::tts_is_speaking() const {
return TTS_Android::is_speaking();
}
bool OS_Android::tts_is_paused() const {
return TTS_Android::is_paused();
}
Array OS_Android::tts_get_voices() const {
return TTS_Android::get_voices();
}
void OS_Android::tts_speak(const String &p_text, const String &p_voice, int p_volume, float p_pitch, float p_rate, int p_utterance_id, bool p_interrupt) {
TTS_Android::speak(p_text, p_voice, p_volume, p_pitch, p_rate, p_utterance_id, p_interrupt);
}
void OS_Android::tts_pause() {
TTS_Android::pause();
}
void OS_Android::tts_resume() {
TTS_Android::resume();
}
void OS_Android::tts_stop() {
TTS_Android::stop();
}
int OS_Android::get_video_driver_count() const {
return 2;
}