Presently when Speech Synthesis Markup Language (SSML) is set as at text property of SpeechSynthesisUtterance instance at Chromium or Firefox web browsers the SSML is not parsed at *nix as reflected at audio output of speechSynthesis.speak() call.
Browsing the source code of the browsers speech-dispatcher appears to be called by .speak() where either spd-say or espeak, if configured to do so, could be called by speech-dispatcher.
spd-say has an x option
-x, --ssml Set SSML mode on (default: off)
espeak has an m option
-m Interpret SSML markup, and ignore other < > tags
Have created a user configuration file for speech-dispatcher using
spd-conf -u
The documentation states that the user configuration file can be used to set parameters for specific clients
4.1.6 Parameter Settings Commands
The following parameter setting commands are available. For configuration and history clients there are also functions for setting the value for some other connection and for all connections. They are listed separately below.
C API function:
int spd_set_data_mode(SPDConnection *connection, SPDDataMode mode)Set Speech Dispatcher data mode. Currently, plain text and SSML are supported. SSML is especially useful if you want to use index marks or include changes of voice parameters in the text.mode is the requested data mode:
SPD_DATA_TEXTorSPD_DATA_SSML.
Questions
How to set the default option of either or both
-xforspd-sayand-mforespeakcommands at~/.config/speech-dispatcher/speechd.conffor the clients Chromium and Firefox browsers when.speak()is called?How to adjust the source code at Chromium and Firefox browsers to set the
-xor-moptions by default for the text set atSpeechSpeechSynthesisUtterancetextproperty which is passed towindow.speechSynthesis.speak()?