Skip to content

Conversation

@torchipeppo
Copy link

@torchipeppo torchipeppo commented Jul 15, 2025

As promised, I am back with a rewritten version of the text-to-speech extension.

This now runs as a separate module that communicates with the rest of the runtime via tokio, resolving some inter-thread communication issues I had encountered with the earlier version.
This still relies on simple TTS backends such as Speech Dispatcher, favoring simplicity over fancy but heavy neural models. (The modular structure makes it easy for an interested person to use a different Rust library, if so desired. Speech Dispatcher on Linux is also extensible with more advanced voice engines installed on the user's system.)

What has currently been implemented:

  • TTS for penalties, goals and set plays (including ball free)
  • Press M to toggle TTS
  • Hold Spacebar for "Hold Mode": TTS messages that would be spoken while Space is held are silently queued up, and they are uttered once the key is released.
  • Launcher settings for deciding whether TTS starts on or off, and for choosing a voice.

Compilation on Linux requires the development headers for Speech Dispatcher (listed on APT as libspeechd-dev, I assume they'll be on other package managers as well).
A compiled Linux build has no extra requirements to run, compared to the "normal" GC.

The tts crate description says it is compatible with other text-to-speech backends on other operating systems, so this should work on Windows or Mac with a different setup rather than Speech Dispatcher in theory, but I don't know any specifics as I haven't tested any other OS yet.
Also, note that this branch adds the tts crate as a dependency, which should be automatically taken care of by cargo when compiling.

This pull request and the associated branch on my fork repo count as the code release for the corresponding RoboCup 2025 Open Research Challenge entry.

Thanking Arne Hasselbring for the idea of making a separate module
that communicates via tokio.
What I can do as a novice is still limited, but this should make it
easier to apply improvements later on.

This version uses a basic TTS library that interface with common
screen readers on multiple platforms (e.g. Speech Dispatcher).
HOLD mode will delay all messages while Spacebar is pressed
until Spacebar is released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant