
macOS (AVSpeech on 10.14+ / NSSpeech on older versions), implemented and tested (on M1 macOS and x86_64 via Rosetta).Windows (SAPI), implemented and tested (on Windows 11).
Linux (speech-dispatcher), implemented and tested (on x86_64 Fedora 35, arm64 Ubuntu 21.10). Android, implemented and tested (on Android 11 / Poco F3). boundary, callback function take two int parameters, the char_index and utterance_id passed to tts_speak.Īlso added ICU backed TextServer.string_get_word_breaks(text, language) required to add index marks at the word breaks. started, ended, canceled/failed, callback function take one int parameter, the utterance_id passed to tts_speak. void DisplayServer.tts_set_utterance_callback(event, callable) - adds a callback for the specific utterance event:. void DisplayServer.tts_speak(text, voice_id, volume, pitch, rate, utterance_id, interrupt) - asynchronous, adds utterance with the specified parameters to the queue. PackedStringArray DisplayServer.tts_get_voices_for_language(language) - returns array of voice IDs for the language. Array DisplayServer.tts_get_voices() - voice/language enumeration, returns Array of Dictionaries with following key-value pairs "name":String, "id":String, "language":String.
Thanks to LGPL dependency on Linux is loaded dynamically (the same way other LGPL libs are linked: asoundlib, pulseaudio and udev), on other platforms TTS is part of the core system API.