commit: 62f6604559e944cb782c575899875fb0f6783478 Author: Pavel Sobolev <contact <AT> paveloom <DOT> dev> AuthorDate: Tue Aug 19 09:00:36 2025 +0000 Commit: David Roman <davidroman96 <AT> gmail <DOT> com> CommitDate: Tue Aug 19 13:26:53 2025 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=62f66045
media-sound/piper: new package, add 1.3.0 Signed-off-by: Pavel Sobolev <contact <AT> paveloom.dev> media-sound/piper/Manifest | 2 ++ media-sound/piper/metadata.xml | 15 ++++++++ media-sound/piper/piper-1.3.0.ebuild | 66 ++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) diff --git a/media-sound/piper/Manifest b/media-sound/piper/Manifest new file mode 100644 index 0000000000..21e00c50d9 --- /dev/null +++ b/media-sound/piper/Manifest @@ -0,0 +1,2 @@ +DIST espeak-ng-1.52.0_p20250322.tar.gz 17815706 BLAKE2B d285492afe81c8cbbb744ff3394022e8fbdff3444ec2cd6a8d315afbdaa35e0238071cd49bcd868f69254223867cbb0e5e28bb778584e0ad072c50f3f81ac4f5 SHA512 1dbdb49441437989811b7bd1177c9c5d5baff229f7214e31e38c40bac7c86d3b94cb10ed5b387e0b81a20b26b4666a91bd62cfad3dcd505343573ffe3fd68b09 +DIST piper-1.3.0.tar.gz 4394089 BLAKE2B 79859b4ed0e709f12e4b62bd561c450a706ebd3683d4569da540ad54e068807071108aa542734ad1a0e009c3bfc953f8c4593834cb9cba46c0e18e3ec280ec3b SHA512 31a549c1f15fa784120285b4f14df2c0b98d437b20e0a4958b0f13d01d13ae9fe3df0f9658560e95515abdd9d44abe9efd9f8c92c24844bece2e7c5ad0bfc306 diff --git a/media-sound/piper/metadata.xml b/media-sound/piper/metadata.xml new file mode 100644 index 0000000000..93d21b5603 --- /dev/null +++ b/media-sound/piper/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>[email protected]</email> + <name>Pavel Sobolev</name> + </maintainer> + <use> + <flag name="server">Enable server support</flag> + </use> + <upstream> + <bugs-to>https://github.com/OHF-Voice/piper1-gpl/issues</bugs-to> + <remote-id type="github">OHF-Voice/piper1-gpl</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-sound/piper/piper-1.3.0.ebuild b/media-sound/piper/piper-1.3.0.ebuild new file mode 100644 index 0000000000..2c1b93d78b --- /dev/null +++ b/media-sound/piper/piper-1.3.0.ebuild @@ -0,0 +1,66 @@ +# 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_{11..13} ) + +inherit 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=" + 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 +" + +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 + + dodoc "${ED}/usr/COPYING" + rm "$_" +}
