Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows.

Implement TextServer word break method.
This commit is contained in:
bruvzg 2021-11-04 14:33:37 +02:00
parent 3e1b824c05
commit 6ab672d1ef
54 changed files with 3962 additions and 2 deletions

View file

@ -75,6 +75,7 @@ def get_opts():
BoolVariable("use_msan", "Use LLVM compiler memory sanitizer (MSAN)", False),
BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
BoolVariable("dbus", "Detect and use D-Bus to handle screensaver", True),
BoolVariable("speechd", "Detect and use Speech Dispatcher for Text-to-Speech support", True),
BoolVariable("udev", "Use udev for gamepad connection callbacks", True),
BoolVariable("x11", "Enable X11 display", True),
BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
@ -337,6 +338,13 @@ def configure(env):
else:
print("Warning: D-Bus development libraries not found. Disabling screensaver prevention.")
if env["speechd"]:
if os.system("pkg-config --exists speech-dispatcher") == 0: # 0 means found
env.Append(CPPDEFINES=["SPEECHD_ENABLED"])
env.ParseConfig("pkg-config speech-dispatcher --cflags") # Only cflags, we dlopen the library.
else:
print("Warning: Speech Dispatcher development libraries not found. Disabling Text-to-Speech support.")
if platform.system() == "Linux":
env.Append(CPPDEFINES=["JOYDEV_ENABLED"])
if env["udev"]: