aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Vyalkova <cyber+gentoo@sysrq.in>2021-05-22 12:55:44 +0500
committerAnna Vyalkova <cyber+gentoo@sysrq.in>2021-05-22 20:21:08 +0500
commit6a4155f2dc55c8da8650c043f14d779cd88edd8f (patch)
treef89ff5f3648523d41bb5bc9f17334956db892400 /app-accessibility/rhvoice
parentdev-cpp/cli11: initial import (diff)
downloadguru-6a4155f2dc55c8da8650c043f14d779cd88edd8f.tar.gz
guru-6a4155f2dc55c8da8650c043f14d779cd88edd8f.tar.bz2
guru-6a4155f2dc55c8da8650c043f14d779cd88edd8f.zip
app-accessibility/rhvoice: initial import
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'app-accessibility/rhvoice')
-rw-r--r--app-accessibility/rhvoice/Manifest4
-rw-r--r--app-accessibility/rhvoice/metadata.xml45
-rw-r--r--app-accessibility/rhvoice/rhvoice-1.2.4.ebuild145
3 files changed, 194 insertions, 0 deletions
diff --git a/app-accessibility/rhvoice/Manifest b/app-accessibility/rhvoice/Manifest
new file mode 100644
index 0000000000..19a7e754ee
--- /dev/null
+++ b/app-accessibility/rhvoice/Manifest
@@ -0,0 +1,4 @@
+DIST rhvoice-1.2.4.tar.gz 187812264 BLAKE2B 0756e22758f530a4a4f969425ed07e9bdab9e9ce9a6bcf13b435992f4854d204febf88799153c3041134adbddbba2b29823740b65de6c8d2aea1d4d33b94d59a SHA512 747985a8a0fe27fd1dc15e434dc41bbdca169747ae5cb3695df89ceced9131fc9d196916af08f3caacd21c34cfc022989e3753e21dbc2c0095ba7e991dc58bb8
+DIST rhvoice-evgeniy-eng-4.0.tar.gz 7338125 BLAKE2B 58eaf04e77bde46e5013e3959815e2ea0234b8c33f7737df0b00e4b32fb49d169f651f6341ede876c331c40b1d17afffd25c4e2741871aea02ee4bdd8d7c2246 SHA512 1096b2d898292739f86333414a32b97b99112a57cf2c98c5ea31d1b92974f3adc4119e0ee031e6961810365432b77eb96229f7a45c55d8b9337a22aa3848dcc8
+DIST rhvoice-evgeniy-rus-4.0.tar.gz 9962477 BLAKE2B d3fffbd54813d80734b59b6ac0ed96c0e07ce4266594a918acc01fe2bdd649d854ffe7306b57c3cb3718cdc1a090f6f7f28712005c708a39a486867760162cf9 SHA512 4053185fd5cff60a8cf3355fad69ab63348fc5047a7e5d2328a639a5c65cecfaadc92d63599b0b8bc7ca804753593c78c837621cdd153c6ce247100141b96500
+DIST rhvoice-victoria-4.0.tar.gz 7425747 BLAKE2B 221805cef8b21cee24dcd34cde06450a7f9a2a588820265ae51729ddc73604caf2e089fb97ee96bf7503018f4fa967aa416fe0f0cfaf597e4d0dea4e0c72de54 SHA512 03b95f76bbd0b213fac867705acd3229f2d62448cdb863968b6ff02cc06f162d07a6154418e3ceee63d8d5352a00c1fed57b635d59424234b6cae3b1914da1cb
diff --git a/app-accessibility/rhvoice/metadata.xml b/app-accessibility/rhvoice/metadata.xml
new file mode 100644
index 0000000000..b48257dea6
--- /dev/null
+++ b/app-accessibility/rhvoice/metadata.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="github">RHVoice/RHVoice</remote-id>
+ </upstream>
+ <maintainer type="person">
+ <email>cyber+gentoo@sysrq.in</email>
+ <name>Anna</name>
+ </maintainer>
+ <use>
+ <flag name="cli">
+ Build a CLI application that allows you to synthesize speech
+ </flag>
+ <flag name="client">
+ Build a client allowing to speak text (deprecated - use speech-dispatcher)
+ </flag>
+ <flag name="server">
+ Build a server application
+ </flag>
+ <flag name="speech-dispatcher">
+ Build a speech-dispatcher middleware module
+ </flag>
+ <flag name="utils">
+ Build utilities needed for the ones creating voices
+ </flag>
+ </use>
+ <longdescription>
+ RHVoice is a free and open source speech synthesizer.
+
+ Voices are built from recordings of natural speech. They have
+ small footprints, because only statistical models are stored
+ on users' computers. And though the voices lack the
+ naturalness of the synthesizers which generate speech by
+ combining segments of the recordings themselves, they are
+ still very intelligible and resemble the speakers who recorded
+ the source material.
+
+ Initially, RHVoice could speak only Russian. Now it also
+ supports American English, Brazilian Portuguese, Esperanto,
+ Georgian, Ukrainian, Kyrgyz and Tatar. In theory, it is
+ possible to implement support for other languages, if all the
+ necessary resources can be found or created.
+ </longdescription>
+</pkgmetadata>
diff --git a/app-accessibility/rhvoice/rhvoice-1.2.4.ebuild b/app-accessibility/rhvoice/rhvoice-1.2.4.ebuild
new file mode 100644
index 0000000000..47b42e13c4
--- /dev/null
+++ b/app-accessibility/rhvoice/rhvoice-1.2.4.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake multilib
+
+MY_PN="RHVoice"
+DESCRIPTION="TTS engine with extended languages support (including Russian)"
+HOMEPAGE="https://rhvoice.su https://github.com/RHVoice/RHVoice"
+SRC_URI="
+ https://github.com/${MY_PN}/${MY_PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
+ l10n_en? ( https://github.com/RHVoice/evgeniy-eng/archive/refs/tags/4.0.tar.gz -> rhvoice-evgeniy-eng-4.0.tar.gz )
+ l10n_ru? (
+ https://github.com/RHVoice/evgeniy-rus/archive/refs/tags/4.0.tar.gz -> rhvoice-evgeniy-rus-4.0.tar.gz
+ https://github.com/RHVoice/victoria-rus/archive/refs/tags/4.0.tar.gz -> rhvoice-victoria-4.0.tar.gz
+ )
+"
+S="${WORKDIR}/${MY_PN}-${PV}"
+CMAKE_REMOVE_MODULES_LIST="Hardening VersionFromGit"
+
+LICENSE="l10n_pt-BR? ( CC-BY-SA-4.0 ) BSD GPL-2 GPL-3+ LGPL-2.1+ MIT"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="ao bindist cli client portaudio pulseaudio +server +speech-dispatcher utils"
+REQUIRED_USE="( ao || portaudio || pulseaudio )"
+
+CC_NC_LANGS=( en eo ky ru uk )
+NC_LANGS=( ka tt )
+LANGS=" ${CC_NC_LANGS[@]} ${NC_LANGS[@]} pt-BR"
+IUSE+="${LANGS// / l10n_}"
+
+for lang in "${CC_NC_LANGS[@]}" ; do
+ LICENSE+=" l10n_${lang}?"
+ LICENSE+=" ( CC-BY-NC-ND-4.0 )"
+done
+
+for lang in "${NC_LANGS[@]}" ; do
+ LICENSE+=" l10n_${lang}?"
+ LICENSE+=" ( free-noncomm )"
+done
+
+RDEPEND="
+ !dev-libs/hts_engine
+ media-sound/sonic
+ ao? ( media-libs/libao )
+ portaudio? ( media-libs/portaudio )
+ pulseaudio? ( media-sound/pulseaudio )
+ speech-dispatcher? ( app-accessibility/speech-dispatcher )
+ server? (
+ dev-libs/glib[dbus]
+ >=dev-cpp/glibmm-2.66.1:2
+ )
+"
+BDEPEND="${DEPEND}
+ dev-cpp/cli11
+ dev-libs/utfcpp
+"
+REQUIRED_USE="|| ( ao portaudio pulseaudio )"
+
+DOCS=( README.md NEWS doc config/dicts )
+
+delete_voices() {
+ for voice in "$@"; do
+ rm -r "data/voices/${voice}" || die
+ done
+}
+
+src_unpack() {
+ default
+
+ # git submodules, which are not present in the snapshot
+ rmdir "${S}"/data/voices/{victoria,evgeniy-rus,evgeniy-eng} || die
+
+ if use l10n_ru ; then
+ mv "${WORKDIR}"/victoria-rus-4.0 "${S}"/data/voices/victoria || die
+ mv "${WORKDIR}"/evgeniy-rus-4.0 "${S}"/data/voices/evgeniy-rus || die
+ fi
+
+ if use l10n_en ; then
+ mv "${WORKDIR}"/evgeniy-eng-4.0 "${S}"/data/voices/evgeniy-eng || die
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ sed "s|/lib/speech-dispatcher-modules|/$(get_libdir)/speech-dispatcher-modules|" \
+ -i src/sd_module/CMakeLists.txt || die
+
+ sed 's|/systemd/system||' \
+ -i src/service/CMakeLists.txt || die
+
+ rm -r src/third-party/{sonic,tclap,utf8} || die
+ sed "/sonic/d" -i src/third-party/CMakeLists.txt || die
+ sed "/set(UTF8_INCLUDE_DIR/d" -i src/CMakeLists.txt || die
+
+ sed 's/ "RHVoice_question_match"//' \
+ -i src/third-party/mage/CMakeLists.txt || die
+
+ sed -e "/include(VersionFromGit)/d" \
+ -e "/include(Hardening)/d" \
+ -e "/find_package(Sanitizers)/d" \
+ -e "/getVersionFromGit/d" \
+ -e "/harden/d" \
+ -i CMakeLists.txt || die
+ sed -e "/add_sanitizers/d" \
+ -e "/harden/d" \
+ -i src/*/CMakeLists.txt \
+ -i src/third-party/*/CMakeLists.txt || die
+
+ use l10n_ru || delete_voices aleksandr anna arina artemiy elena irina pavel
+ use l10n_en || delete_voices alan bdl clb slt
+ use l10n_uk || delete_voices anatol natalia
+ use l10n_eo || delete_voices spomenka
+ use l10n_ka || delete_voices natia
+ use l10n_ky || delete_voices azamat nazgul
+ use l10n_tt || delete_voices talgat
+ use l10n_pt-BR || delete_voices Leticia-F123
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -Dcommon_doc_dir=/usr/share/doc/${PF}
+ -DRHVOICE_VERSION=${PV}
+ -DRHVOICE_VERSION_MAJOR=$(ver_cut 1)
+ -DWITH_CLI11=ON
+ # src/CMakeLists.txt
+ -DBUILD_CLIENT=$(usex client)
+ -DBUILD_UTILS=$(usex utils)
+ -DBUILD_TESTS=$(usex cli)
+ -DBUILD_SERVICE=$(usex server)
+ -DBUILD_SPEECHDISPATCHER_MODULE=$(usex speech-dispatcher)
+ # src/audio/CMakeLists.txt
+ -DWITH_LIBAO=$(usex ao)
+ -DWITH_PULSE=$(usex pulseaudio)
+ -DWITH_PORTAUDIO=$(usex portaudio)
+ # src/third-party/CMakeLists.txt
+ -DRAPIDXML_INCLUDE_DIR="${S}"/src/third-party/rapidxml
+ -DUTF8_INCLUDE_DIR=/usr/include/utf8cpp
+ )
+
+ append-cppflags -std=gnu++11
+ cmake_src_configure
+}