diff --git a/media-sound/piper/Manifest b/media-sound/piper/Manifest index dff40c1616..d35ae7a290 100644 --- a/media-sound/piper/Manifest +++ b/media-sound/piper/Manifest @@ -1,3 +1,4 @@ DIST espeak-ng-1.52.0_p20250322.tar.gz 17815706 BLAKE2B d285492afe81c8cbbb744ff3394022e8fbdff3444ec2cd6a8d315afbdaa35e0238071cd49bcd868f69254223867cbb0e5e28bb778584e0ad072c50f3f81ac4f5 SHA512 1dbdb49441437989811b7bd1177c9c5d5baff229f7214e31e38c40bac7c86d3b94cb10ed5b387e0b81a20b26b4666a91bd62cfad3dcd505343573ffe3fd68b09 DIST piper-1.4.1.tar.gz 4836371 BLAKE2B 3905c78647dad9add577b2408f4a48505db18f3e164c8061082228e5fc93fcf48da75699b5d2c2669f2eca6f617e7f2524b751958bd1e8e86493a1da32076652 SHA512 0c1ae1585fec2c66cfb39b28e7316b0b471decbcad6fa00964acb8b124692e945f89eb217d0f40ddab34e09aacc11507b4eea14665c0f6c6b48292066269f97d DIST piper-1.4.2.tar.gz 4836381 BLAKE2B a50ea179be0e44767e6bec04371516f88e5c89268a5b84dce29041e8a551015179c2e707023e4fe28b7533101bd177979e1aa5ffa8ca0014a2d05cc5e5e274af SHA512 0602ae045b89d96444c22028970b79d0aa6f27c476d75a3cf6b4b7edfd167bb95e744a8fb40077a32fb11f6ed193389c3b7638dd4ec1459fc30e086ee8a09b41 +DIST piper-1.5.0.tar.gz 4881834 BLAKE2B a0d3d354a96f5c7c0554b1ee19329bde82034b569c858b4b37869357beee8dca5adb209655d542a651d52b1551a04b82f224f94e8b00e8d7c259a1dd668df6f9 SHA512 fbe52b03809f5f032711ced9fd29de05999b896ffd21a57f6c98455d1fa6aa6d04e02b8d10a25265a0df490004084a84aaf6541d6621250e2e682bc59d045e8c diff --git a/media-sound/piper/piper-1.5.0.ebuild b/media-sound/piper/piper-1.5.0.ebuild new file mode 100644 index 0000000000..6ffa078e83 --- /dev/null +++ b/media-sound/piper/piper-1.5.0.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{12..14} ) + +inherit cmake distutils-r1 + +ESPEAK_NG_COMMIT="212928b394a96e8fd2096616bfd54e17845c48f6" + +DESCRIPTION="Fast and local neural text-to-speech engine" +HOMEPAGE="https://github.com/OHF-Voice/piper1-gpl" +SRC_URI=" + https://github.com/OHF-Voice/piper1-gpl/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/espeak-ng/espeak-ng/archive/${ESPEAK_NG_COMMIT}.tar.gz -> espeak-ng-1.52.0_p20250322.tar.gz +" + +S="${WORKDIR}/piper1-gpl-${PV}" +ESPEAK_NG="${WORKDIR}/espeak-ng-${ESPEAK_NG_COMMIT}" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="server" + +RDEPEND=" + dev-python/pathvalidate[${PYTHON_USEDEP}] + media-libs/sonic + sci-libs/onnxruntime[python,${PYTHON_USEDEP}] + + server? ( dev-python/flask[${PYTHON_USEDEP}] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-python/scikit-build[${PYTHON_USEDEP}] +" + +# Both of the packages below install `/usr/bin/piper`, and +# `app-misc/piper` also installs a Python module with the same name +DEPEND+=" + !!app-misc/piper + !!net-proxy/piper +" + +EPYTEST_DESELECT=( + tests/test_piper.py::test_load_include_alignments_in_memory +) + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +src_prepare() { + distutils-r1_src_prepare + + # See https://github.com/espeak-ng/espeak-ng/issues/2048 + sed 's/160/1024/' -i "${ESPEAK_NG}/src/libespeak-ng/speech.h" || die + + sed \ + -e "s|GIT_REPOSITORY.*|SOURCE_DIR ${ESPEAK_NG}|" \ + -e 's|GIT_TAG.*|DOWNLOAD_COMMAND ""|' \ + -i CMakeLists.txt || die +} + +src_install() { + distutils-r1_src_install + + rm "${ED}/usr/COPYING" || die +}