This addon was primarily developed for the Godot Accessibility addon, but should work well in other contexts where a Godot game might require text-to-speech.
Text-to-speech is complicated, and some features may not work everywhere. Most optional features have an associated boolean property used to determine if the feature is available. Further, while I do attempt to ensure that this addon works as well as possible on all platforms, there may be bugs, and pull requests are welcome. Known supported platforms include:
- Windows
- Screen readers via Tolk
- Native WinRT
- Linux via Speech Dispatcher
- HTML 5
- Android
Note that not all features are supported on all synthesizers. Any feature that may not be supported has a boolean property that can be checked to determine whether it works on the current platform.
- Speaking text, with interruption support on most platforms
- Stopping speech in progress
- Getting and setting speech rate in both native synthesizer units and percentages
- Detecting whether a screen reader is active
- Determining whether the synthesizer is speaking, and sending a signal on completion
The public-facing API is contained entirely within TTS.GD.
Download the latest release.
Godot's UWP export is currently broken. In order to use this addon in a UWP game, do the following:
- Export to UWP.
- Extract the newly-created .appx file with
makeappx unpack
. - If you've extracted the .appx file to a directory like _mygame_, copy addons\godot-tts\target\release\godot_tts.dll to mygame\game\addons\godot-tts\target\release\godot_tts.dll, creating the directory if it doesn't exist.
- Repack the appx using makeappx.
It should then be ready to sign and install. Hopefully Godot's UWP export will eventually copy GDNative DLLs correctly so this procedure isn't necessary.