Speech-dispatcher configuration and modules

I’m trying to modify the speech synthesizer used by the speech-dispatcher using the configuration that works in Debian, but I can’t get it to work, I use the environment.etc parameter to help, the new speech synthesizer doesn’t appear in orca for use. How have you added speech synthesizers to orca, e.g. pico and mbrola, which are not in orca in the debian installation. So I’m trying to use the Generic module of speechdispatcher, my configuration is below. Nixos version is 23.11
nixos-rebuild switch is performed without

environment.etc = {
“speech-dispatcher/speechd.conf” = {
source = /home/sysadmin/speechd.conf;
“speech-dispatcher/modules/mikropuhe-generic.conf” = {
#target = “/etc/speech-dispatcher/modules/mikropuhe-generic.conf”;
source = /home/sysadmin/mikropuhe-generic.conf;

Since the package expression does not have --sysconfdir=/etc in configureFlags, speech dispatcher probably looks for configuration in the immutable ${pkgs.speechd}/etc. As such updating /etc will not work.

If you want to make it work, you will need at least the following in the package expression:

configureFlags = [

installFlags = [
  # Do not try to install to /etc, which is not writeable by derivations.
  "SYSCONFDIR=${placeholder "out"}/etc"

And then, we would need a NixOS module that would place the config files to /etc using environment.systemPackages.

However, if you just want mbrola, that should work out of the box. At most you will need to choose it in orca --setup.

So, for example, has an own nixos module been written for mbrola, have they been made to work in nixos, how has the integration of the speech dispatcher and speech synthesizers been implemented

We are patching speechd with a path to mbrola so that it can find it out of the box:

So does the synthesizer I use require its own nixos module, that it
integrates with speechdispatcher or do I put the above mentioned configurations in configuration.nix and it works. Which is the biggest problem here, to be precise

Well, you have two options:

  1. Update the speechd package to patch the config like we do with mbrola.
  2. Update the speechd package to support reading configuration as outlined in Speech-dispatcher configuration and modules - #2 by jtojnar

You can do those either by opening a PR to Nixpkgs or locally with overrideAttrs.

But there is no easy way to solve this. Probably because no-one needed it badly enough so far. Personally, I have making speechd easily configurable through NixOS options on my to do list but just never gotten around to it. It is not exactly trivial since speechd uses a baroque and obscure format that does not cleanly map to NixOS module type system IIRC. The complexity of configuration is also why new solutions like Spiel have been emerging.

So can I use post 2
solution directly by writing its configuration.nix what do you mean overrideattrs,
do i need to add post2 in addition to the solution
something else to my configuration. So I use a speech synthesizer that is not available as standard in nixos.

Of course, if you could write to speechdispatcher module, through which you can change its configuration and add necessary configuration parameters to it, such as adding speech synthesizers with modules. I don’t think spiel is a solution yet, most speech synthesizers don’t support it

I got the speechdispatcher recognizing the speechd.conf I used by adding it /home/user/config/speech-dispatcher, but I used
The speech synthesizer still does not appear in the ORCA settings whether this speech synthesizer’s configuration file should be added to the same folder. I have tried to add it .config.Speech-discpatcher and .Config/speech-discpatcher/modules folder, they have no effect

Is nixos speechdispatcher compiled without Generic modules support, the speech synthesizer I use just doesn’t show up in the orca settings