How to install more voices for speech-dispatcher

Hello, I did browse few threads and web pages and I ended up with a configuration file that looks like this

services.speechd.enable = true;
## .....
environment.systemPackages = with pkgs; [
  ## ....
  speechd espeak-ng mbrola-voices mbrola
]

I thought this is all the magic I need to make the mbrola voices available for my speech-dispatcher, but this is what I see with or without the mbrola-voices mbrola packages

$ spd-say -O
OUTPUT MODULES
pico
flite
espeak-ng

$ spd-say -L
                     NAME                 LANGUAGE                  VARIANT
                 samantha                    en-US                     none
                   serena                    en-GB                     none
                  sabrina                    de-DE                     none
                   isabel                    es-ES                     none
                 virginie                    fr-FR                     none
                   silvia                    it-IT                     none

can someone help me with a simple explanation how can I add the mbrola voices to speech-dispacher?

Hello I’m glad you asked - I guess this is my area…

I’m afraid it’s not quite that simple.
Getting it to work properly involves a couple of steps and you’ll have to create a number of files.

To point you in the right direction - you can check out dotfiles/home/.config/speech-dispatcher at main · QuackHack-McBlindy/dotfiles · GitHub

Not sure how much you’d want to integrate of the dispatcher, but glancing at dotfiles/home/.local/share/orca/user-settings.conf at bd1b08091cf1bbff06f3389c86acd538920bc4df · QuackHack-McBlindy/dotfiles · GitHub might be of use to you as well.

Good luck!

QuackHack-McBlindy

I opened a PR here; there was a bug in pkgs.espeak-ng.

Ran on my system and the command below works:

spd-say -o espeak-ng -y us-mbrola-1 "hello, this is an mbrola voice"

And also spd-say -O reports espeak-ng-mbrola now:

$ spd-say -O
OUTPUT MODULES
pico
flite
espeak-ng-mbrola
espeak-ng

To see the fix in action run:

nix-shell \
  -I nixpkgs=https://github.com/marcg03/nixpkgs/archive/ac573131120c36eeeeed00a80ad21c7d2f229071.tar.gz \
  -p espeak-ng \
  --run 'espeak-ng -v mb-us1 "hello world"'

Current nixpkgs-unstable (broken):

nix-shell \
  -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz \
  -p espeak-ng \
  --run 'espeak-ng -v mb-us1 "hello world"'

thank you but tbh I couldn’t even tell what am I looking at, is it supposed to be this complicated? :sweat_smile: