-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
espeak-ng: Pick mbrola voices from XDG_DATA_DIRS #325124
base: master
Are you sure you want to change the base?
Conversation
2bd3a22
to
7859e5a
Compare
4a3b15c
to
5dcbae4
Compare
5dcbae4
to
206f1a0
Compare
This comment was marked as resolved.
This comment was marked as resolved.
aa8f836
to
acaf129
Compare
Extracted from mbrola.
This is required for packages to depend on `mbrola` while keeping the dependency on `mbrola-voices` implicit, since it is huge. It will be eventually picked from the environment. The old `mbrola` package is exposed as `mbrola.combined`. Our `speechd` patch is only using the voices.
Upstream espeak-ng expects one of the following paths: - $data_dir/mbrola/$lang - $data_dir/mbrola/$lang/$lang - $data_dir/mbrola/voices/$lang The previously used `$data_dir/mbrola/voices/$lang/$lang` is not supported. Let’s change the installation path to the second one, so that espeak-ng can still find mbrola voices once we drop our patch. speechd also expects one of the the paths above.
acaf129
to
e406b9b
Compare
nixos/modules/programs/mbrola.nix
Outdated
in | ||
{ | ||
options.programs.mbrola = { | ||
enable = lib.mkEnableOption "linking mbrola speech synthesizer voices installed through [](#opt-environment.systemPackages)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not very happy with this option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable = lib.mkEnableOption "linking mbrola speech synthesizer voices installed through [](#opt-environment.systemPackages)"; | |
enable = lib.mkEnableOption "" // { description = "Wether to link mbrola speech synthesizer voices installed through [](#opt-environment.systemPackages)."; }; |
nixos/modules/programs/mbrola.nix
Outdated
in | ||
{ | ||
options.programs.mbrola = { | ||
enable = lib.mkEnableOption "linking mbrola speech synthesizer voices installed through [](#opt-environment.systemPackages)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable = lib.mkEnableOption "linking mbrola speech synthesizer voices installed through [](#opt-environment.systemPackages)"; | |
enable = lib.mkEnableOption "" // { description = "Wether to link mbrola speech synthesizer voices installed through [](#opt-environment.systemPackages)."; }; |
nixos/modules/programs/mbrola.nix
Outdated
options.programs.mbrola = { | ||
enable = lib.mkEnableOption "linking mbrola speech synthesizer voices installed through [](#opt-environment.systemPackages)"; | ||
|
||
installDefaultVoices = lib.mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have expected a package option instead of this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plan is to eventually split the mbrola-voices package: #226869
pkgs/by-name/mb/mbrola/package.nix
Outdated
''; | ||
|
||
passthru = { | ||
combined = runCommandLocal "mbrola-combined-${finalAttrs.version}" { inherit (finalAttrs) meta; } '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could make a nicer git history if we didn't include this intermediate step in the commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do not include this step then some of the commits will be broken.
e406b9b
to
471b9ed
Compare
These provide slightly nicer pronunciation. Since we plan to stop hardcoding the path to the voices in `espeak-ng`, we need to pull them through the NixOS module.
This will require that user installs e.g. `mbrola-voices` in such a way its `share/` directory ends up in `XDG_DATA_DIRS` environment variable. The NixOS module change in the parent commit will handle that automatically for GNOME.
471b9ed
to
5f1ff0f
Compare
Description of changes
Fixes: #207204, #261281
Needed for: #226869
Things done
env XDG_DATA_DIRS=(nix-build -A mbrola-voices --no-out-link)/share (nix-build -A espeak-ng)/bin/espeak "Hello world!" -v mb-en1
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.