Skip to content

In-game TTS

Ritchie Frodomar requested to merge work/ritchie/tts into devel

This merge request adds in-game support for speech synthesis (text-to-speech). Since adding system screen reader support would compromise gameplay in fast-paced scenarios, I opted not to do that. Instead, the game will allow you to read certain text elements aloud using in-game controls (likely, by middle-clicking text.)

This merge request just adds the low-level APIs needed for this. Particularly it adds the TextToSpeech static API to Ritchie's Toolbox, and a reference speech backend implementation for speechd (Speech Dispatcher daemon) for Linux.

There is no speech backend available for Windows yet. I don't have a Windows system handy and .NET is annoying about Windows platform-specific libraries, the moment I use one, I can no longer compile the game on Linux.

You can test the speech backend with the in-game say command in Terminal, just specify text to speak as command-line arguments - i.e say hello world to say "hello world."

Merge request reports