Sorry for the text wall ahead...
Context: I'm attempting to build a one-way bridge between
#SpeechDispatcher on
#Linux and
#MicrosoftSAPI on
#Windows, so that SAPI voices can be used as speech-dispatcher voices on Linux, with SAPI powered by wine.
So, after attempting to write a speech-dispatcher output module in Python and quickly becoming frustrated because speech-dispatcher completely hangs after parsing the first speak command despite doing everything correctly, so I have to kill speech-dispatcher to get speech back up, and the logs are useless, I decided to use the very useful generic output module and just have that one interface with some kind of command line app that does all the work.
Making that process performant enough to have the voices good enough to be used with a screenreader would be difficult; I'm already thinking about how I would do everything to be as not laggy as possible:
Some kind of a local socket or web server running in wine that returns audio data of spoken text that aplay or something plays? I honestly don't know. I don't want to start a command in wine to speak every single text because there's a lot of overhead for initializing speech every time + the overhead of starting something with wine... Having a socket or a webserver to which a linux client can simply send a request is much faster because there is no need to reinitialize anything — just speak the text. I honestly don't know.
To understand what I'm talking about:
https://htmlpreview.github.io/?https://github.com/brailcom/speechd/blob/master/doc/speech-dispatcher.html#Configuration-of-the-Generic-Output-Module