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.

When Chromium is launched with --enable-speech-dispatcher flag speech-dispatcher is started automatically man speech-dispatcher

       speech-dispatcher  is  a  server process that is responsible for trans‐
       forming requests for text-to-speech output into actual speech  hearable
       in the speakers. It arbitrates concurrent speech requests based on mes‐
       sage priorities, and abstracts different  speech  synthesizers.  Client
       programs,  like  screen  readers  or  navigation  software, send speech
       requests to speech-dispatcher using TCP  protocol  (with  the  help  of
       client  libraries).  speech-dispatcher is usually started automatically
       by client libraries (i.e. autospawn), so you only need to run it  manu‐
       ally if testing/debugging, or when in other explicit need for a special

as reflected at Task Manager

speech-dispatcher --spawn-communication-method unix_socket --socket-path /run/user/1000/speech-dispatcher/speechd.sock


spd-conf -u

creates a user configuration file for speech-dispatcher within ~/.config where

espeak is set as the default module

DefaultModule   espeak

espeak has an m option

-m     Interpret SSML markup, and ignore other < > tags

Am not entirely sure if spd-say is not called when window.speechSynthesis.speak() is called; spd-say has an x option which achieves same result as above man spd-say

-x, --ssml          Set SSML mode on (default: off)

The speech-dispatcher 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_TEXT or SPD_DATA_SSML.


Parse the SSML set at text property of SpeechSynthesisUtterance using the existing capabilities of the native program called to convert text to speech by speech-dispatcher.


How to set the default option of either or both -x for spd-say and -m for espeak commands at ~/.config/speech-dispatcher/speechd.conf for the clients Chromium (unix socket connect), and if possible Firefox, when window.speechSynthesis.speak() is called by the browsers?

  • 1
    This has already been asked by this same user at U & L SE. – Mukesh Sai Kumar Jan 13 '18 at 8:44
  • I'm voting to close this question as off-topic because user has already cross-posted on U&L. – jokerdino Jan 14 '18 at 14:40
  • @jokerdino What does "cross-posted" mean? Is not Unix an entirely different site with different users? – guest271314 Jan 14 '18 at 16:08