Skip to content
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

rhvoice: init at 0.5 #32979

Closed
wants to merge 7 commits into from
Closed

rhvoice: init at 0.5 #32979

wants to merge 7 commits into from

Conversation

berce
Copy link
Contributor

@berce berce commented Dec 22, 2017

Motivation for this change

RHVoice is one of the best speech synthesis engines I 've heard, including commercial ones.
It can be tested with echo "Talk to me" | RHVoice-test.

Things done
  • Win the battle against scons to gain power over the environment.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)

  • Built on platform(s)

    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)

  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"

  • Tested execution of all binary files (usually in ./result/bin/)

  • Fits CONTRIBUTING.md.

{ stdenv, lib, pkgconfig, fetchFromGitHub, scons, python, glibmm, libao
}:

with lib;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not used anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the meta attribute.
Moved.

with lib;
stdenv.mkDerivation rec {
name = "rhvoice";
#version = "2017-09-24";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.
I hope to update to that version soon though, 0.5 is several years old.


with lib;
stdenv.mkDerivation rec {
name = "rhvoice";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Derivation name should contain the version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

# - RPATH, to link to the newly built libraries
# 2. Some data is being zipped. Zip can't handle files from 1970.
#
postPatch = ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make this a proper patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

env["BUILDDIR"]=BUILDDIR
env["RPATH"]="'$out'/lib"
'
find "./" '!' -newermt '1980-01-01' -exec touch -d '1980-01-02' '{}' '+'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Some data is being zipped. Zip can't handle files from 1970.

@grahamc
Copy link
Member

grahamc commented Dec 23, 2017

@GrahamcOfBorg eval

(sorry for the noise, master was broken by a merge)

@berce berce changed the title rhvoice: init at 2017-09-24 rhvoice: init at 0.5 Dec 23, 2017
@berce berce force-pushed the upstream-rhvoice branch 2 times, most recently from 34e4a22 to f0299c5 Compare December 23, 2017 22:31
substituteInPlace config/speechd.conf --replace "nixDefault" "${selectedDefaultModule}"
substituteInPlace config/speechd.conf --replace "sd_rhvoice" "${rhvoice}/bin/sd_rhvoice"
substituteInPlace config/speechd.conf --replace "RHVoice.conf" "${rhvoice}/etc/RHVoice/RHVoice.conf"
${stdenv.lib.optionalString withPico ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conditional is not needed since the svox dependency can be compiled out. RHVoice, on the other hand, cannot so that one should get a conditional. Though, I would move enabling the rhvoice to a NixOS module.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rearranged the optional stuff in patches and postPatch. Is that what you wanted?

Since speech-dispatcher ships with several speech engines, I think including RHVoice in the same way is convenient for the user. Would a NixOS module not make it only available in NixOS?

@jtojnar
Copy link
Contributor

jtojnar commented Mar 19, 2018

I remain unconvinced that rhvoice should be part of the speechd expression.

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: rhvoice

Partial log (click to expand)

src/include/core/xml.hpp: In instantiation of 'void RHVoice::xml::parser<ch>::parse(const input_iterator&, const input_iterator&, RHVoice::document&) [with input_iterator = const wchar_t*; ch = wchar_t]':
src/include/core/document.hpp:575:5:   required from 'static std::auto_ptr<RHVoice::document> RHVoice::document::create_from_ssml(const RHVoice::smart_ptr<RHVoice::engine>&, const input_iterator&, const input_iterator&, const RHVoice::voice_profile&) [with input_iterator = const wchar_t*]'
src/lib/lib.cpp:221:41:   required from 'RHVoice_message_struct::RHVoice_message_struct(const RHVoice::smart_ptr<RHVoice::engine>&, const RHVoice_callbacks&, const ch*, unsigned int, RHVoice_message_type, const RHVoice_synth_params*, void*) [with ch = wchar_t]'
src/lib/lib.cpp:117:13:   required from 'RHVoice_message_struct* RHVoice_tts_engine_struct::new_message(const ch*, unsigned int, RHVoice_message_type, const RHVoice_synth_params*, void*) const [with ch = wchar_t; RHVoice_message = RHVoice_message_struct*]'
src/lib/lib.cpp:332:98:   required from here
src/include/core/xml.hpp:361:20: error: invalid operands of types '<unresolved overloaded function type>' and 'const int' to binary 'operator<'
scons: *** [build/linux/lib/lib.os] Error 1
scons: building terminated because of errors.
builder for '/nix/store/wnhdrym0srydif48khszhxllja1ri5p5-rhvoice-0.5.drv' failed with exit code 2
�[31;1merror:�[0m build of '/nix/store/wnhdrym0srydif48khszhxllja1ri5p5-rhvoice-0.5.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: rhvoice

Partial log (click to expand)

src/include/core/xml.hpp: In instantiation of 'void RHVoice::xml::parser<ch>::parse(const input_iterator&, const input_iterator&, RHVoice::document&) [with input_iterator = const wchar_t*; ch = wchar_t]':
src/include/core/document.hpp:575:5:   required from 'static std::auto_ptr<RHVoice::document> RHVoice::document::create_from_ssml(const RHVoice::smart_ptr<RHVoice::engine>&, const input_iterator&, const input_iterator&, const RHVoice::voice_profile&) [with input_iterator = const wchar_t*]'
src/lib/lib.cpp:221:41:   required from 'RHVoice_message_struct::RHVoice_message_struct(const RHVoice::smart_ptr<RHVoice::engine>&, const RHVoice_callbacks&, const ch*, unsigned int, RHVoice_message_type, const RHVoice_synth_params*, void*) [with ch = wchar_t]'
src/lib/lib.cpp:117:13:   required from 'RHVoice_message_struct* RHVoice_tts_engine_struct::new_message(const ch*, unsigned int, RHVoice_message_type, const RHVoice_synth_params*, void*) const [with ch = wchar_t; RHVoice_message = RHVoice_message_struct*]'
src/lib/lib.cpp:332:98:   required from here
src/include/core/xml.hpp:361:20: error: invalid operands of types '<unresolved overloaded function type>' and 'const int' to binary 'operator<'
scons: *** [build/linux/lib/lib.os] Error 1
scons: building terminated because of errors.
builder for '/nix/store/7fwigv7w55708vq8hszz7znfgvjhiidn-rhvoice-0.5.drv' failed with exit code 2
�[31;1merror:�[0m build of '/nix/store/7fwigv7w55708vq8hszz7znfgvjhiidn-rhvoice-0.5.drv' failed

@jtojnar
Copy link
Contributor

jtojnar commented Mar 19, 2018

Right, I am fine with rhvoice as is, but third-party speech modules should be enabled through NixOS module.

@jtojnar
Copy link
Contributor

jtojnar commented Mar 19, 2018

Merged the updated rhvoice as f97c466

@jtojnar jtojnar mentioned this pull request Apr 25, 2018
@c0bw3b
Copy link
Contributor

c0bw3b commented Oct 21, 2018

@jtojnar should we close this since #37370 is merged?
A speechd module for rhvoice will probably go through a new PR anyway

@jtojnar jtojnar closed this Oct 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants