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
speechd: 0.8.5 -> 0.8.8, refactored #32924
Conversation
}: | ||
|
||
stdenv.mkDerivation rec { | ||
with lib; | ||
buildPythonApplication rec { |
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.
This is definitely not a python application, it is a C library.
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.
But it worked so well :-(.
spd-conf is a python application, and doesn't work after the requested change.
spd-say and speech-dispatcher work with both approaches.
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.
Right, you would also need to revert the previous python wrapping.
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.
Done
buildInputs = [ libtool glib dotconf libsndfile libao libpulseaudio alsaLib ] | ||
++ optionals withEspeak-ng [ espeak-ng sonic pcaudiolib ] | ||
++ optional withPico svox | ||
# TODO: add flint/festival support with festival-freebsoft-utils package |
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.
flite
is separate from festival and it is already packaged.
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.
Added flite.
flint is (related to) festival.
"--with-alsa" | ||
"--with-libao" | ||
"--with-oss" | ||
"--with-default-audio-method=\"pulse,alsa,libao,oss\"" |
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 think only one method can be default
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.
It's documented in the source. It will automatically fallback from left to right.
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.
Neat.
|
||
propagatedBuildInputs = [ pyxdg ]; | ||
|
||
buildInputs = [ libtool glib dotconf libsndfile libao libpulseaudio alsaLib ] |
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.
It would be better to disable the other back-ends by default. libao
already takes care of pulseaudio support and who uses alsa nowadays.
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.
Done
Hmm, that was fast. While at it, you can also update espeak master...jtojnar:speechd I also suspect that the reason default speech synthesizer did not work is |
You also had done quite some part of the work already. |
@@ -52,7 +58,7 @@ buildPythonApplication rec { | |||
|
|||
meta = with stdenv.lib; { | |||
description = "Common interface to speech synthesis"; | |||
homepage = http://www.freebsoft.org/speechd; | |||
homepage = http://devel.freebsoft.org/speechd; |
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.
It is HTTPS.
|
Basically the issue lies in semantics, speechd is not a python application with a binary component, it is a library with a python helper. |
This fixes the default module: dbbefea |
Setting the default module looks fine in the |
You might want to delete |
, withAlsa ? false, alsaLib | ||
, withOss ? false | ||
, withFlite ? true, flite | ||
, withFestival ? false # TODO: , festival-freebsoft-utils |
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 comment out the whole attribute, since it does nothing.
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.
Idem for Ivona.
Then also in the configureFlags the optional arguments.
Done.
, withOss ? false | ||
, withFlite ? true, flite | ||
, withFestival ? false # TODO: , festival-freebsoft-utils | ||
, withEspeak-ng ? true, espeak-ng, sonic, pcaudiolib |
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.
Nix calls espeak-ng
espeak
, the old one is espeak-classic
. We should respect the Nix convention here.
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.
Done.
It makes the file contents confusing however: where to write -ng
and where not?
, withPico ? true, svox | ||
, withIvona ? false # TODO: , libdumbtts | ||
, defaultModule ? null | ||
, defaultLang ? "en" |
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 leave this for a NixOS module. Actually, I would even remove the defaultModule
argument since selectedDefaultModule
is more of a bugfix, i intend to send a pull request fixing this upstream.
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.
Done.
stdenv.mkDerivation rec { | ||
with lib; | ||
let | ||
selectedDefaultModule = |
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.
Please add here a comment like “speechd hard-codes espeak
even when built without a support for it.”
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.
Done
|
||
hardeningDisable = [ "format" ]; | ||
propagatedBuildInputs = [ pyxdg ]; |
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.
pyxdg
is already listed in pythonPath
below.
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.
Done
@GrahamcOfBorg build speechd |
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.
Failure for system: x86_64-darwin
Package ‘speech-dispatcher-0.8.8’ in /Users/graham/nix-borg/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-zoidberg/pkgs/development/libraries/speechd/default.nix:75 is not supported on ‘x86_64-darwin’, refusing to evaluate.
a) For `nixos-rebuild` you can set
{ nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.
b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allowBroken = true; }
to ~/.config/nixpkgs/config.nix.
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.
Success for system: x86_64-linux
shrinking /nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8/lib/speech-dispatcher-modules/sd_cicero
shrinking /nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8/lib/speech-dispatcher-modules/sd_pico
shrinking /nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8/lib/speech-dispatcher/spd_pulse.so
shrinking /nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8/lib/speech-dispatcher/spd_oss.so
shrinking /nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8/lib/speech-dispatcher/spd_libao.so
shrinking /nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8/lib/speech-dispatcher/spd_alsa.so
stripping (with flags -S) in /nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8/lib /nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8/bin
patching script interpreter paths in /nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8
checking for references to /tmp/nix-build-speech-dispatcher-0.8.8.drv-0 in /nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8...
/nix/store/fn2cik14aignfmz2jy5krq3ccz1cbhxq-speech-dispatcher-0.8.8
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.
Success for system: aarch64-linux
shrinking /nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8/lib/speech-dispatcher/spd_oss.so
shrinking /nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8/lib/speech-dispatcher/spd_libao.so
shrinking /nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8/lib/speech-dispatcher/spd_alsa.so
shrinking /nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8/bin/spdsend
shrinking /nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8/bin/spd-say
shrinking /nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8/bin/speech-dispatcher
stripping (with flags -S) in /nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8/lib /nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8/bin
patching script interpreter paths in /nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8
checking for references to /build in /nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8...
/nix/store/qnbn0sxsci6nkzwxxvidphk5ffh5wsq6-speech-dispatcher-0.8.8
I re-added python dependency to build python bindings and changed |
Thanks for your great work! |
It's done with pleasure. Thanks for the support, and constructive feedback. |
Motivation for this change
Add support for pulseaudio.
Add support for espeak-ng.
Apply best packaging practices I know so far.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)